-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (25 loc) · 775 Bytes
/
Copy pathMakefile
File metadata and controls
32 lines (25 loc) · 775 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
SRC_FILES := $(wildcard src/*.cpp) \
$(wildcard src/*/*.cpp) \
debug:
@mkdir -p bin/debug
g++ -g -O0 -Wall -Wextra -Wpedantic -Wshadow -Wformat=2 \
--include-directory="./include" \
-Wconversion -Wnull-dereference -Wsign-conversion \
$(SRC_FILES) -o bin/debug/debug
release:
@mkdir -p bin/release
g++ -O3 -march=native -flto -DNDEBUG -fno-exceptions \
--include-directory="./include" \
-s -ffast-math -funroll-loops \
$(SRC_FILES) -o bin/release/release
run: release
./bin/release/release
check: debug
# Add your tests here - for example:
./bin/debug/debug --test || true
distcheck: debug release
# Add distribution checks here
@echo "Distribution check passed"
test: debug
./bin/debug/debug --test || true
.PHONY: run check distcheck test