This repository has been archived on 2021-04-22. You can view files and clone it, but cannot push or open issues/pull-requests.
2020-11-06 15:45:41 +01:00
|
|
|
SRC_DIR = src
|
|
|
|
RELEASE_DIR = build/release
|
|
|
|
DEBUG_DIR = build/debug
|
|
|
|
BINARY = stj
|
2020-11-06 13:03:16 +01:00
|
|
|
|
|
|
|
all: debug
|
|
|
|
.PHONY: all
|
|
|
|
|
|
|
|
|
|
|
|
clean:
|
|
|
|
@ rm -rf build
|
|
|
|
.PHONY: clean
|
|
|
|
|
|
|
|
|
|
|
|
# Release
|
|
|
|
run-release: release
|
2020-11-06 15:45:41 +01:00
|
|
|
@ ./$(RELEASE_DIR)/$(BINARY)
|
2020-11-06 13:03:16 +01:00
|
|
|
.PHONY: run-release
|
|
|
|
|
|
|
|
release: $(RELEASE_DIR)/Makefile
|
|
|
|
@ make -C $(RELEASE_DIR)
|
|
|
|
.PHONY: release
|
|
|
|
|
|
|
|
$(RELEASE_DIR)/Makefile: $(SRC_DIR)/CMakeLists.txt
|
|
|
|
@ cmake -H$(SRC_DIR) -B$(RELEASE_DIR) -DCMAKE_BUILD_TYPE=Release
|
|
|
|
|
|
|
|
clean-release:
|
|
|
|
@ rm -rf build/release
|
|
|
|
.PHONY: clean-release
|
|
|
|
|
|
|
|
|
|
|
|
# Debug
|
|
|
|
run-debug: debug
|
2020-11-06 15:45:41 +01:00
|
|
|
@ ./$(DEBUG_DIR)/$(BINARY)
|
2020-11-06 13:03:16 +01:00
|
|
|
.PHONY: run-debug
|
|
|
|
|
|
|
|
debug: $(DEBUG_DIR)/Makefile
|
|
|
|
@ make -C $(DEBUG_DIR)
|
|
|
|
.PHONY: debug
|
|
|
|
|
|
|
|
$(DEBUG_DIR)/Makefile: $(SRC_DIR)/CMakeLists.txt
|
|
|
|
@ cmake -H$(SRC_DIR) -B$(DEBUG_DIR) -DCMAKE_BUILD_TYPE=Debug
|
|
|
|
|
|
|
|
clean-debug:
|
|
|
|
@ rm -rf build/debug
|
|
|
|
.PHONY: clean-debug
|