Files
ortools-clone/Makefile
2012-03-28 00:26:48 +00:00

70 lines
2.2 KiB
Makefile

# Top level declarations
help:
@echo Please define target:
@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 clean_csharp"
OR_TOOLS_VERSION = 1.0.0
# 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
# $(TOP)/ or $(TOP)\\ depending on the platform. It contains the
# trailing separator if not empty.
#
# OR_ROOT_INC is like OR_ROOT, but with a default of '.' instead of
# empty. It is used for instance in include directives (-I.).
#
# OR_ROOT_FULL is always the complete path to or-tools. It is useful
# to store path informations inside libraries for instance.
ifeq ($(TOP),)
OR_ROOT =
OR_ROOT_INC = .
else
ifeq "$(SHELL)" "cmd.exe"
OR_ROOT = $(TOP)\\
else
ifeq "$(SHELL)" "sh.exe"
OR_ROOT = $(TOP)\\
else
OR_ROOT = $(TOP)/
endif
endif
OR_ROOT_INC = $(TOP)
endif
.PHONY : python cc java csharp
all: cc java python csharp
clean: clean_cc clean_java clean_python clean_csharp
# First, we try to detect the platform.
include $(OR_ROOT)makefiles/Makefile.port
OR_ROOT_FULL=$(TOP)
# We include predefined variables
include $(OR_ROOT)makefiles/Makefile.def
# Then we overwrite the local ones if the Makefile.local file exists.
-include $(OR_ROOT)Makefile.local
# Then include specific system commands and definitions
include $(OR_ROOT)makefiles/Makefile.$(SYSTEM)
# Rules to fetch and build third party dependencies.
include $(OR_ROOT)makefiles/Makefile.third_party.$(SYSTEM)
# Include .mk files.
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
# Include test
include $(OR_ROOT)makefiles/Makefile.test.$(SYSTEM)
# Finally include user makefile if it exists
-include $(OR_ROOT)Makefile.user