diff --git a/makefiles/Makefile.cpp.mk b/makefiles/Makefile.cpp.mk index 692b9e5c72..3d333abe6c 100644 --- a/makefiles/Makefile.cpp.mk +++ b/makefiles/Makefile.cpp.mk @@ -499,76 +499,6 @@ else $(TAR) -C $(TEMP_PACKAGE_CC_DIR) --no-same-owner -czvf $(INSTALL_DIR)$(ARCHIVE_EXT) $(INSTALL_DIR) endif - -################ -## Cleaning ## -################ -CC_SAMPLES := $(wildcard ortools/*/samples/*.cc) -CC_SAMPLES := $(notdir $(CC_SAMPLES)) -CC_SAMPLES := $(addsuffix $E, $(addprefix $(BIN_DIR)$S, $(basename $(CC_SAMPLES)))) - -CC_EXAMPLES := $(wildcard $(CC_EX_DIR)/*.cc) -CC_EXAMPLES := $(notdir $(CC_EXAMPLES)) -CC_EXAMPLES := $(addsuffix $E, $(addprefix $(BIN_DIR)$S, $(basename $(CC_EXAMPLES)))) - -CC_TESTS := $(wildcard $(TEST_DIR)/*.cc) -CC_TESTS := $(notdir $(CC_TESTS)) -CC_TESTS := $(addsuffix $E, $(addprefix $(BIN_DIR)$S, $(basename $(CC_TESTS)))) - -.PHONY: clean_cc # Clean C++ output from previous build. -clean_cc: - -$(DEL) $(LIB_DIR)$S$(LIB_PREFIX)cvrptw_lib.$L - -$(DEL) $(LIB_DIR)$S$(LIB_PREFIX)dimacs.$L - -$(DEL) $(LIB_DIR)$S$(LIB_PREFIX)fap.$L - -$(DEL) $(LIB_DIR)$S$(LIB_PREFIX)fz.$L - -$(DEL) $(LIB_DIR)$S$(LIB_PREFIX)ortools.$L - -$(DEL) $(LIB_DIR)$S$(LIB_PREFIX)*.a - -$(DEL) $(OBJ_DIR)$S*.$O - -$(DEL) $(OBJ_DIR)$Salgorithms$S*.$O - -$(DEL) $(OBJ_DIR)$Sbase$S*.$O - -$(DEL) $(OBJ_DIR)$Sbop$S*.$O - -$(DEL) $(OBJ_DIR)$Sconstraint_solver$S*.$O - -$(DEL) $(OBJ_DIR)$Sdata$S*.$O - -$(DEL) $(OBJ_DIR)$Sflatzinc$S*.$O - -$(DEL) $(OBJ_DIR)$Sglop$S*.$O - -$(DEL) $(OBJ_DIR)$Sgraph$S*.$O - -$(DEL) $(OBJ_DIR)$Slinear_solver$S*.$O - -$(DEL) $(OBJ_DIR)$Slp_data$S*.$O - -$(DEL) $(OBJ_DIR)$Sport$S*.$O - -$(DEL) $(OBJ_DIR)$Ssat$S*.$O - -$(DEL) $(OBJ_DIR)$Sutil$S*.$O - -$(DEL) $(BIN_DIR)$Sfz$E - -$(DEL) $(BIN_DIR)$Sparser_main$E - -$(DEL) $(BIN_DIR)$Ssat_runner$E - -$(DEL) $(CC_SAMPLES) - -$(DEL) $(CC_EXAMPLES) - -$(DEL) $(CC_TESTS) - -$(DEL) $(GEN_PATH)$Sortools$Sbop$S*.pb.* - -$(DEL) $(GEN_PATH)$Sortools$Sconstraint_solver$S*.pb.* - -$(DEL) $(GEN_PATH)$Sortools$Sdata$S*.pb.* - -$(DEL) $(GEN_PATH)$Sortools$Sflatzinc$S*.tab.* - -$(DEL) $(GEN_PATH)$Sortools$Sflatzinc$S*.yy.* - -$(DEL) $(GEN_PATH)$Sortools$Sflatzinc$Sparser.* - -$(DEL) $(GEN_PATH)$Sortools$Sglop$S*.pb.* - -$(DEL) $(GEN_PATH)$Sortools$Sgraph$S*.pb.* - -$(DEL) $(GEN_PATH)$Sortools$Slinear_solver$S*.pb.* - -$(DEL) $(GEN_PATH)$Sortools$Ssat$S*.pb.* - -$(DEL) $(GEN_PATH)$Sortools$Sutil$S*.pb.* - -$(DEL) $(BIN_DIR)$S*.exp - -$(DEL) $(BIN_DIR)$S*.lib - -$(DELREC) $(GEN_PATH)$Sflatzinc$S* - -$(DELREC) $(OBJ_DIR)$Sflatzinc$S* - -$(DELREC) $(TEMP_PACKAGE_CC_DIR) - -$(DEL) $(GEN_PATH)$Sortools$Slinear_solver$Slpi_glop.cc - -.PHONY: clean_compat -clean_compat: - -$(DELREC) $(OR_ROOT)constraint_solver - -$(DELREC) $(OR_ROOT)linear_solver - -$(DELREC) $(OR_ROOT)algorithms - -$(DELREC) $(OR_ROOT)graph - -$(DELREC) $(OR_ROOT)gen - ############### ## INSTALL ## ############### @@ -704,6 +634,130 @@ install_doc: #$(COPY) ortools$Ssat$S*.md "$(DESTDIR)$(prefix)$Sshare$Sdoc$Sortools$Ssat" $(COPY) ortools$Ssat$Sdoc$S*.md "$(DESTDIR)$(prefix)$Sshare$Sdoc$Sortools$Ssat$Sdoc" +####################### +## EXAMPLE ARCHIVE ## +####################### +TEMP_CC_DIR=temp_cpp + +$(TEMP_CC_DIR): + $(MKDIR) $(TEMP_CC_DIR) + +$(TEMP_CC_DIR)/ortools_examples: | $(TEMP_CC_DIR) + $(MKDIR) $(TEMP_CC_DIR)$Sortools_examples + +$(TEMP_CC_DIR)/ortools_examples/examples: | $(TEMP_CC_DIR)/ortools_examples + $(MKDIR) $(TEMP_CC_DIR)$Sortools_examples$Sexamples + +$(TEMP_CC_DIR)/ortools_examples/examples/cpp: | $(TEMP_CC_DIR)/ortools_examples/examples + $(MKDIR) $(TEMP_CC_DIR)$Sortools_examples$Sexamples$Scpp + +$(TEMP_CC_DIR)/ortools_examples/examples/data: | $(TEMP_CC_DIR)/ortools_examples/examples + $(MKDIR) $(TEMP_CC_DIR)$Sortools_examples$Sexamples$Sdata + +.PHONY: cc_examples_archive # Build stand-alone C++ examples archive file for redistribution. +cc_examples_archive: | \ + $(TEMP_CC_DIR)/ortools_examples/examples/cpp \ + $(TEMP_CC_DIR)/ortools_examples/examples/data + $(COPY) $(CC_EX_PATH)$S*.h $(CC_EX_PATH)$S*.cc $(TEMP_CC_DIR)$Sortools_examples$Sexamples$Scpp +# $(COPY) $(CONTRIB_EX_PATH)$S*.cc $(TEMP_CC_DIR)$Sortools_examples$Sexamples$Scpp + $(COPY) ortools$Salgorithms$Ssamples$S*.cc $(TEMP_CC_DIR)$Sortools_examples$Sexamples$Scpp + $(COPY) ortools$Sgraph$Ssamples$S*.cc $(TEMP_CC_DIR)$Sortools_examples$Sexamples$Scpp + $(COPY) ortools$Slinear_solver$Ssamples$S*.cc $(TEMP_CC_DIR)$Sortools_examples$Sexamples$Scpp + $(COPY) ortools$Sconstraint_solver$Ssamples$S*.cc $(TEMP_CC_DIR)$Sortools_examples$Sexamples$Scpp + $(COPY) ortools$Ssat$Ssamples$S*.cc $(TEMP_CC_DIR)$Sortools_examples$Sexamples$Scpp + $(COPY) tools$SREADME.examples.cpp $(TEMP_CC_DIR)$Sortools_examples$SREADME.md + $(COPY) LICENSE-2.0.txt $(TEMP_CC_DIR)$Sortools_examples +ifeq ($(SYSTEM),win) + cd $(TEMP_CC_DIR)\ortools_examples \ + && ..\..\$(TAR) -C ..\.. -c -v \ + --exclude *svn* --exclude *roadef* --exclude *vector_packing* \ + examples\data | ..\..\$(TAR) xvm + cd $(TEMP_CC_DIR) \ + && ..\$(ZIP) \ + -r ..\or-tools_cpp_examples_v$(OR_TOOLS_VERSION).zip \ + ortools_examples +else + cd $(TEMP_CC_DIR)/ortools_examples \ + && tar -C ../.. -c -v \ + --exclude *svn* --exclude *roadef* --exclude *vector_packing* \ + examples/data | tar xvm + cd $(TEMP_CC_DIR) \ + && tar -c -v -z --no-same-owner \ + -f ../or-tools_cpp_examples$(PYPI_OS)_v$(OR_TOOLS_VERSION).tar.gz \ + ortools_examples +endif + -$(DELREC) $(TEMP_CC_DIR)$Sortools_examples + +################ +## Cleaning ## +################ +CC_SAMPLES := $(wildcard ortools/*/samples/*.cc) +CC_SAMPLES := $(notdir $(CC_SAMPLES)) +CC_SAMPLES := $(addsuffix $E, $(addprefix $(BIN_DIR)$S, $(basename $(CC_SAMPLES)))) + +CC_EXAMPLES := $(wildcard $(CC_EX_DIR)/*.cc) +CC_EXAMPLES := $(notdir $(CC_EXAMPLES)) +CC_EXAMPLES := $(addsuffix $E, $(addprefix $(BIN_DIR)$S, $(basename $(CC_EXAMPLES)))) + +CC_TESTS := $(wildcard $(TEST_DIR)/*.cc) +CC_TESTS := $(notdir $(CC_TESTS)) +CC_TESTS := $(addsuffix $E, $(addprefix $(BIN_DIR)$S, $(basename $(CC_TESTS)))) + +.PHONY: clean_cc # Clean C++ output from previous build. +clean_cc: + -$(DEL) $(LIB_DIR)$S$(LIB_PREFIX)cvrptw_lib.$L + -$(DEL) $(LIB_DIR)$S$(LIB_PREFIX)dimacs.$L + -$(DEL) $(LIB_DIR)$S$(LIB_PREFIX)fap.$L + -$(DEL) $(LIB_DIR)$S$(LIB_PREFIX)fz.$L + -$(DEL) $(LIB_DIR)$S$(LIB_PREFIX)ortools.$L + -$(DEL) $(LIB_DIR)$S$(LIB_PREFIX)*.a + -$(DEL) $(OBJ_DIR)$S*.$O + -$(DEL) $(OBJ_DIR)$Salgorithms$S*.$O + -$(DEL) $(OBJ_DIR)$Sbase$S*.$O + -$(DEL) $(OBJ_DIR)$Sbop$S*.$O + -$(DEL) $(OBJ_DIR)$Sconstraint_solver$S*.$O + -$(DEL) $(OBJ_DIR)$Sdata$S*.$O + -$(DEL) $(OBJ_DIR)$Sflatzinc$S*.$O + -$(DEL) $(OBJ_DIR)$Sglop$S*.$O + -$(DEL) $(OBJ_DIR)$Sgraph$S*.$O + -$(DEL) $(OBJ_DIR)$Slinear_solver$S*.$O + -$(DEL) $(OBJ_DIR)$Slp_data$S*.$O + -$(DEL) $(OBJ_DIR)$Sport$S*.$O + -$(DEL) $(OBJ_DIR)$Ssat$S*.$O + -$(DEL) $(OBJ_DIR)$Sutil$S*.$O + -$(DEL) $(BIN_DIR)$Sfz$E + -$(DEL) $(BIN_DIR)$Sparser_main$E + -$(DEL) $(BIN_DIR)$Ssat_runner$E + -$(DEL) $(CC_SAMPLES) + -$(DEL) $(CC_EXAMPLES) + -$(DEL) $(CC_TESTS) + -$(DEL) $(GEN_PATH)$Sortools$Sbop$S*.pb.* + -$(DEL) $(GEN_PATH)$Sortools$Sconstraint_solver$S*.pb.* + -$(DEL) $(GEN_PATH)$Sortools$Sdata$S*.pb.* + -$(DEL) $(GEN_PATH)$Sortools$Sflatzinc$S*.tab.* + -$(DEL) $(GEN_PATH)$Sortools$Sflatzinc$S*.yy.* + -$(DEL) $(GEN_PATH)$Sortools$Sflatzinc$Sparser.* + -$(DEL) $(GEN_PATH)$Sortools$Sglop$S*.pb.* + -$(DEL) $(GEN_PATH)$Sortools$Sgraph$S*.pb.* + -$(DEL) $(GEN_PATH)$Sortools$Slinear_solver$S*.pb.* + -$(DEL) $(GEN_PATH)$Sortools$Ssat$S*.pb.* + -$(DEL) $(GEN_PATH)$Sortools$Sutil$S*.pb.* + -$(DEL) $(BIN_DIR)$S*.exp + -$(DEL) $(BIN_DIR)$S*.lib + -$(DELREC) $(GEN_PATH)$Sflatzinc$S* + -$(DELREC) $(OBJ_DIR)$Sflatzinc$S* + -$(DELREC) $(TEMP_PACKAGE_CC_DIR) + -$(DELREC) $(TEMP_CC_DIR) + -$(DEL) $(GEN_PATH)$Sortools$Slinear_solver$Slpi_glop.cc + +.PHONY: clean_compat +clean_compat: + -$(DELREC) $(OR_ROOT)constraint_solver + -$(DELREC) $(OR_ROOT)linear_solver + -$(DELREC) $(OR_ROOT)algorithms + -$(DELREC) $(OR_ROOT)graph + -$(DELREC) $(OR_ROOT)gen + ############# ## DEBUG ## ############# diff --git a/makefiles/Makefile.dotnet.mk b/makefiles/Makefile.dotnet.mk index b6f808f02f..3bdafbd9f2 100644 --- a/makefiles/Makefile.dotnet.mk +++ b/makefiles/Makefile.dotnet.mk @@ -24,9 +24,6 @@ ifndef DOTNET_BIN HAS_DOTNET = endif -# List Examples and Tests -TEMP_DOTNET_DIR=temp_dotnet - # Main target .PHONY: dotnet # Build all .NET OrTools packages .PHONY: test_dotnet # Run all test_dotnet_* targets @@ -49,9 +46,6 @@ endif $(PACKAGE_DIR): $(MKDIR_P) $(PACKAGE_DIR) -$(TEMP_DOTNET_DIR): - $(MKDIR_P) $(TEMP_DOTNET_DIR) - # Detect RuntimeIDentifier ifeq ($(OS),Windows) DOTNET_RUNTIME_IDENTIFIER=win-x64 @@ -721,6 +715,121 @@ test_dotnet_pimpl: \ test_dotnet_contrib \ test_dotnet_dotnet +####################### +## EXAMPLE ARCHIVE ## +####################### +TEMP_DOTNET_DIR=temp_dotnet + +$(TEMP_DOTNET_DIR): + $(MKDIR) $(TEMP_DOTNET_DIR) + +$(TEMP_DOTNET_DIR)/ortools_examples: | $(TEMP_DOTNET_DIR) + $(MKDIR) $(TEMP_DOTNET_DIR)$Sortools_examples + +$(TEMP_DOTNET_DIR)/ortools_examples/examples: | $(TEMP_DOTNET_DIR)/ortools_examples + $(MKDIR) $(TEMP_DOTNET_DIR)$Sortools_examples$Sexamples + +$(TEMP_DOTNET_DIR)/ortools_examples/examples/dotnet: | $(TEMP_DOTNET_DIR)/ortools_examples/examples + $(MKDIR) $(TEMP_DOTNET_DIR)$Sortools_examples$Sexamples$Sdotnet + +$(TEMP_DOTNET_DIR)/ortools_examples/examples/data: | $(TEMP_DOTNET_DIR)/ortools_examples/examples + $(MKDIR) $(TEMP_DOTNET_DIR)$Sortools_examples$Sexamples$Sdata + +define dotnet-sample-archive +$$(TEMP_DOTNET_DIR)/ortools_examples/examples/dotnet/%.csproj: \ + ortools/$1/samples/%.cs \ + | $$(TEMP_DOTNET_DIR)/ortools_examples/examples/dotnet + $$(COPY) $$(SRC_DIR)$$Sortools$$S$1$$Ssamples$$S$$*.cs \ + $$(TEMP_DOTNET_DIR)$$Sortools_examples$$Sexamples$$Sdotnet + $$(COPY) ortools$$Sdotnet$$SSample.csproj.in \ + $$(TEMP_DOTNET_DIR)$$Sortools_examples$$Sexamples$$Sdotnet$$S$$*.csproj + $(SED) -i -e 's/@PROJECT_VERSION@/$$(OR_TOOLS_VERSION)/' \ + $$(TEMP_DOTNET_DIR)$$Sortools_examples$$Sexamples$$Sdotnet$$S$$*.csproj + $(SED) -i -e 's/@DOTNET_PACKAGES_DIR@/./' \ + $$(TEMP_DOTNET_DIR)$$Sortools_examples$$Sexamples$$Sdotnet$$S$$*.csproj + $(SED) -i -e 's/@DOTNET_PROJECT@/$$(DOTNET_ORTOOLS_ASSEMBLY_NAME)/' \ + $$(TEMP_DOTNET_DIR)$$Sortools_examples$$Sexamples$$Sdotnet$$S$$*.csproj + $(SED) -i -e 's/@SAMPLE_NAME@/$$*/' \ + $$(TEMP_DOTNET_DIR)$$Sortools_examples$$Sexamples$$Sdotnet$$S$$*.csproj + $(SED) -i -e 's/@FILE_NAME@/$$*.cs/' \ + $$(TEMP_DOTNET_DIR)$$Sortools_examples$$Sexamples$$Sdotnet$$S$$*.csproj + +endef + +DOTNET_SAMPLES := algorithms graph constraint_solver linear_solver sat +$(foreach sample,$(DOTNET_SAMPLES),$(eval $(call dotnet-sample-archive,$(sample)))) + +define dotnet-example-archive +$$(TEMP_DOTNET_DIR)/ortools_examples/examples/dotnet/%.csproj: \ + examples/$1/%.cs \ + | $$(TEMP_DOTNET_DIR)/ortools_examples/examples/dotnet + $$(COPY) $$(SRC_DIR)$$Sexamples$$S$1$$S$$*.cs \ + $$(TEMP_DOTNET_DIR)$$Sortools_examples$$Sexamples$$Sdotnet + $$(COPY) ortools$$Sdotnet$$SSample.csproj.in \ + $$(TEMP_DOTNET_DIR)$$Sortools_examples$$Sexamples$$Sdotnet$$S$$*.csproj + $(SED) -i -e 's/@PROJECT_VERSION@/$$(OR_TOOLS_VERSION)/' \ + $$(TEMP_DOTNET_DIR)$$Sortools_examples$$Sexamples$$Sdotnet$$S$$*.csproj + $(SED) -i -e 's/@DOTNET_PACKAGES_DIR@/./' \ + $$(TEMP_DOTNET_DIR)$$Sortools_examples$$Sexamples$$Sdotnet$$S$$*.csproj + $(SED) -i -e 's/@DOTNET_PROJECT@/$$(DOTNET_ORTOOLS_ASSEMBLY_NAME)/' \ + $$(TEMP_DOTNET_DIR)$$Sortools_examples$$Sexamples$$Sdotnet$$S$$*.csproj + $(SED) -i -e 's/@SAMPLE_NAME@/$$*/' \ + $$(TEMP_DOTNET_DIR)$$Sortools_examples$$Sexamples$$Sdotnet$$S$$*.csproj + $(SED) -i -e 's/@FILE_NAME@/$$*.cs/' \ + $$(TEMP_DOTNET_DIR)$$Sortools_examples$$Sexamples$$Sdotnet$$S$$*.csproj + +endef + +DOTNET_EXAMPLES := contrib dotnet +$(foreach example,$(DOTNET_EXAMPLES),$(eval $(call dotnet-example-archive,$(example)))) + +SAMPLE_DOTNET_FILES = \ + $(addsuffix proj,$(addprefix $(TEMP_DOTNET_DIR)/ortools_examples/examples/dotnet/,$(notdir $(wildcard ortools/*/samples/*.cs)))) + +EXAMPLE_DOTNET_FILES = \ + $(addsuffix proj,$(addprefix $(TEMP_DOTNET_DIR)/ortools_examples/examples/dotnet/,$(notdir $(wildcard examples/contrib/*.cs)))) \ + $(addsuffix proj,$(addprefix $(TEMP_DOTNET_DIR)/ortools_examples/examples/dotnet/,$(notdir $(wildcard examples/dotnet/*.cs)))) + +.PHONY: dotnet_examples_archive # Build stand-alone C++ examples archive file for redistribution. +dotnet_examples_archive: \ + $(SAMPLE_DOTNET_FILES) \ + $(EXAMPLE_DOTNET_FILES) \ + | $(TEMP_DOTNET_DIR)/ortools_examples/examples/dotnet + -$(COPY) tools$SREADME.examples.dotnet $(TEMP_DOTNET_DIR)$Sortools_examples$SREADME.md + $(COPY) LICENSE-2.0.txt $(TEMP_DOTNET_DIR)$Sortools_examples +ifeq ($(SYSTEM),win) + cd $(TEMP_DOTNET_DIR) \ + && ..\$(ZIP) \ + -r ..\or-tools_dotnet_examples_v$(OR_TOOLS_VERSION).zip \ + ortools_examples +else + cd $(TEMP_DOTNET_DIR) \ + && tar -c -v -z --no-same-owner \ + -f ../or-tools_dotnet_examples_v$(OR_TOOLS_VERSION).tar.gz \ + ortools_examples +endif + -$(DELREC) $(TEMP_DOTNET_DIR)$Sortools_examples + +###################### +## Nuget artifact ## +###################### +.PHONY: nuget_archive # Build .Net "Google.OrTools" Nuget Package +nuget_archive: dotnet | $(TEMP_DOTNET_DIR) + "$(DOTNET_BIN)" publish $(DOTNET_BUILD_ARGS) --no-build --no-dependencies --no-restore -f netstandard2.0 \ + -o "..$S..$S..$S$(TEMP_DOTNET_DIR)" \ + ortools$Sdotnet$S$(DOTNET_ORTOOLS_ASSEMBLY_NAME)$S$(DOTNET_ORTOOLS_ASSEMBLY_NAME).csproj + "$(DOTNET_BIN)" publish $(DOTNET_BUILD_ARGS) --no-build --no-dependencies --no-restore -f netstandard2.0 \ + -o "..$S..$S..$S$(TEMP_DOTNET_DIR)" \ + ortools$Sdotnet$S$(FSHARP_ORTOOLS_ASSEMBLY_NAME)$S$(FSHARP_ORTOOLS_ASSEMBLY_NAME).fsproj + "$(DOTNET_BIN)" pack -c Release $(NUGET_PACK_ARGS) --no-build \ + -o "..$S..$S..$S$(BIN_DIR)" \ + ortools$Sdotnet + +.PHONY: nuget_upload # Upload Nuget Package +nuget_upload: nuget_archive + @echo Uploading Nuget package for "netstandard2.0". + $(warning Not Implemented) + ################ ## Cleaning ## ################ @@ -779,26 +888,6 @@ clean_dotnet: -$(DELREC) $(TEMP_DOTNET_DIR) -@"$(DOTNET_BIN)" nuget locals all --clear -###################### -## Nuget artifact ## -###################### -.PHONY: nuget_archive # Build .Net "Google.OrTools" Nuget Package -nuget_archive: dotnet | $(TEMP_DOTNET_DIR) - "$(DOTNET_BIN)" publish $(DOTNET_BUILD_ARGS) --no-build --no-dependencies --no-restore -f netstandard2.0 \ - -o "..$S..$S..$S$(TEMP_DOTNET_DIR)" \ - ortools$Sdotnet$S$(DOTNET_ORTOOLS_ASSEMBLY_NAME)$S$(DOTNET_ORTOOLS_ASSEMBLY_NAME).csproj - "$(DOTNET_BIN)" publish $(DOTNET_BUILD_ARGS) --no-build --no-dependencies --no-restore -f netstandard2.0 \ - -o "..$S..$S..$S$(TEMP_DOTNET_DIR)" \ - ortools$Sdotnet$S$(FSHARP_ORTOOLS_ASSEMBLY_NAME)$S$(FSHARP_ORTOOLS_ASSEMBLY_NAME).fsproj - "$(DOTNET_BIN)" pack -c Release $(NUGET_PACK_ARGS) --no-build \ - -o "..$S..$S..$S$(BIN_DIR)" \ - ortools$Sdotnet - -.PHONY: nuget_upload # Upload Nuget Package -nuget_upload: nuget_archive - @echo Uploading Nuget package for "netstandard2.0". - $(warning Not Implemented) - ############# ## DEBUG ## ############# diff --git a/makefiles/Makefile.java.mk b/makefiles/Makefile.java.mk index bb31c1222c..b826900b16 100644 --- a/makefiles/Makefile.java.mk +++ b/makefiles/Makefile.java.mk @@ -349,37 +349,17 @@ run: build cd $(SOURCE_PROJECT_PATH) && "$(MVN_BIN)" exec:java $(ARGS) endif -################ -## Cleaning ## -################ -.PHONY: clean_java # Clean Java output from previous build. -clean_java: - -$(DELREC) $(GEN_PATH)$Sjava - -$(DELREC) $(OBJ_DIR)$Scom - -$(DEL) $(CLASS_DIR)$S*.class - -$(DELREC) $(CLASS_DIR) - -$(DEL) $(GEN_PATH)$Sortools$Salgorithms$S*java_wrap* - -$(DEL) $(GEN_PATH)$Sortools$Sconstraint_solver$S*java_wrap* - -$(DEL) $(GEN_PATH)$Sortools$Sgraph$S*java_wrap* - -$(DEL) $(GEN_PATH)$Sortools$Slinear_solver$S*java_wrap* - -$(DEL) $(GEN_PATH)$Sortools$Ssat$S*java_wrap* - -$(DEL) $(GEN_PATH)$Sortools$Sutil$S*java_wrap* - -$(DEL) $(OBJ_DIR)$Sswig$S*_java_wrap.$O - -$(DEL) $(LIB_DIR)$S$(LIB_PREFIX)jni*.$(JNI_LIB_EXT) - -$(DEL) $(LIB_DIR)$S*.jar - -$(DELREC) temp_java - ################### ## Maven package ## ################### $(TEMP_JAVA_DIR): - -$(MKDIR) $(TEMP_JAVA_DIR) + $(MKDIR) $(TEMP_JAVA_DIR) $(TEMP_JAVA_DIR)/$(JAVA_ORTOOLS_PROJECT): | $(TEMP_JAVA_DIR) - -$(MKDIR) $(TEMP_JAVA_DIR)$S$(JAVA_ORTOOLS_PROJECT) + $(MKDIR) $(TEMP_JAVA_DIR)$S$(JAVA_ORTOOLS_PROJECT) $(TEMP_JAVA_DIR)/$(JAVA_ORTOOLS_NATIVE_PROJECT): | $(TEMP_JAVA_DIR) - -$(MKDIR) $(TEMP_JAVA_DIR)$S$(JAVA_ORTOOLS_NATIVE_PROJECT) + $(MKDIR) $(TEMP_JAVA_DIR)$S$(JAVA_ORTOOLS_NATIVE_PROJECT) $(TEMP_JAVA_DIR)/$(JAVA_ORTOOLS_NATIVE_PROJECT)/pom.xml: \ ${SRC_DIR}/ortools/java/pom-native.xml.in \ @@ -455,7 +435,10 @@ endif JAVA_SRC_DIR := src/main/java/com/google/ortools JAVA_SRC_PATH := $(subst /,$S,$(JAVA_SRC_DIR)) -SAMPLES := algorithms graph constraint_solver linear_solver sat +JAVA_TEST_DIR := src/test/java/com/google/ortools +JAVA_TEST_PATH := $(subst /,$S,$(JAVA_TEST_DIR)) + +JAVA_SAMPLES := algorithms graph constraint_solver linear_solver sat define java-sample-target $$(TEMP_JAVA_DIR)/$1: | $$(TEMP_JAVA_DIR) @@ -499,9 +482,9 @@ rjava_%: \ endef -$(foreach sample,$(SAMPLES),$(eval $(call java-sample-target,$(sample),$(subst _,,$(sample))))) +$(foreach sample,$(JAVA_SAMPLES),$(eval $(call java-sample-target,$(sample),$(subst _,,$(sample))))) -EXAMPLES := contrib java +JAVA_EXAMPLES := contrib java define java-example-target $$(TEMP_JAVA_DIR)/$1: | $$(TEMP_JAVA_DIR) @@ -545,11 +528,9 @@ rjava_%: \ endef -$(foreach example,$(EXAMPLES),$(eval $(call java-example-target,$(example)))) +$(foreach example,$(JAVA_EXAMPLES),$(eval $(call java-example-target,$(example)))) - -JAVA_TEST_DIR := src/test/java/com/google/ortools -JAVA_TEST_PATH := $(subst /,$S,$(JAVA_TEST_DIR)) +JAVA_TESTS := tests $(TEMP_JAVA_DIR)/tests: | $(TEMP_JAVA_DIR) -$(MKDIR) $(TEMP_JAVA_DIR)$Stests @@ -732,6 +713,100 @@ test_java_pimpl: \ test_java_contrib \ test_java_java +####################### +## EXAMPLE ARCHIVE ## +####################### +TEMP_JAVA_DIR=temp_java + +$(TEMP_JAVA_DIR)/ortools_examples: | $(TEMP_JAVA_DIR) + $(MKDIR) $(TEMP_JAVA_DIR)$Sortools_examples + +$(TEMP_JAVA_DIR)/ortools_examples/examples: | $(TEMP_JAVA_DIR)/ortools_examples + $(MKDIR) $(TEMP_JAVA_DIR)$Sortools_examples$Sexamples + +$(TEMP_JAVA_DIR)/ortools_examples/examples/java: | $(TEMP_JAVA_DIR)/ortools_examples/examples + $(MKDIR) $(TEMP_JAVA_DIR)$Sortools_examples$Sexamples$Sjava + +$(TEMP_JAVA_DIR)/ortools_examples/examples/data: | $(TEMP_JAVA_DIR)/ortools_examples/examples + $(MKDIR) $(TEMP_JAVA_DIR)$Sortools_examples$Sexamples$Sdata + +define java-sample-archive +$$(TEMP_JAVA_DIR)/ortools_examples/examples/java/%/pom.xml: \ + $$(TEMP_JAVA_DIR)/$1/%/pom.xml \ + ortools/$1/samples/%.java \ + | $$(TEMP_JAVA_DIR)/ortools_examples/examples/java + -$$(MKDIR_P) $$(TEMP_JAVA_DIR)$$Sortools_examples$$Sexamples$$Sjava$$S$$*$$S$$(JAVA_SRC_PATH) + $$(COPY) $$(SRC_DIR)$$Sortools$$S$1$$Ssamples$$S$$*.java \ + $$(TEMP_JAVA_DIR)$$Sortools_examples$$Sexamples$$Sjava$$S$$*$$S$$(JAVA_SRC_PATH) + $$(COPY) $$(TEMP_JAVA_DIR)$$S$1$$S$$*$$Spom.xml \ + $$(TEMP_JAVA_DIR)$$Sortools_examples$$Sexamples$$Sjava$$S$$* + +endef + +$(foreach sample,$(JAVA_SAMPLES),$(eval $(call java-sample-archive,$(sample)))) + +define java-example-archive +$$(TEMP_JAVA_DIR)/ortools_examples/examples/java/%/pom.xml: \ + $$(TEMP_JAVA_DIR)/$1/%/pom.xml \ + examples/$1/%.java \ + | $$(TEMP_JAVA_DIR)/ortools_examples/examples/java + -$$(MKDIR_P) $$(TEMP_JAVA_DIR)$$Sortools_examples$$Sexamples$$Sjava$$S$$*$$S$$(JAVA_SRC_PATH) + $$(COPY) $$(SRC_DIR)$$Sexamples$$S$1$$S$$*.java \ + $$(TEMP_JAVA_DIR)$$Sortools_examples$$Sexamples$$Sjava$$S$$*$$S$$(JAVA_SRC_PATH) + $$(COPY) $$(TEMP_JAVA_DIR)$$S$1$$S$$*$$Spom.xml \ + $$(TEMP_JAVA_DIR)$$Sortools_examples$$Sexamples$$Sjava$$S$$* + +endef + +$(foreach example,$(JAVA_EXAMPLES),$(eval $(call java-example-archive,$(example)))) + +SAMPLE_JAVA_FILES = \ + $(addsuffix /pom.xml,$(addprefix $(TEMP_JAVA_DIR)/ortools_examples/examples/java/,$(basename $(notdir $(wildcard ortools/*/samples/*.java))))) + +EXAMPLE_JAVA_FILES = \ + $(addsuffix /pom.xml,$(addprefix $(TEMP_JAVA_DIR)/ortools_examples/examples/java/,$(basename $(notdir $(wildcard examples/contrib/*.java))))) \ + $(addsuffix /pom.xml,$(addprefix $(TEMP_JAVA_DIR)/ortools_examples/examples/java/,$(basename $(notdir $(wildcard examples/java/*.java))))) + +.PHONY: java_examples_archive # Build stand-alone C++ examples archive file for redistribution. +java_examples_archive: \ + $(SAMPLE_JAVA_FILES) \ + $(EXAMPLE_JAVA_FILES) \ + | $(TEMP_JAVA_DIR)/ortools_examples/examples/java + $(COPY) tools$SREADME.examples.java $(TEMP_JAVA_DIR)$Sortools_examples$SREADME.md + $(COPY) LICENSE-2.0.txt $(TEMP_JAVA_DIR)$Sortools_examples +ifeq ($(SYSTEM),win) + cd $(TEMP_JAVA_DIR) \ + && ..\$(ZIP) \ + -r ..\or-tools_java_examples_v$(OR_TOOLS_VERSION).zip \ + ortools_examples +else + cd $(TEMP_JAVA_DIR) \ + && tar -c -v -z --no-same-owner \ + -f ../or-tools_java_examples_v$(OR_TOOLS_VERSION).tar.gz \ + ortools_examples +endif + -$(DELREC) $(TEMP_JAVA_DIR)$Sortools_examples + +################ +## Cleaning ## +################ +.PHONY: clean_java # Clean Java output from previous build. +clean_java: + -$(DELREC) $(GEN_PATH)$Sjava + -$(DELREC) $(OBJ_DIR)$Scom + -$(DEL) $(CLASS_DIR)$S*.class + -$(DELREC) $(CLASS_DIR) + -$(DEL) $(GEN_PATH)$Sortools$Salgorithms$S*java_wrap* + -$(DEL) $(GEN_PATH)$Sortools$Sconstraint_solver$S*java_wrap* + -$(DEL) $(GEN_PATH)$Sortools$Sgraph$S*java_wrap* + -$(DEL) $(GEN_PATH)$Sortools$Slinear_solver$S*java_wrap* + -$(DEL) $(GEN_PATH)$Sortools$Ssat$S*java_wrap* + -$(DEL) $(GEN_PATH)$Sortools$Sutil$S*java_wrap* + -$(DEL) $(OBJ_DIR)$Sswig$S*_java_wrap.$O + -$(DEL) $(LIB_DIR)$S$(LIB_PREFIX)jni*.$(JNI_LIB_EXT) + -$(DEL) $(LIB_DIR)$S*.jar + -$(DELREC) $(TEMP_DATA_DIR) + ############# ## DEBUG ## ############# diff --git a/makefiles/Makefile.python.mk b/makefiles/Makefile.python.mk index 4d6eb6de36..ca3a3c2503 100644 --- a/makefiles/Makefile.python.mk +++ b/makefiles/Makefile.python.mk @@ -811,69 +811,6 @@ test_python_pimpl: \ test_python_contrib \ test_python_python -################ -## Cleaning ## -################ -.PHONY: clean_python # Clean Python output from previous build. -clean_python: - -$(DEL) $(GEN_PATH)$Sortools$S__init__.py - -$(DEL) ortools$S*.pyc - -$(DELREC) ortools$S__pycache__ - -$(DEL) $(GEN_PATH)$Sortools$Salgorithms$S*.py - -$(DEL) $(GEN_PATH)$Sortools$Salgorithms$S*.pyc - -$(DELREC) $(GEN_PATH)$Sortools$Salgorithms$S__pycache__ - -$(DEL) ortools$Salgorithms$S*.pyc - -$(DELREC) ortools$Salgorithms$S__pycache__ - -$(DEL) $(GEN_PATH)$Sortools$Salgorithms$S*_python_wrap.* - -$(DEL) $(GEN_PATH)$Sortools$Salgorithms$S_pywrap* - -$(DEL) $(GEN_PATH)$Sortools$Sgraph$S*.py - -$(DEL) $(GEN_PATH)$Sortools$Sgraph$S*.pyc - -$(DELREC) $(GEN_PATH)$Sortools$Sgraph$S__pycache__ - -$(DEL) ortools$Sgraph$S*.pyc - -$(DELREC) ortools$Sgraph$S__pycache__ - -$(DEL) $(GEN_PATH)$Sortools$Sgraph$S*_python_wrap.* - -$(DEL) $(GEN_PATH)$Sortools$Sgraph$S_pywrap* - -$(DEL) $(GEN_PATH)$Sortools$Sconstraint_solver$S*.py - -$(DEL) $(GEN_PATH)$Sortools$Sconstraint_solver$S*.pyc - -$(DELREC) $(GEN_PATH)$Sortools$Sconstraint_solver$S__pycache__ - -$(DEL) ortools$Sconstraint_solver$S*.pyc - -$(DELREC) ortools$Sconstraint_solver$S__pycache__ - -$(DEL) $(GEN_PATH)$Sortools$Sconstraint_solver$S*_python_wrap.* - -$(DEL) $(GEN_PATH)$Sortools$Sconstraint_solver$S_pywrap* - -$(DEL) $(GEN_PATH)$Sortools$Slinear_solver$S*.py - -$(DEL) $(GEN_PATH)$Sortools$Slinear_solver$S*.pyc - -$(DELREC) $(GEN_PATH)$Sortools$Slinear_solver$S__pycache__ - -$(DEL) ortools$Slinear_solver$S*.pyc - -$(DELREC) ortools$Slinear_solver$S__pycache__ - -$(DEL) $(GEN_PATH)$Sortools$Slinear_solver$S*_python_wrap.* - -$(DEL) $(GEN_PATH)$Sortools$Slinear_solver$S_pywrap* - -$(DEL) $(GEN_PATH)$Sortools$Ssat$S*.py - -$(DEL) $(GEN_PATH)$Sortools$Ssat$S*.pyc - -$(DELREC) $(GEN_PATH)$Sortools$Ssat$S__pycache__ - -$(DEL) ortools$Ssat$S*.pyc - -$(DELREC) ortools$Ssat$S__pycache__ - -$(DEL) ortools$Ssat$Spython$S*.pyc - -$(DELREC) ortools$Ssat$Spython$S__pycache__ - -$(DEL) $(GEN_PATH)$Sortools$Ssat$S*_python_wrap.* - -$(DEL) $(GEN_PATH)$Sortools$Ssat$S_pywrap* - -$(DEL) $(GEN_PATH)$Sortools$Sdata$S*.py - -$(DEL) $(GEN_PATH)$Sortools$Sdata$S*.pyc - -$(DELREC) $(GEN_PATH)$Sortools$Sdata$S__pycache__ - -$(DEL) ortools$Sdata$S*.pyc - -$(DELREC) ortools$Sdata$S__pycache__ - -$(DEL) $(GEN_PATH)$Sortools$Sdata$S*_python_wrap.* - -$(DEL) $(GEN_PATH)$Sortools$Sdata$S_pywrap* - -$(DEL) $(GEN_PATH)$Sortools$Sutil$S*.py - -$(DEL) $(GEN_PATH)$Sortools$Sutil$S*.pyc - -$(DELREC) $(GEN_PATH)$Sortools$Sutil$S__pycache__ - -$(DEL) ortools$Sutil$S*.pyc - -$(DELREC) ortools$Sutil$S__pycache__ - -$(DEL) $(GEN_PATH)$Sortools$Sutil$S*_python_wrap.* - -$(DEL) $(GEN_PATH)$Sortools$Sutil$S_* - -$(DEL) $(LIB_DIR)$S_*.$(SWIG_PYTHON_LIB_SUFFIX) - -$(DEL) $(OBJ_DIR)$Sswig$S*python_wrap.$O - -$(DELREC) temp_python* - ##################### ## Pypi artifact ## ##################### @@ -900,13 +837,13 @@ MISSING_PYPI_FILES = \ $(PYPI_ARCHIVE_LIBS) $(PYPI_ARCHIVE_TEMP_DIR): - -$(MKDIR) $(PYPI_ARCHIVE_TEMP_DIR) + $(MKDIR) $(PYPI_ARCHIVE_TEMP_DIR) $(PYPI_ARCHIVE_TEMP_DIR)/ortools: | $(PYPI_ARCHIVE_TEMP_DIR) - -$(MKDIR) $(PYPI_ARCHIVE_TEMP_DIR)$Sortools + $(MKDIR) $(PYPI_ARCHIVE_TEMP_DIR)$Sortools $(PYPI_ARCHIVE_TEMP_DIR)/ortools/ortools: | $(PYPI_ARCHIVE_TEMP_DIR)/ortools - -$(MKDIR) $(PYPI_ARCHIVE_TEMP_DIR)$Sortools$Sortools + $(MKDIR) $(PYPI_ARCHIVE_TEMP_DIR)$Sortools$Sortools $(PYPI_ARCHIVE_TEMP_DIR)/ortools/README.txt: tools/README.pypi | $(PYPI_ARCHIVE_TEMP_DIR)/ortools $(COPY) tools$SREADME.pypi $(PYPI_ARCHIVE_TEMP_DIR)$Sortools$SREADME.txt @@ -1063,26 +1000,44 @@ install_python: pypi_archive uninstall_python: "$(PYTHON_EXECUTABLE)" -m pip uninstall ortools +####################### +## EXAMPLE ARCHIVE ## +####################### TEMP_PYTHON_DIR=temp_python +$(TEMP_PYTHON_DIR): + $(MKDIR) $(TEMP_PYTHON_DIR) + +$(TEMP_PYTHON_DIR)/ortools_examples: | $(TEMP_PYTHON_DIR) + $(MKDIR) $(TEMP_PYTHON_DIR)$Sortools_examples + +$(TEMP_PYTHON_DIR)/ortools_examples/examples: | $(TEMP_PYTHON_DIR)/ortools_examples + $(MKDIR) $(TEMP_PYTHON_DIR)$Sortools_examples$Sexamples + +$(TEMP_PYTHON_DIR)/ortools_examples/examples/python: | $(TEMP_PYTHON_DIR)/ortools_examples/examples + $(MKDIR) $(TEMP_PYTHON_DIR)$Sortools_examples$Sexamples$Spython + +$(TEMP_PYTHON_DIR)/ortools_examples/examples/data: | $(TEMP_PYTHON_DIR)/ortools_examples/examples + $(MKDIR) $(TEMP_PYTHON_DIR)$Sortools_examples$Sexamples$Sdata + +$(TEMP_PYTHON_DIR)/ortools_examples/examples/notebook: | $(TEMP_PYTHON_DIR)/ortools_examples/examples + $(MKDIR) $(TEMP_PYTHON_DIR)$Sortools_examples$Sexamples$Snotebook + .PHONY: python_examples_archive # Build stand-alone Python examples archive file for redistribution. -python_examples_archive: - -$(DELREC) $(TEMP_PYTHON_DIR) - -$(MKDIR) $(TEMP_PYTHON_DIR) - -$(MKDIR) $(TEMP_PYTHON_DIR)$Sortools_examples - -$(MKDIR) $(TEMP_PYTHON_DIR)$Sortools_examples$Sexamples - -$(MKDIR) $(TEMP_PYTHON_DIR)$Sortools_examples$Sexamples$Spython - -$(MKDIR) $(TEMP_PYTHON_DIR)$Sortools_examples$Sexamples$Snotebook - -$(MKDIR) $(TEMP_PYTHON_DIR)$Sortools_examples$Sexamples$Sdata - -$(COPY) $(PYTHON_EX_PATH)$S*.py $(TEMP_PYTHON_DIR)$Sortools_examples$Sexamples$Spython - -$(COPY) ortools$Salgorithms$Ssamples$S*.py $(TEMP_PYTHON_DIR)$Sortools_examples$Sexamples$Spython - -$(COPY) ortools$Sgraph$Ssamples$S*.py $(TEMP_PYTHON_DIR)$Sortools_examples$Sexamples$Spython - -$(COPY) ortools$Slinear_solver$Ssamples$S*.py $(TEMP_PYTHON_DIR)$Sortools_examples$Sexamples$Spython - -$(COPY) ortools$Srouting$Ssamples$S*.py $(TEMP_PYTHON_DIR)$Sortools_examples$Sexamples$Spython - -$(COPY) ortools$Ssat$Ssamples$S*.py $(TEMP_PYTHON_DIR)$Sortools_examples$Sexamples$Spython - -$(COPY) examples$Snotebook$S*.ipynb $(TEMP_PYTHON_DIR)$Sortools_examples$Sexamples$Snotebook - -$(COPY) examples$Snotebook$S*.md $(TEMP_PYTHON_DIR)$Sortools_examples$Sexamples$Snotebook - -$(COPY) tools$SREADME.examples.python $(TEMP_PYTHON_DIR)$Sortools_examples$SREADME.md +python_examples_archive: | \ + $(TEMP_PYTHON_DIR)/ortools_examples/examples/python \ + $(TEMP_PYTHON_DIR)/ortools_examples/examples/notebook \ + $(TEMP_PYTHON_DIR)/ortools_examples/examples/data + $(COPY) $(PYTHON_EX_PATH)$S*.py $(TEMP_PYTHON_DIR)$Sortools_examples$Sexamples$Spython + $(COPY) $(CONTRIB_EX_PATH)$S*.py $(TEMP_PYTHON_DIR)$Sortools_examples$Sexamples$Spython + $(COPY) ortools$Salgorithms$Ssamples$S*.py $(TEMP_PYTHON_DIR)$Sortools_examples$Sexamples$Spython + $(COPY) ortools$Sgraph$Ssamples$S*.py $(TEMP_PYTHON_DIR)$Sortools_examples$Sexamples$Spython + $(COPY) ortools$Slinear_solver$Ssamples$S*.py $(TEMP_PYTHON_DIR)$Sortools_examples$Sexamples$Spython + $(COPY) ortools$Sconstraint_solver$Ssamples$S*.py $(TEMP_PYTHON_DIR)$Sortools_examples$Sexamples$Spython + $(COPY) ortools$Ssat$Ssamples$S*.py $(TEMP_PYTHON_DIR)$Sortools_examples$Sexamples$Spython + $(COPY) examples$Snotebook$S*.ipynb $(TEMP_PYTHON_DIR)$Sortools_examples$Sexamples$Snotebook + $(COPY) examples$Snotebook$S*.md $(TEMP_PYTHON_DIR)$Sortools_examples$Sexamples$Snotebook + $(COPY) tools$SREADME.examples.python $(TEMP_PYTHON_DIR)$Sortools_examples$SREADME.md $(COPY) LICENSE-2.0.txt $(TEMP_PYTHON_DIR)$Sortools_examples ifeq ($(SYSTEM),win) cd $(TEMP_PYTHON_DIR)\ortools_examples \ @@ -1103,7 +1058,70 @@ else -f ../or-tools_python_examples$(PYPI_OS)_v$(OR_TOOLS_VERSION).tar.gz \ ortools_examples endif - -$(DELREC) $(TEMP_PYTHON_DIR) + -$(DELREC) $(TEMP_PYTHON_DIR)$Sortools_examples + +################ +## Cleaning ## +################ +.PHONY: clean_python # Clean Python output from previous build. +clean_python: + -$(DEL) $(GEN_PATH)$Sortools$S__init__.py + -$(DEL) ortools$S*.pyc + -$(DELREC) ortools$S__pycache__ + -$(DEL) $(GEN_PATH)$Sortools$Salgorithms$S*.py + -$(DEL) $(GEN_PATH)$Sortools$Salgorithms$S*.pyc + -$(DELREC) $(GEN_PATH)$Sortools$Salgorithms$S__pycache__ + -$(DEL) ortools$Salgorithms$S*.pyc + -$(DELREC) ortools$Salgorithms$S__pycache__ + -$(DEL) $(GEN_PATH)$Sortools$Salgorithms$S*_python_wrap.* + -$(DEL) $(GEN_PATH)$Sortools$Salgorithms$S_pywrap* + -$(DEL) $(GEN_PATH)$Sortools$Sgraph$S*.py + -$(DEL) $(GEN_PATH)$Sortools$Sgraph$S*.pyc + -$(DELREC) $(GEN_PATH)$Sortools$Sgraph$S__pycache__ + -$(DEL) ortools$Sgraph$S*.pyc + -$(DELREC) ortools$Sgraph$S__pycache__ + -$(DEL) $(GEN_PATH)$Sortools$Sgraph$S*_python_wrap.* + -$(DEL) $(GEN_PATH)$Sortools$Sgraph$S_pywrap* + -$(DEL) $(GEN_PATH)$Sortools$Sconstraint_solver$S*.py + -$(DEL) $(GEN_PATH)$Sortools$Sconstraint_solver$S*.pyc + -$(DELREC) $(GEN_PATH)$Sortools$Sconstraint_solver$S__pycache__ + -$(DEL) ortools$Sconstraint_solver$S*.pyc + -$(DELREC) ortools$Sconstraint_solver$S__pycache__ + -$(DEL) $(GEN_PATH)$Sortools$Sconstraint_solver$S*_python_wrap.* + -$(DEL) $(GEN_PATH)$Sortools$Sconstraint_solver$S_pywrap* + -$(DEL) $(GEN_PATH)$Sortools$Slinear_solver$S*.py + -$(DEL) $(GEN_PATH)$Sortools$Slinear_solver$S*.pyc + -$(DELREC) $(GEN_PATH)$Sortools$Slinear_solver$S__pycache__ + -$(DEL) ortools$Slinear_solver$S*.pyc + -$(DELREC) ortools$Slinear_solver$S__pycache__ + -$(DEL) $(GEN_PATH)$Sortools$Slinear_solver$S*_python_wrap.* + -$(DEL) $(GEN_PATH)$Sortools$Slinear_solver$S_pywrap* + -$(DEL) $(GEN_PATH)$Sortools$Ssat$S*.py + -$(DEL) $(GEN_PATH)$Sortools$Ssat$S*.pyc + -$(DELREC) $(GEN_PATH)$Sortools$Ssat$S__pycache__ + -$(DEL) ortools$Ssat$S*.pyc + -$(DELREC) ortools$Ssat$S__pycache__ + -$(DEL) ortools$Ssat$Spython$S*.pyc + -$(DELREC) ortools$Ssat$Spython$S__pycache__ + -$(DEL) $(GEN_PATH)$Sortools$Ssat$S*_python_wrap.* + -$(DEL) $(GEN_PATH)$Sortools$Ssat$S_pywrap* + -$(DEL) $(GEN_PATH)$Sortools$Sdata$S*.py + -$(DEL) $(GEN_PATH)$Sortools$Sdata$S*.pyc + -$(DELREC) $(GEN_PATH)$Sortools$Sdata$S__pycache__ + -$(DEL) ortools$Sdata$S*.pyc + -$(DELREC) ortools$Sdata$S__pycache__ + -$(DEL) $(GEN_PATH)$Sortools$Sdata$S*_python_wrap.* + -$(DEL) $(GEN_PATH)$Sortools$Sdata$S_pywrap* + -$(DEL) $(GEN_PATH)$Sortools$Sutil$S*.py + -$(DEL) $(GEN_PATH)$Sortools$Sutil$S*.pyc + -$(DELREC) $(GEN_PATH)$Sortools$Sutil$S__pycache__ + -$(DEL) ortools$Sutil$S*.pyc + -$(DELREC) ortools$Sutil$S__pycache__ + -$(DEL) $(GEN_PATH)$Sortools$Sutil$S*_python_wrap.* + -$(DEL) $(GEN_PATH)$Sortools$Sutil$S_* + -$(DEL) $(LIB_DIR)$S_*.$(SWIG_PYTHON_LIB_SUFFIX) + -$(DEL) $(OBJ_DIR)$Sswig$S*python_wrap.$O + -$(DELREC) temp_python* ############# ## DEBUG ## diff --git a/tools/README.examples.cpp b/tools/README.examples.cpp new file mode 100644 index 0000000000..58c0dc470f --- /dev/null +++ b/tools/README.examples.cpp @@ -0,0 +1,24 @@ +# Introduction +This file describes how to use OR-Tools in C++ with the binary archives. + +OR-Tools online documetation is +[here](https://developers.google.com/optimization) + +Full installation instructions are located +[here](https://developers.google.com/optimization/install/cpp/) + +These modules have been tested under: + - Ubuntu 20.04 LTS (64 bit). + - CentOS 8 (64 bit). + - Debian 10 (64 bit). + - MacOS Catalina with Xcode 10.x (64 bit). + - Microsoft Windows with Visual Studio 2019 (64-bit) + +Upon decompressing the archive, you will get the following structure: +``` +or-tools/ + [LICENSE-2.0.txt](LICENSE-2.0.txt) <- Apache License + [README.md](README.md) <- This file + [examples/data/](examples/data) <- Data for the examples + [examples/cpp](examples/cpp) <- C++ examples +``` diff --git a/tools/README.examples.dotnet b/tools/README.examples.dotnet new file mode 100644 index 0000000000..2463c4b8e3 --- /dev/null +++ b/tools/README.examples.dotnet @@ -0,0 +1,34 @@ +# Introduction +This file describes how to use OR-Tools in .Net with the binary archives. + +OR-Tools online documetation is +[here](https://developers.google.com/optimization) + +Full installation instructions are located +[here](https://developers.google.com/optimization/install/dotnet/) + +These modules have been tested under: + - Ubuntu 20.04 LTS (64 bit). + - CentOS 8 (64 bit). + - Debian 10 (64 bit). + - MacOS Catalina with Xcode 10.x (64 bit). + - Microsoft Windows with Visual Studio 2019 (64-bit) + +Upon decompressing the archive, you will get the following structure: +``` +or-tools/ + [LICENSE-2.0.txt](LICENSE-2.0.txt) <- Apache License + [README.md](README.md) <- This file + [examples/data/](examples/data) <- Data for the examples + [examples/dotnet](examples/dotnet) <- .Net examples +``` + +To build an example, open the folder in the command prompt and type the following commands: +```sh +dotnet build +``` + +To run an example, open the folder in the command prompt and type the following commands: +```sh +dotnet run +``` diff --git a/tools/README.examples.java b/tools/README.examples.java new file mode 100644 index 0000000000..6a6dc6126c --- /dev/null +++ b/tools/README.examples.java @@ -0,0 +1,24 @@ +# Introduction +This file describes how to use OR-Tools in Java with the binary archives. + +OR-Tools online documetation is +[here](https://developers.google.com/optimization) + +Full installation instructions are located +[here](https://developers.google.com/optimization/install/java/) + +These modules have been tested under: + - Ubuntu 20.04 LTS (64 bit). + - CentOS 8 (64 bit). + - Debian 10 (64 bit). + - MacOS Catalina with Xcode 10.x (64 bit). + - Microsoft Windows with Visual Studio 2019 (64-bit) + +Upon decompressing the archive, you will get the following structure: +``` +or-tools/ + [LICENSE-2.0.txt](LICENSE-2.0.txt) <- Apache License + [README.md](README.md) <- This file + [examples/data/](examples/data) <- Data for the examples + [examples/java](examples/java) <- Java examples +``` diff --git a/tools/README.netstandard b/tools/README.netstandard index 6a05626462..a66c594529 100644 --- a/tools/README.netstandard +++ b/tools/README.netstandard @@ -16,14 +16,14 @@ or-tools/ bin/ <- Directory containing assemblies, native libraries, and nuget package To build an example, open the folder in the command prompt and type the following commands: - -dotnet restore +```sh dotnet build +``` To run an example, open the folder in the command prompt and type the following commands: - -dotnet restore +```sh dotnet run +``` * Using NuGet Package Directly