Files
ortools-clone/Makefile

110 lines
3.1 KiB
Makefile
Raw Normal View History

2011-08-11 18:43:41 +00:00
# Top level declarations
2018-03-02 13:41:00 +01:00
.PHONY: help
help: help_all
.PHONY: all
all: build_all
.PHONY: test
test: test_all
.PHONY: clean
clean: clean_all
.PHONY: detect
detect: detect_all
2011-08-11 18:43:41 +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 15:10:00 +00:00
# $(OR_TOOLS_TOP)/ or $(OR_TOOLS_TOP)\\ depending on the platform. It
# contains the trailing separator if not empty.
#
# INC_DIR 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.
ifeq ($(OR_TOOLS_TOP),)
2012-03-28 00:26:48 +00:00
OR_ROOT =
else
2017-01-12 17:51:41 +01:00
ifeq ($(OS), Windows_NT)
OR_ROOT = $(OR_TOOLS_TOP)\\
else
2017-01-12 17:51:41 +01:00
OR_ROOT = $(OR_TOOLS_TOP)/
endif
endif
# Delete all implicit rules to speed up makefile
.SUFFIXES:
# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =
# Keep all intermediate files
# ToDo: try to remove it later
.SECONDARY:
2017-06-07 10:26:41 +02:00
# Read version.
include $(OR_ROOT)Version.txt
# We try to detect the platform.
include $(OR_ROOT)makefiles/Makefile.port.mk
OR_ROOT_FULL=$(OR_TOOLS_TOP)
# Load local variables
include $(OR_ROOT)Makefile.local
2010-09-15 12:42:33 +00:00
# Change the file extensions to increase diff tool friendliness.
2011-04-06 16:26:35 +00:00
# Then include specific system commands and definitions
include $(OR_ROOT)makefiles/Makefile.$(SYSTEM).mk
2010-09-15 12:42:33 +00:00
# Rules to fetch and build third party dependencies.
include $(OR_ROOT)makefiles/Makefile.third_party.$(SYSTEM).mk
2011-07-14 23:27:43 +00:00
# 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.dotnet.mk
2016-07-01 13:21:14 +02:00
include $(OR_ROOT)makefiles/Makefile.archive.mk
2011-04-06 13:37:23 +00:00
# Finally include user makefile if it exists
-include $(OR_ROOT)Makefile.user
2016-06-27 15:30:24 +02:00
2018-03-02 13:41:00 +01:00
.PHONY: help_usage
help_usage:
@echo Use one of the following targets:
@echo help, help_all: Print this help.
@echo all: Build OR-Tools for all available languages \(need a call to \"make third_party\" first\).
@echo test, test_all: Test OR-Tools for all available languages.
@echo clean, clean_all: Clean output from previous build for all available languages \(won\'t clean third party\).
@echo detect, detect_all: Show variables used to build OR-Tools for all available languages.
ifeq ($(SYSTEM),win)
2018-03-06 15:03:19 +01:00
@echo off & echo(
else
@echo
endif
2018-03-02 13:41:00 +01:00
.PHONY: help_all
help_all: help_usage help_third_party help_cc help_python help_java help_dotnet help_archive
2018-03-02 13:41:00 +01:00
.PHONY: build_all
2018-04-26 20:41:34 -07:00
build_all: cc python java dotnet
2018-03-02 13:41:00 +01:00
@echo Or-tools have been built for $(BUILT_LANGUAGES)
.PHONY: test_all
2018-04-26 20:41:34 -07:00
test_all: test_cc test_python test_java test_dotnet
2018-03-02 13:41:00 +01:00
@echo Or-tools have been built and tested for $(BUILT_LANGUAGES)
.PHONY: clean_all
clean_all: clean_cc clean_python clean_java clean_dotnet clean_compat clean_archive
-$(DELREC) $(BIN_DIR)
-$(DELREC) $(LIB_DIR)
-$(DELREC) $(OBJ_DIR)
2018-07-04 09:05:22 +02:00
-$(DELREC) $(GEN_PATH)
2018-03-02 13:41:00 +01:00
@echo Or-tools have been cleaned for $(BUILT_LANGUAGES)
.PHONY: detect_all
detect_all: detect_port detect_third_party detect_cc detect_python detect_java detect_dotnet detect_archive
2018-02-23 14:55:24 +01:00
print-% : ; @echo $* = $($*)