-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
45 lines (33 loc) · 886 Bytes
/
makefile
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
43
44
45
.PHONY: help init init_dev build test list format run generate
BUILD=cmake --build build
help:
@echo " Usage: make [target]"
@echo " Targets: Arguments: Description:"
@echo " init Initialize the project"
@echo " build Build the project"
@echo " test filter= Run the tests"
@echo " list List the tests"
@echo " format Format the source code"
@echo " run file= Run the program"
init:
@rm -rf build
@cmake -S . -B build -DDEV=$(dev)
@$(MAKE) build
build:
@$(BUILD)
test:
@$(MAKE) build 1>/dev/null
@./scripts/test.sh
list:
@$(MAKE) build 1>/dev/null
@./build/main --gtest_list_tests
format:
@./scripts/format.sh
run:
@$(MAKE) build 1>/dev/null
@./scripts/run.sh
# DEV ONLY
init_dev:
@$(MAKE) init dev=true
generate:
@./scripts/generate.sh