You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
494 B
23 lines
494 B
BUILD_DIR := build
|
|
|
|
.PHONY: all configure build clean run
|
|
|
|
all: build
|
|
|
|
configure:
|
|
cmake -S . -B $(BUILD_DIR) -G Ninja \
|
|
-DCMAKE_BUILD_TYPE=Debug \
|
|
-DCMAKE_C_COMPILER=clang \
|
|
-DCMAKE_CXX_COMPILER=clang++
|
|
-DBUILD_CLI_VIS=1
|
|
|
|
build: configure
|
|
cmake --build $(BUILD_DIR)
|
|
@# Symlink compile_commands.json to root so clangd picks it up
|
|
@ln -sf $(BUILD_DIR)/compile_commands.json compile_commands.json
|
|
|
|
run: build
|
|
./$(BUILD_DIR)/myapp
|
|
|
|
clean:
|
|
rm -rf $(BUILD_DIR) compile_commands.json
|
|
|