From f93f73cdd3c7473e358b18c6f6add5f4d34ba5d6 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sun, 15 Jun 2025 12:47:33 +0800 Subject: init --- Makefile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b8a8022 --- /dev/null +++ b/Makefile @@ -0,0 +1,27 @@ +PREFIX ?= /usr/local + +stub: + @echo "Use 'make release' or 'make debug' to build the project." + +release: + cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:STRING=${PREFIX} -S . -B ./build + cmake --build ./build --config Release --target all -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF` + +debug: + cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_INSTALL_PREFIX:STRING=${PREFIX} -S . -B ./build + cmake --build ./build --config Debug --target all -j`nproc 2>/dev/null || getconf NPROCESSORS_CONF` + +clean: + rm -rf build + +all: + $(MAKE) clean + $(MAKE) release + +install: + cmake --install ./build + +uninstall: + xargs rm < ./build/install_manifest.txt + +.PHONY: stub release debug clean all install uninstall format -- cgit v1.2.3