diff --git a/makefiles/Makefile.cpp.mk b/makefiles/Makefile.cpp.mk index c48e1c59a7..b9d9f36213 100755 --- a/makefiles/Makefile.cpp.mk +++ b/makefiles/Makefile.cpp.mk @@ -18,6 +18,10 @@ else prefix ?= /usr/local endif +# All libraries and dependecies +OR_TOOLS_LIBS = $(LIB_DIR)/$(LIB_PREFIX)ortools.$L +OR_TOOLS_LNK += $(PRE_LIB)ortools$(POST_LIB) + HAS_CCC = true ifndef CCC HAS_CCC = @@ -35,7 +39,7 @@ cc: test_cc: cc test_fz: cc else -cc: ortoolslibs +cc: $(OR_TOOLS_LIBS) test_cc: \ ccexe \ @@ -46,10 +50,6 @@ test_fz: \ BUILT_LANGUAGES += C++ endif -# All libraries and dependecies -OR_TOOLS_LIBS = $(LIB_DIR)/$(LIB_PREFIX)ortools.$L -OR_TOOLS_LNK += $(PRE_LIB)ortools$(POST_LIB) - $(GEN_DIR): $(MKDIR_P) $(GEN_PATH) @@ -140,11 +140,11 @@ $(OBJ_DIR)/swig: | $(OBJ_DIR) ############### ## CPP LIB ## ############### -ortoolslibs: third_party_check $(OR_TOOLS_LIBS) include $(OR_ROOT)makefiles/Makefile.gen.mk # OR Tools unique library. $(OR_TOOLS_LIBS): \ + third_party_check \ $(BASE_LIB_OBJS) \ $(PORT_LIB_OBJS) \ $(UTIL_LIB_OBJS) \ @@ -592,7 +592,7 @@ install_ortools_dirs: install_dirs install_cc: install_libortools install_third_party install_doc .PHONY: install_libortools -install_libortools: ortoolslibs install_ortools_dirs +install_libortools: $(OR_TOOLS_LIBS) install_ortools_dirs $(COPY) LICENSE-2.0.txt "$(DESTDIR)$(prefix)" $(COPY) ortools$Salgorithms$S*.h "$(DESTDIR)$(prefix)$Sinclude$Sortools$Salgorithms" $(COPY) ortools$Sbase$S*.h "$(DESTDIR)$(prefix)$Sinclude$Sortools$Sbase" diff --git a/makefiles/Makefile.csharp.mk b/makefiles/Makefile.csharp.mk index 7d14ccbdd2..443abbf567 100755 --- a/makefiles/Makefile.csharp.mk +++ b/makefiles/Makefile.csharp.mk @@ -23,7 +23,6 @@ endif .PHONY: test_csharp # Test C# OR-Tools using various examples. ifneq ($(CSHARP_EXECUTABLE),) csharp: \ - ortoolslibs \ csharpsolution \ csharportools \ csharpexe @@ -230,7 +229,7 @@ netstandard: clean_dotnet_generated netstandardortools BUILT_LANGUAGES +=, .NETSTANDARD endif -netstandardortools: ortoolslibs $(BIN_DIR)/$(NETSTANDARD_ORTOOLS_DLL_NAME)$D $(BIN_DIR)/$(CLR_PROTOBUF_DLL_NAME)$D +netstandardortools: $(BIN_DIR)/$(NETSTANDARD_ORTOOLS_DLL_NAME)$D $(BIN_DIR)/$(CLR_PROTOBUF_DLL_NAME)$D $(NETSTANDARD_OBJ_DIR)/AssemblyInfo.cs: \ $(CLR_KEYFILE) \ diff --git a/makefiles/Makefile.java.mk b/makefiles/Makefile.java.mk index e795e1ec2b..4afcc70cc7 100755 --- a/makefiles/Makefile.java.mk +++ b/makefiles/Makefile.java.mk @@ -93,7 +93,7 @@ java: $(warning Cannot find 'java' command which is needed for build. Please make sure it is installed and in system path. Check Makefile.local for more information.) test_java: java else -java: ortoolslibs $(JAVA_OR_TOOLS_LIBS) $(JAR) +java: $(JAVA_OR_TOOLS_LIBS) test_java: \ test_java_samples \ test_java_examples @@ -241,12 +241,12 @@ $(OBJ_DIR)/swig/sat_java_wrap.$O: \ $(OBJ_OUT)$(OBJ_DIR)$Sswig$Ssat_java_wrap.$O $(JAVA_OR_TOOLS_NATIVE_LIBS): \ + $(OR_TOOLS_LIBS) \ $(OBJ_DIR)/swig/constraint_solver_java_wrap.$O \ $(OBJ_DIR)/swig/knapsack_solver_java_wrap.$O \ $(OBJ_DIR)/swig/graph_java_wrap.$O \ $(OBJ_DIR)/swig/linear_solver_java_wrap.$O \ - $(OBJ_DIR)/swig/sat_java_wrap.$O \ - $(OR_TOOLS_LIBS) + $(OBJ_DIR)/swig/sat_java_wrap.$O $(DYNAMIC_LD) $(LD_OUT)$(LIB_DIR)$S$(LIB_PREFIX)jniortools.$(JNI_LIB_EXT) \ $(OBJ_DIR)$Sswig$Sconstraint_solver_java_wrap.$O \ $(OBJ_DIR)$Sswig$Sknapsack_solver_java_wrap.$O \ diff --git a/makefiles/Makefile.python.mk b/makefiles/Makefile.python.mk index 24d6473b83..a6b9c5fc11 100755 --- a/makefiles/Makefile.python.mk +++ b/makefiles/Makefile.python.mk @@ -41,7 +41,6 @@ endif .PHONY: test_python # Test Python OR-Tools using various examples. ifneq ($(PYTHON_EXECUTABLE),) python: \ - ortoolslibs \ install_python_modules \ pyinit \ pyalgorithms \