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
|
|
|
##
|
2020-04-19 23:28:29 +00:00
|
|
|
MAKEFLAGS += -s
|
2020-04-19 12:18:32 +00:00
|
|
|
|
|
|
|
# additional flags for cmake, e.g. install path -DCMAKE_INSTALL_PREFIX=$(HOME)/.local
|
|
|
|
CMAKEFLAGS +=
|
2016-09-15 08:44:01 +00:00
|
|
|
|
2016-09-18 08:52:03 +00:00
|
|
|
all: release
|
2020-04-21 12:49:25 +00:00
|
|
|
ci: debug release test
|
2016-09-15 08:44:01 +00:00
|
|
|
|
|
|
|
help:
|
2020-04-08 13:34:10 +00:00
|
|
|
@echo " debug: Run a debug build"
|
2020-04-13 13:02:43 +00:00
|
|
|
@echo " release: Run a release build"
|
2020-04-19 12:18:32 +00:00
|
|
|
@echo " install: Install release build"
|
2020-04-25 20:34:18 +00:00
|
|
|
@echo " uninstall: Uninstall release build"
|
2020-04-19 12:18:32 +00:00
|
|
|
@echo " package: Package release build"
|
2020-04-08 13:34:10 +00:00
|
|
|
@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
|
|
|
|
2020-04-19 12:18:32 +00:00
|
|
|
install: build/Release
|
|
|
|
@echo "[INSTALL] Release"
|
|
|
|
@$(MAKE) -C build/Release install
|
|
|
|
|
2020-04-25 20:34:18 +00:00
|
|
|
uninstall: build/Release
|
|
|
|
@echo "[UNINSTALL] Release"
|
|
|
|
@$(MAKE) -C build/Release uninstall
|
|
|
|
|
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-24 13:01:28 +00:00
|
|
|
@echo "[TEST]"
|
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 $@
|
2020-04-19 23:28:29 +00:00
|
|
|
@cd $@ && cmake -DCMAKE_BUILD_TYPE=Release $(CMAKEFLAGS) -Wno-dev ../../
|
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
|