2011-08-11 18:43:41 +00:00
|
|
|
# Top level declarations
|
|
|
|
|
help:
|
|
|
|
|
@echo Please define target:
|
2012-01-20 16:39:15 +00:00
|
|
|
@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"
|
2012-01-10 14:16:39 +00:00
|
|
|
@echo " - tests: test test_cc test_python test_java test_csharp"
|
2012-01-20 16:39:15 +00:00
|
|
|
@echo " - cleaning: clean clean_csharp"
|
2011-08-11 18:43:41 +00:00
|
|
|
|
2012-01-13 10:28:29 +00:00
|
|
|
OR_TOOLS_VERSION = 1.0.0
|
2012-03-28 00:09:22 +00:00
|
|
|
|
|
|
|
|
# OR_ROOT is the minimal prefix to define the root of or-tools, if we
|
|
|
|
|
# are compiling in the or-tools root, it is empty. Otherwise, it is
|
2012-03-28 00:26:48 +00:00
|
|
|
# $(TOP)/ or $(TOP)\\ depending on the platform. It contains the
|
|
|
|
|
# trailing separator if not empty.
|
2012-03-28 00:09:22 +00:00
|
|
|
#
|
|
|
|
|
# OR_ROOT_INC is like OR_ROOT, but with a default of '.' instead of
|
|
|
|
|
# empty. It is used for instance in include directives (-I.).
|
2012-03-28 00:26:48 +00:00
|
|
|
#
|
|
|
|
|
# OR_ROOT_FULL is always the complete path to or-tools. It is useful
|
|
|
|
|
# to store path informations inside libraries for instance.
|
2012-03-27 21:50:20 +00:00
|
|
|
ifeq ($(TOP),)
|
2012-03-28 00:26:48 +00:00
|
|
|
OR_ROOT =
|
|
|
|
|
OR_ROOT_INC = .
|
2012-03-27 21:50:20 +00:00
|
|
|
else
|
2012-03-28 00:09:22 +00:00
|
|
|
ifeq "$(SHELL)" "cmd.exe"
|
2012-03-28 00:26:48 +00:00
|
|
|
OR_ROOT = $(TOP)\\
|
2012-03-28 00:09:22 +00:00
|
|
|
else
|
|
|
|
|
ifeq "$(SHELL)" "sh.exe"
|
2012-03-28 00:26:48 +00:00
|
|
|
OR_ROOT = $(TOP)\\
|
2012-03-28 00:09:22 +00:00
|
|
|
else
|
2012-03-28 00:26:48 +00:00
|
|
|
OR_ROOT = $(TOP)/
|
2012-03-28 00:09:22 +00:00
|
|
|
endif
|
|
|
|
|
endif
|
2012-03-28 00:26:48 +00:00
|
|
|
OR_ROOT_INC = $(TOP)
|
2012-03-27 21:50:20 +00:00
|
|
|
endif
|
2012-01-13 10:28:29 +00:00
|
|
|
|
2012-01-20 14:56:40 +00:00
|
|
|
.PHONY : python cc java csharp
|
|
|
|
|
all: cc java python csharp
|
2012-01-20 16:39:15 +00:00
|
|
|
clean: clean_cc clean_java clean_python clean_csharp
|
2011-08-11 18:43:41 +00:00
|
|
|
|
2011-12-04 20:05:48 +00:00
|
|
|
# First, we try to detect the platform.
|
2012-03-28 00:09:22 +00:00
|
|
|
include $(OR_ROOT)makefiles/Makefile.port
|
2012-03-28 00:26:48 +00:00
|
|
|
OR_ROOT_FULL=$(TOP)
|
2011-12-04 20:05:48 +00:00
|
|
|
|
|
|
|
|
# We include predefined variables
|
2012-03-28 00:09:22 +00:00
|
|
|
include $(OR_ROOT)makefiles/Makefile.def
|
2010-09-15 12:42:33 +00:00
|
|
|
|
2011-04-06 13:37:23 +00:00
|
|
|
# Then we overwrite the local ones if the Makefile.local file exists.
|
2012-03-28 00:09:22 +00:00
|
|
|
-include $(OR_ROOT)Makefile.local
|
2010-09-15 12:42:33 +00:00
|
|
|
|
2011-04-06 16:26:35 +00:00
|
|
|
# Then include specific system commands and definitions
|
2012-03-28 00:09:22 +00:00
|
|
|
include $(OR_ROOT)makefiles/Makefile.$(SYSTEM)
|
2010-09-15 12:42:33 +00:00
|
|
|
|
2011-12-02 16:10:31 +00:00
|
|
|
# Rules to fetch and build third party dependencies.
|
2012-03-28 00:09:22 +00:00
|
|
|
include $(OR_ROOT)makefiles/Makefile.third_party.$(SYSTEM)
|
2011-12-02 16:10:31 +00:00
|
|
|
|
2011-07-14 23:27:43 +00:00
|
|
|
# Include .mk files.
|
2012-03-28 00:09:22 +00:00
|
|
|
include $(OR_ROOT)makefiles/Makefile.cpp.mk
|
|
|
|
|
include $(OR_ROOT)makefiles/Makefile.python.mk
|
|
|
|
|
include $(OR_ROOT)makefiles/Makefile.java.mk
|
|
|
|
|
include $(OR_ROOT)makefiles/Makefile.csharp.mk
|
2011-03-31 08:39:26 +00:00
|
|
|
|
2011-12-14 14:14:47 +00:00
|
|
|
# Include test
|
2012-03-28 00:09:22 +00:00
|
|
|
include $(OR_ROOT)makefiles/Makefile.test.$(SYSTEM)
|
2011-12-14 14:14:47 +00:00
|
|
|
|
2011-04-06 13:37:23 +00:00
|
|
|
# Finally include user makefile if it exists
|
2012-03-28 00:09:22 +00:00
|
|
|
-include $(OR_ROOT)Makefile.user
|