aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile34
1 files changed, 34 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..d814302
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,34 @@
+.PHONY: all configure build ark cross soul run install clean distclean
+
+BUILD_DIR ?= build
+BUILD_TYPE ?= Debug
+PREFIX ?= $(HOME)/.local
+
+all: build
+
+configure:
+ cmake -S . -B $(BUILD_DIR) -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) $(CMAKE_ARGS)
+
+build: configure
+ cmake --build $(BUILD_DIR)
+
+ark: configure
+ cmake --build $(BUILD_DIR) --target ark
+
+cross: configure
+ cmake --build $(BUILD_DIR) --target cross
+
+soul: configure
+ cmake --build $(BUILD_DIR) --target soul_build
+
+run: configure
+ cmake --build $(BUILD_DIR) --target run
+
+install: configure
+ cmake --install $(BUILD_DIR) --prefix $(PREFIX)
+
+clean:
+ cmake --build $(BUILD_DIR) --target clean
+
+distclean:
+ rm -rf $(BUILD_DIR)