diff --git a/makefiles/Makefile.cpp.mk b/makefiles/Makefile.cpp.mk index 4b29126f92..b2c0ad5560 100644 --- a/makefiles/Makefile.cpp.mk +++ b/makefiles/Makefile.cpp.mk @@ -34,6 +34,8 @@ JOBS ?= 4 # Main target .PHONY: cc # Build C++ OR-Tools library. .PHONY: test_cc # Run all C++ OR-Tools test targets. +.PHONY: fz # Build Flatzinc. +.PHONY: test_fz # Run all Flatzinc test targets. ortools_libs: $(OR_TOOLS_LIBS) ortools-libs: $(OR_TOOLS_LIBS) @@ -54,7 +56,9 @@ test_cc: \ test_cc_contrib \ test_cc_cpp -.PHONY: test_fz +# Now flatzinc is build with cc +fz: cc + test_fz: \ cc \ rfz_golomb \ diff --git a/makefiles/Makefile.dotnet.mk b/makefiles/Makefile.dotnet.mk index 060c709b08..94136ccaaf 100644 --- a/makefiles/Makefile.dotnet.mk +++ b/makefiles/Makefile.dotnet.mk @@ -18,20 +18,14 @@ else @echo endif -# Check for required build tools -ifeq ($(SYSTEM),win) -DOTNET_BIN := $(shell $(WHICH) dotnet 2> NUL) -else # UNIX -DOTNET_BIN := $(shell $(WHICH) dotnet 2> /dev/null) -endif - # All libraries and dependencies TEMP_DOTNET_DIR = temp_dotnet DOTNET_PACKAGE_DIR = temp_dotnet/packages DOTNET_PACKAGE_PATH = $(subst /,$S,$(DOTNET_PACKAGE_DIR)) DOTNET_ORTOOLS_ASSEMBLY_NAME := Google.OrTools -dotnet: $(OR_TOOLS_LIBS) +.PHONY: dotnet # Build .Net OR-Tools library. +dotnet: cc temp_dotnet: mkdir temp_dotnet @@ -622,7 +616,6 @@ detect_dotnet: @echo Relevant info for the dotnet build: @echo BUILD_DOTNET = $(BUILD_DOTNET) @echo DOTNET_BIN = $(DOTNET_BIN) - @echo NUGET_BIN = $(NUGET_BIN) @echo PROTOC = $(PROTOC) @echo DOTNET_SNK = $(DOTNET_SNK) @echo DOTNET_ORTOOLS_SNK = $(DOTNET_ORTOOLS_SNK) diff --git a/makefiles/Makefile.java.mk b/makefiles/Makefile.java.mk index 08c809faf9..51f1ed64fd 100644 --- a/makefiles/Makefile.java.mk +++ b/makefiles/Makefile.java.mk @@ -34,7 +34,7 @@ JAVA_ORTOOLS_PACKAGE := com.google.ortools .PHONY: java_runtime # Build Java OR-Tools runtime. .PHONY: java # Build Java OR-Tools. .PHONY: test_java # Test Java OR-Tools using various examples. -java: $(OR_TOOLS_LIBS) +java: cc # Detect RuntimeIDentifier ifeq ($(OS),Windows) @@ -456,7 +456,7 @@ else endif -$(DELREC) $(TEMP_JAVA_DIR)$Sortools_examples -endif # BUILD_JAVA=ON +endif # BUILD_JAVA=ON ################ ## Cleaning ## diff --git a/makefiles/Makefile.third_party.unix.mk b/makefiles/Makefile.third_party.unix.mk index 181228f104..878ffae70f 100644 --- a/makefiles/Makefile.third_party.unix.mk +++ b/makefiles/Makefile.third_party.unix.mk @@ -5,11 +5,13 @@ help_third_party: @echo # Checks if the user has overwritten default libraries and binaries. +BUILD_TYPE ?= Release USE_COINOR ?= ON USE_SCIP ?= ON USE_GLPK ?= OFF +USE_CPLEX ?= OFF +USE_XPRESS ?= OFF PROTOC ?= $(OR_TOOLS_TOP)/bin/protoc -BUILD_TYPE ?= Release # Main target. .PHONY: third_party # Build OR-Tools Prerequisite @@ -30,6 +32,8 @@ dependencies/Makefile: | dependencies -DUSE_COINOR=$(USE_COINOR) \ -DUSE_SCIP=$(USE_SCIP) \ -DUSE_GLPK=$(USE_GLPK) \ + -DUSE_CPLEX=$(USE_CPLEX) \ + -DUSE_XPRESS=$(USE_XPRESS) \ -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) \ -DCMAKE_INSTALL_PREFIX=$(OR_ROOT_FULL) @@ -47,8 +51,14 @@ clean_third_party: .PHONY: detect_third_party # Show variables used to find third party detect_third_party: @echo Relevant info on third party: + @echo BUILD_TYPE = $(BUILD_TYPE) + @echo USE_GLOP = ON + @echo USE_PDLP = ON @echo USE_COINOR = $(USE_COINOR) @echo USE_SCIP = $(USE_SCIP) + @echo USE_GLPK = $(USE_GLPK) + @echo USE_CPLEX = $(USE_CPLEX) + @echo USE_XPRESS = $(USE_XPRESS) ifdef UNIX_GLPK_DIR @echo UNIX_GLPK_DIR = $(UNIX_GLPK_DIR) @echo GLPK_INC = $(GLPK_INC) diff --git a/makefiles/Makefile.third_party.win.mk b/makefiles/Makefile.third_party.win.mk index 8e32da0834..35b2270415 100644 --- a/makefiles/Makefile.third_party.win.mk +++ b/makefiles/Makefile.third_party.win.mk @@ -5,17 +5,14 @@ help_third_party: @echo off & echo( # Checks if the user has overwritten default libraries and binaries. +BUILD_TYPE ?= Release USE_COINOR ?= ON USE_SCIP ?= ON USE_GLPK ?= OFF +USE_CPLEX ?= OFF +USE_XPRESS ?= OFF PROTOC = "$(OR_TOOLS_TOP)\\bin\\protoc.exe" -# language targets -BUILD_PYTHON ?= OFF -BUILD_JAVA ?= OFF -BUILD_DOTNET ?= OFF -BUILD_TYPE ?= Release - # Main target. dependencies: mkdir dependencies @@ -36,8 +33,10 @@ dependencies/ortools.sln: | dependencies -DUSE_COINOR=$(USE_COINOR) \ -DUSE_SCIP=$(USE_SCIP) \ -DUSE_GLPK=$(USE_GLPK) \ + -DUSE_CPLEX=$(USE_CPLEX) \ + -DUSE_XPRESS=$(USE_XPRESS) \ + -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) \ -DCMAKE_INSTALL_PREFIX=$(OR_ROOT_FULL) \ - -DCMAKE_BUILD_TYPE=Release \ -G $(GENERATOR) .PHONY: clean_third_party @@ -53,8 +52,14 @@ clean_third_party: .PHONY: detect_third_party # Show variables used to find third party detect_third_party: @echo Relevant info on third party: + @echo BUILD_TYPE = $(BUILD_TYPE) + @echo USE_GLOP = ON + @echo USE_PDLP = ON @echo USE_COINOR = $(USE_COINOR) @echo USE_SCIP = $(USE_SCIP) + @echo USE_GLPK = $(USE_GLPK) + @echo USE_CPLEX = $(USE_CPLEX) + @echo USE_XPRESS = $(USE_XPRESS) ifdef WINDOWS_GLPK_DIR @echo WINDOWS_GLPK_DIR = $(WINDOWS_GLPK_DIR) @echo GLPK_INC = $(GLPK_INC) diff --git a/makefiles/Makefile.unix.mk b/makefiles/Makefile.unix.mk index 40d4494dfe..5e939251ed 100644 --- a/makefiles/Makefile.unix.mk +++ b/makefiles/Makefile.unix.mk @@ -197,8 +197,8 @@ BUILD_JAVA = OFF endif BUILD_DOTNET ?= ON -DOTNET := $(shell which dotnet) -ifeq ($(DOTNET),) +DOTNET_BIN := $(shell $(WHICH) dotnet 2> /dev/null) +ifndef DOTNET_BIN BUILD_DOTNET=OFF endif diff --git a/makefiles/Makefile.win.mk b/makefiles/Makefile.win.mk index dcfb8070fb..b536b35941 100644 --- a/makefiles/Makefile.win.mk +++ b/makefiles/Makefile.win.mk @@ -235,8 +235,8 @@ BUILD_JAVA = OFF endif BUILD_DOTNET ?= ON -DOTNET := $(shell $(WHICH) dotnet) -ifeq ($(DOTNET),) +DOTNET_BIN := $(shell $(WHICH) dotnet 2> NUL) +ifndef DOTNET_BIN BUILD_DOTNET=OFF endif