diff --git a/makefiles/Makefile.cpp.mk b/makefiles/Makefile.cpp.mk index cbba93ca40..8a082144db 100644 --- a/makefiles/Makefile.cpp.mk +++ b/makefiles/Makefile.cpp.mk @@ -1045,7 +1045,8 @@ $(BIN_DIR)/integer_programming$E: $(DYNAMIC_LP_DEPS) $(OBJ_DIR)/integer_programm ifeq "$(SYSTEM)" "win" $(LIB_DIR)/ortools.lib: $(STATIC_ROUTING_DEPS) - lib /out:$(LIB_DIR)/ortools.lib $(STATIC_ROUTING_LNK) + lib /out:$(LIB_DIR)/ortools.lib $(STATIC_ROUTING_LNK) $(STATIC_LD_FLAGS) + cc_archive: $(LIB_DIR)/$(LIBPREFIX)ortools.$(DYNAMIC_LIB_SUFFIX) -$(DELREC) temp @@ -1063,23 +1064,24 @@ cc_archive: $(LIB_DIR)/$(LIBPREFIX)ortools.$(DYNAMIC_LIB_SUFFIX) mkdir temp\\or-tools.$(PORT)\\include\\util mkdir temp\\or-tools.$(PORT)\\lib mkdir temp\\or-tools.$(PORT)\\objs - cp LICENSE-2.0.txt temp\\or-tools.$(PORT) - cp tools\\README.cc temp\\or-tools.$(PORT)\\README - cp tools\\Makefile.cc temp\\or-tools.$(PORT)\\Makefile - cp lib\\libortools.$(DYNAMIC_LIB_SUFFIX) temp\\or-tools.$(PORT)\\lib - cp examples\\cpp\\*.cc examples\\cpp\\*.h temp\\or-tools.$(PORT)\\examples - cp src\\algorithms\\*.h temp\\or-tools.$(PORT)\\include\\algorithms - cp src\\base\\*.h temp\\or-tools.$(PORT)\\include\\base - cp src\\constraint_solver\\*.h temp\\or-tools.$(PORT)\\include\\constraint_solver - cp src\\gen\\constraint_solver\\*.pb.h temp\\or-tools.$(PORT)\\include\\constraint_solver - cp src\\graph\\*.h temp\\or-tools.$(PORT)\\include\\graph - cp src\\linear_solver\\*.h temp\\or-tools.$(PORT)\\include\\linear_solver - cp src\\gen\\linear_solver\\*.pb.h temp\\or-tools.$(PORT)\\include\\linear_solver - cp src\\util\\*.h temp\\or-tools.$(PORT)\\include\\util + copy LICENSE-2.0.txt temp\\or-tools.$(PORT) + copy tools\\README.cc temp\\or-tools.$(PORT)\\README + copy tools\\Makefile.cc temp\\or-tools.$(PORT)\\Makefile + copy lib\\ortools.lib temp\\or-tools.$(PORT)\\lib + copy examples\\cpp\\*.cc temp\\or-tools.$(PORT)\\examples + copy examples\\cpp\\*.h temp\\or-tools.$(PORT)\\examples + copy src\\algorithms\\*.h temp\\or-tools.$(PORT)\\include\\algorithms + copy src\\base\\*.h temp\\or-tools.$(PORT)\\include\\base + copy src\\constraint_solver\\*.h temp\\or-tools.$(PORT)\\include\\constraint_solver + copy src\\gen\\constraint_solver\\*.pb.h temp\\or-tools.$(PORT)\\include\\constraint_solver + copy src\\graph\\*.h temp\\or-tools.$(PORT)\\include\\graph + copy src\\linear_solver\\*.h temp\\or-tools.$(PORT)\\include\\linear_solver + copy src\\gen\\linear_solver\\*.pb.h temp\\or-tools.$(PORT)\\include\\linear_solver + copy src\\util\\*.h temp\\or-tools.$(PORT)\\include\\util cd temp\\or-tools.$(PORT)\\include && tar -C ..\\..\\..\\dependencies\\install\\include -c -v gflags | tar xvm cd temp\\or-tools.$(PORT)\\include && tar -C ..\\..\\..\\dependencies\\install\\include -c -v google | tar xvm cd temp\\or-tools.$(PORT)\\include && tar -C ..\\..\\..\\dependencies\\install\\include -c -v sparsehash | tar xvm - cd temp && tar cvzf ..\\Google.OrTools.cc.$(PORT).$(SVNVERSION).tar.gz or-tools.$(PORT) + cd temp && ..\tools\zip.exe -r ..\Google.OrTools.cc.$(PORT).$(SVNVERSION).zip or-tools.$(PORT) -$(DELREC) temp else $(LIB_DIR)/$(LIBPREFIX)ortools.$(DYNAMIC_LIB_SUFFIX): $(CONSTRAINT_SOLVER_LIB_OBJS) $(LINEAR_SOLVER_LIB_OBJS) $(UTIL_LIB_OBJS) $(GRAPH_LIB_OBJS) $(SHORTESTPATHS_LIB_OBJS) $(ROUTING_LIB_OBJS) $(ALGORITHMS_LIB_OBJS) $(BASE_LIB_OBJS) @@ -1112,20 +1114,20 @@ cc_archive: $(LIB_DIR)/$(LIBPREFIX)ortools.$(DYNAMIC_LIB_SUFFIX) mkdir temp/or-tools.$(PORT)/include/util mkdir temp/or-tools.$(PORT)/lib mkdir temp/or-tools.$(PORT)/objs - copy LICENSE-2.0.txt temp/or-tools.$(PORT) - copy tools/README.cc temp/or-tools.$(PORT)/README - copy tools/Makefile.cc temp/or-tools.$(PORT)/Makefile - copy lib/ortools.lib temp/or-tools.$(PORT)/lib - copy examples/cpp/*.cc temp/or-tools.$(PORT)/examples - copy examples/cpp/*.h temp/or-tools.$(PORT)/examples - copy src/algorithms/*.h temp/or-tools.$(PORT)/include/algorithms - copy src/base/*.h temp/or-tools.$(PORT)/include/base - copy src/constraint_solver/*.h temp/or-tools.$(PORT)/include/constraint_solver - copy src/gen/constraint_solver/*.pb.h temp/or-tools.$(PORT)/include/constraint_solver - copy src/graph/*.h temp/or-tools.$(PORT)/include/graph - copy src/linear_solver/*.h temp/or-tools.$(PORT)/include/linear_solver - copy src/gen/linear_solver/*.pb.h temp/or-tools.$(PORT)/include/linear_solver - copy src/util/*.h temp/or-tools.$(PORT)/include/util + cp LICENSE-2.0.txt temp/or-tools.$(PORT) + cp tools/README.cc temp/or-tools.$(PORT)/README + cp tools/Makefile.cc temp/or-tools.$(PORT)/Makefile + cp lib/libortools.$(DYNAMIC_LIB_SUFFIX) temp/or-tools.$(PORT)/lib + cp examples/cpp/*.cc temp/or-tools.$(PORT)/examples + cp examples/cpp/*.h temp/or-tools.$(PORT)/examples + cp src/algorithms/*.h temp/or-tools.$(PORT)/include/algorithms + cp src/base/*.h temp/or-tools.$(PORT)/include/base + cp src/constraint_solver/*.h temp/or-tools.$(PORT)/include/constraint_solver + cp src/gen/constraint_solver/*.pb.h temp/or-tools.$(PORT)/include/constraint_solver + cp src/graph/*.h temp/or-tools.$(PORT)/include/graph + cp src/linear_solver/*.h temp/or-tools.$(PORT)/include/linear_solver + cp src/gen/linear_solver/*.pb.h temp/or-tools.$(PORT)/include/linear_solver + cp src/util/*.h temp/or-tools.$(PORT)/include/util cd temp/or-tools.$(PORT)/include && tar -C ../../../dependencies/install/include -c -v gflags | tar xvm cd temp/or-tools.$(PORT)/include && tar -C ../../../dependencies/install/include -c -v google | tar xvm cd temp/or-tools.$(PORT)/include && tar -C ../../../dependencies/install/include -c -v sparsehash | tar xvm diff --git a/tools/Makefile.cc b/tools/Makefile.cc index 6719026cc2..f46ad7ae09 100644 --- a/tools/Makefile.cc +++ b/tools/Makefile.cc @@ -100,11 +100,14 @@ ifeq ("$(SYSTEM)","win") OS = Windows OR_TOOLS_TOP_AUX = $(shell cd) OR_TOOLS_TOP = $(shell echo $(OR_TOOLS_TOP_AUX) | tools\\sed.exe -e "s/\\/\\\\/g" | tools\\sed.exe -e "s/ //g") + CLP_INC = -DUSE_CLP + CBC_INC = -DUSE_CBC CFLAGS= -nologo $(DEBUG) $(CBC_INC) $(CLP_INC)\ /D__WIN32__ /I$(INC_DIR)\\src\\windows /DGFLAGS_DLL_DECL= \ /DGFLAGS_DLL_DECLARE_FLAG= /DGFLAGS_DLL_DEFINE_FLAG= \ /I$(INC_DIR) /I$(EX_DIR) LD_FLAGS = psapi.lib ws2_32.lib + ORTOOLS_LIB = lib\\ortools.lib O=obj E=.exe OBJ_OUT = /Fo