split make and clean targets per language
This commit is contained in:
16
Makefile
16
Makefile
@@ -1,22 +1,18 @@
|
||||
# Top level declarations
|
||||
help:
|
||||
@echo Please define target:
|
||||
@echo " - constraint programming: cplibs cpexe pycp javacp"
|
||||
@echo " - mathematical programming: lplibs lpexe pylp javalp"
|
||||
@echo " - algorithms: algorithmslibs pyalgorithms javaalgorithms"
|
||||
@echo " - graph: graphlibs pygraph javagraph"
|
||||
@echo " - .NET on windows: csharp csharpcp csharplp csharpalgorithms"
|
||||
@echo " csharpgraph csharpexe"
|
||||
@echo " - constraint programming: cplibs cpexe pycp javacp csharpcp csharpexe"
|
||||
@echo " - mathematical programming: lplibs lpexe pylp javalp csharplp"
|
||||
@echo " - algorithms: algorithmslibs pyalgorithms javaalgorithms csharpalgorithms"
|
||||
@echo " - graph: graphlibs pygraph javagraph csharpgraph"
|
||||
@echo " - tests: test test_cc test_python test_java test_csharp"
|
||||
@echo " - cleaning: clean cleancsharp"
|
||||
@echo " - cleaning: clean clean_csharp"
|
||||
|
||||
OR_TOOLS_VERSION = 1.0.0
|
||||
|
||||
.PHONY : python cc java csharp
|
||||
cc: cplibs cpexe algorithmslibs graphlibs lplibs lpexe
|
||||
java: javacp javaalgorithms javagraph javalp
|
||||
python: pycp pyalgorithms pygraph pylp
|
||||
all: cc java python csharp
|
||||
clean: clean_cc clean_java clean_python clean_csharp
|
||||
|
||||
# First, we try to detect the platform.
|
||||
include makefiles/Makefile.port
|
||||
|
||||
@@ -97,6 +97,29 @@ DIMACS_LNK = $(PRE_LIB)dimacs$(POST_LIB)
|
||||
|
||||
# Makefile targets.
|
||||
|
||||
# Main target
|
||||
cc: cplibs cpexe algorithmslibs graphlibs lplibs lpexe
|
||||
|
||||
# Clean target
|
||||
|
||||
clean_cc:
|
||||
-$(DEL) $(LIBPREFIX)base.$(LIBSUFFIX)
|
||||
-$(DEL) $(LIBPREFIX)util.$(LIBSUFFIX)
|
||||
-$(DEL) $(LIBPREFIX)constraint_solver.$(LIBSUFFIX)
|
||||
-$(DEL) $(LIBPREFIX)linear_solver.$(LIBSUFFIX)
|
||||
-$(DEL) $(LIBPREFIX)graph.$(LIBSUFFIX)
|
||||
-$(DEL) $(LIBPREFIX)routing.$(LIBSUFFIX)
|
||||
-$(DEL) $(LIBPREFIX)algorithms.$(LIBSUFFIX)
|
||||
-$(DEL) $(LIBPREFIX)dimacs.$(LIBSUFFIX)
|
||||
-$(DEL) $(LIBPREFIX)shortestpaths.$(LIBSUFFIX)
|
||||
-$(DEL) objs$S*.$O
|
||||
-$(DEL) $(CPBINARIES)
|
||||
-$(DEL) $(LPBINARIES)
|
||||
-$(DEL) gen$Sconstraint_solver$S*.pb.*
|
||||
-$(DEL) gen$Slinear_solver$S*.pb.*
|
||||
-$(DEL) *.exp
|
||||
|
||||
# Individual targets.
|
||||
algorithmslibs: $(ALGORITHMS_DEPS)
|
||||
|
||||
cpexe: $(CPBINARIES)
|
||||
@@ -111,36 +134,6 @@ graphlibs: $(GRAPH_DEPS)
|
||||
|
||||
dimacslibs: $(DIMACS_LIBS)
|
||||
|
||||
# Clean target.
|
||||
|
||||
clean:
|
||||
-$(DEL) *.$(LIBSUFFIX)
|
||||
-$(DEL) objs$S*.$O
|
||||
-$(DEL) $(CPBINARIES)
|
||||
-$(DEL) $(LPBINARIES)
|
||||
-$(DEL) gen$Salgorithms$S*wrap*
|
||||
-$(DEL) gen$Scom$Sgoogle$Sortools$Sconstraintsolver$S*.java
|
||||
-$(DEL) gen$Scom$Sgoogle$Sortools$Sgraph$S*.java
|
||||
-$(DEL) gen$Scom$Sgoogle$Sortools$Sknapsacksolver$S*.java
|
||||
-$(DEL) gen$Scom$Sgoogle$Sortools$Slinearsolver$S*.java
|
||||
-$(DEL) gen$Sconstraint_solver$S*.pb.*
|
||||
-$(DEL) gen$Sconstraint_solver$S*wrap*
|
||||
-$(DEL) gen$Sgraph$S*wrap*
|
||||
-$(DEL) gen$Slinear_solver$S*.pb.*
|
||||
-$(DEL) gen$Slinear_solver$S*wrap*
|
||||
-$(DEL) objs$Scom$Sgoogle$Sortools$Sconstraintsolver$S*.class
|
||||
-$(DEL) objs$Scom$Sgoogle$Sortools$Sgraph$S*.class
|
||||
-$(DEL) objs$Scom$Sgoogle$Sortools$Sknapsacksolver$S*.class
|
||||
-$(DEL) objs$Scom$Sgoogle$Sortools$Slinearsolver$S*.class
|
||||
-$(DEL) *.$(SHAREDLIBEXT)
|
||||
-$(DEL) *.$(JNILIBEXT)
|
||||
-$(DEL) *.jar
|
||||
-$(DEL) *.pdb
|
||||
-$(DEL) *.exp
|
||||
-$(DEL) cs*.exe
|
||||
-$(DEL) Google.*.netmodule
|
||||
-$(DEL) Google.*.lib
|
||||
|
||||
# Constraint Solver Lib.
|
||||
|
||||
CONSTRAINT_SOLVER_LIB_OS = \
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
# ---------- CSharp support using SWIG ----------
|
||||
|
||||
# csharp
|
||||
|
||||
csharp: csharpcp csharplp csharpalgorithms csharpgraph
|
||||
|
||||
CSHARPEXE = \
|
||||
cslinearprogramming.exe \
|
||||
csintegerprogramming.exe \
|
||||
@@ -13,11 +8,14 @@ CSHARPEXE = \
|
||||
|
||||
csharpexe: $(CSHARPEXE)
|
||||
|
||||
# clearcsharp
|
||||
# Main target.
|
||||
csharp: csharpcp csharplp csharpalgorithms csharpgraph csharpexe
|
||||
|
||||
cleancsharp:
|
||||
# Clean target.
|
||||
clean_csharp:
|
||||
-$(DEL) $(LIBPREFIX)Google.OrTools.*.$(SHAREDLIBEXT)
|
||||
-$(DEL) Google.OrTools.*.dll
|
||||
-$(DEL) Google.OrTools.*.mdb
|
||||
-$(DEL) $(LIBPREFIX)Google.OrTools.*.lib
|
||||
-$(DEL) $(LIBPREFIX)Google.OrTools.*.pdb
|
||||
-$(DEL) $(LIBPREFIX)Google.OrTools.*.exp
|
||||
|
||||
@@ -1,3 +1,24 @@
|
||||
# Main target
|
||||
java: javacp javaalgorithms javagraph javalp
|
||||
|
||||
# Clean target
|
||||
clean_java:
|
||||
-$(DEL) $(LIBPREFIX)jni*.$(JNILIBEXT)
|
||||
-$(DEL) *.jar
|
||||
-$(DEL) gen$Salgorithms$S*java_wrap*
|
||||
-$(DEL) gen$Scom$Sgoogle$Sortools$Sconstraintsolver$S*.java
|
||||
-$(DEL) gen$Scom$Sgoogle$Sortools$Sgraph$S*.java
|
||||
-$(DEL) gen$Scom$Sgoogle$Sortools$Sknapsacksolver$S*.java
|
||||
-$(DEL) gen$Scom$Sgoogle$Sortools$Slinearsolver$S*.java
|
||||
-$(DEL) gen$Sconstraint_solver$S*java_wrap*
|
||||
-$(DEL) gen$Sgraph$S*java_wrap*
|
||||
-$(DEL) gen$Slinear_solver$S*java_wrap*
|
||||
-$(DEL) objs$Scom$Sgoogle$Sortools$Sconstraintsolver$S*.class
|
||||
-$(DEL) objs$Scom$Sgoogle$Sortools$Sgraph$S*.class
|
||||
-$(DEL) objs$Scom$Sgoogle$Sortools$Sknapsacksolver$S*.class
|
||||
-$(DEL) objs$Scom$Sgoogle$Sortools$Slinearsolver$S*.class
|
||||
-$(DEL) objs$S*java_wrap.$O
|
||||
|
||||
# ---------- Java support using SWIG ----------
|
||||
|
||||
# javacp
|
||||
|
||||
@@ -1,7 +1,22 @@
|
||||
# Python support using SWIG
|
||||
|
||||
# pywrapknapsack_solver
|
||||
# Main target
|
||||
python: pycp pyalgorithms pygraph pylp
|
||||
|
||||
# Clean target
|
||||
clean_python:
|
||||
-$(DEL) gen$Salgorithms$S*python_wrap*
|
||||
-$(DEL) gen$Sconstraint_solver$S*python_wrap*
|
||||
-$(DEL) gen$Sgraph$S*python_wrap*
|
||||
-$(DEL) gen$Slinear_solver$S*python_wrap*
|
||||
-$(DEL) gen$Salgorithms$S*.py
|
||||
-$(DEL) gen$Sconstraint_solver$S*.py
|
||||
-$(DEL) gen$Sgraph$S*.py
|
||||
-$(DEL) gen$Slinear_solver$S*.py
|
||||
-$(DEL) _pywrap*.$(SHAREDLIBEXT)
|
||||
-$(DEL) objs$S*python_wrap.$O
|
||||
|
||||
# pywrapknapsack_solver
|
||||
pyalgorithms: _pywrapknapsack_solver.$(SHAREDLIBEXT) gen/algorithms/pywrapknapsack_solver.py
|
||||
|
||||
gen/algorithms/pywrapknapsack_solver.py: algorithms/knapsack_solver.swig algorithms/knapsack_solver.h base/base.swig
|
||||
@@ -17,8 +32,8 @@ _pywrapknapsack_solver.$(SHAREDLIBEXT): objs/knapsack_solver_python_wrap.$O $(AL
|
||||
ifeq "$(SYSTEM)" "win"
|
||||
copy _pywrapknapsack_solver.dll gen\\algorithms\\_pywrapknapsack_solver.pyd
|
||||
endif
|
||||
# pywrapgraph
|
||||
|
||||
# pywrapgraph
|
||||
pygraph: _pywrapgraph.$(SHAREDLIBEXT) gen/graph/pywrapgraph.py
|
||||
|
||||
gen/graph/pywrapgraph.py: graph/graph.swig graph/min_cost_flow.h graph/max_flow.h graph/ebert_graph.h base/base.swig
|
||||
|
||||
Reference in New Issue
Block a user