feat: Add Debug and Release modes and change clean methods in Makefile

This commit is contained in:
coderloff 2024-04-23 21:29:55 +04:00
parent 87784c2cf5
commit 82857f41d0

View File

@ -1,10 +1,19 @@
BUILD_DIR = build
all: build
RM += -r
all: debug
release:
cmake -S . -B $(BUILD_DIR) -DCMAKE_BUILD_TYPE=Release
cmake --build $(BUILD_DIR) -j8
debug:
cmake -S . -B $(BUILD_DIR) -DCMAKE_BUILD_TYPE=Debug
cmake --build $(BUILD_DIR) -j8
build:
cmake -S ./ -B $(BUILD_DIR)
cd $(BUILD_DIR) && make
clean:
rm -rf $(BUILD_DIR)
cmake --build $(BUILD_DIR) --target clean
clean-all:
$(RM) $(BUILD_DIR)