make: Sync unix/win recipes
This commit is contained in:
@@ -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 \
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 ##
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user