-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (32 loc) · 833 Bytes
/
Makefile
File metadata and controls
42 lines (32 loc) · 833 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Select Build Type( Debug | Release )
BUILD_TYPE := Debug
# Generator( "Unix Makefiles" | ... )
GENERATOR := "Unix Makefiles"
# Export Compile Commands
EXPORT_COMPILE_CMD=ON
# Top CMakeLists.txt Path
HOME_DIR := .
# CMake Build System Path
BUILD_DIR := build
# Config & Build
all: config build
# Generate CMake Build System
config:
cmake -B$(BUILD_DIR) -H$(HOME_DIR) -G $(GENERATOR) -DCMAKE_EXPORT_COMPILE_COMMANDS=$(EXPORT_COMPILE_CMD) -DCMAKE_BUILD_TYPE=$(BUILD_TYPE)
.PHONY : config
# Remove CMake Build System
remove:
cmake -E remove_directory $(BUILD_DIR)
.PHONY : remove
# Build All
build:
cmake --build $(BUILD_DIR)
.PHONY : build
# Clean & Build All
rebuild:
cmake --build $(BUILD_DIR) --clean-first
.PHONY : rebuild
# Clean All
clean:
cmake --build $(BUILD_DIR) --target clean
.PHONY : clean