-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (23 loc) · 786 Bytes
/
Makefile
File metadata and controls
31 lines (23 loc) · 786 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
CC=/usr/bin/gcc
CXX=/usr/bin/g++
CONFIG=Debug
TARGET=all
all: config build
config:
cmake --no-warn-unused-cli \
-DCMAKE_BUILD_TYPE=${CONFIG} \
-DCMAKE_EXPORT_COMPILE_COMMANDS=TRUE \
-DCMAKE_C_COMPILER=${CC} \
-DCMAKE_CXX_COMPILER=${CXX} \
-S${PWD} \
-B${PWD}/build \
-G Ninja
build:
cmake --build ${PWD}/build --config ${CONFIG} --target ${TARGET}
install:
cmake --install ${PWD}/build --config ${CONFIG}
lint:
@find src include examples tests -name '*.c' -or -name '*.h' -or -name '*.cpp' -or -name '*.hpp' | xargs clang-format --dry-run --Werror --sort-includes
format:
@find src include examples tests -name '*.c' -or -name '*.h' -or -name '*.cpp' -or -name '*.hpp' | xargs clang-format -i --Werror --sort-includes
.PHONY: config build install lint format