2016-09-15 08:44:01 +00:00
|
|
|
##
|
2020-04-08 13:34:10 +00:00
|
|
|
# This Makefile is used to drive building of Debug and Release targets of CMake
|
2016-09-15 08:44:01 +00:00
|
|
|
##
|
|
|
|
MAKEFLAGS += -s
|
|
|
|
|
2016-09-18 08:52:03 +00:00
|
|
|
all: release
|
2016-10-22 07:44:37 +00:00
|
|
|
ci: debug release test
|
2016-09-15 08:44:01 +00:00
|
|
|
|
|
|
|
help:
|
2020-04-08 13:34:10 +00:00
|
|
|
@echo " release: Run a release build"
|
|
|
|
@echo " debug: Run a debug build"
|
|
|
|
@echo " lint: Lint check all source-code"
|
|
|
|
@echo " test: Build and run tests"
|
|
|
|
@echo " clean: Clean all build output"
|
|
|
|
@echo "rebuild_cache: Rebuild all CMake caches"
|
2016-09-15 08:44:01 +00:00
|
|
|
|
|
|
|
rebuild_cache: build/Debug build/Release
|
2020-04-08 13:34:10 +00:00
|
|
|
@$(MAKE) -C build/Debug rebuild_cache
|
|
|
|
@$(MAKE) -C build/Release rebuild_cache
|
2016-09-15 08:44:01 +00:00
|
|
|
|
|
|
|
debug: build/Debug
|
2020-04-08 13:34:10 +00:00
|
|
|
@echo "[DEBUG]"
|
|
|
|
@$(MAKE) -C build/Debug
|
2016-09-15 08:44:01 +00:00
|
|
|
|
|
|
|
release: build/Release
|
2020-04-08 13:34:10 +00:00
|
|
|
@echo "[RELEASE]"
|
|
|
|
@$(MAKE) -C build/Release
|
2016-09-15 08:44:01 +00:00
|
|
|
|
2016-09-23 09:54:43 +00:00
|
|
|
package: build/Release
|
2020-04-08 13:34:10 +00:00
|
|
|
@echo "[PACKAGE] Release"
|
|
|
|
@$(MAKE) -C build/Release package
|
2016-09-23 09:54:43 +00:00
|
|
|
|
2016-09-18 08:52:03 +00:00
|
|
|
test: debug
|
2020-04-08 13:34:10 +00:00
|
|
|
@$(MAKE) -C build/Debug test
|
2016-09-15 08:44:01 +00:00
|
|
|
|
|
|
|
build/Debug:
|
2020-04-08 13:34:10 +00:00
|
|
|
@mkdir -p $@
|
|
|
|
@cd $@ && cmake -DCMAKE_BUILD_TYPE=Debug $(CMAKEFLAGS) ../../
|
2016-09-15 08:44:01 +00:00
|
|
|
|
|
|
|
build/Release:
|
2020-04-08 13:34:10 +00:00
|
|
|
@mkdir -p $@
|
|
|
|
@cd $@ && cmake -Wno-dev -DCMAKE_BUILD_TYPE=Release $(CMAKEFLAGS) ../../
|
2016-09-15 08:44:01 +00:00
|
|
|
|
|
|
|
clean:
|
2020-04-08 13:34:10 +00:00
|
|
|
@echo "[CLEAN]"
|
|
|
|
@rm -Rf build
|
2016-09-15 08:44:01 +00:00
|
|
|
|
|
|
|
.PHONY: clean
|