summary refs log tree commit diff
path: root/Makefile
blob: 477ec858a678b03b643f89466879a37b82ae773d (plain) (blame)
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
SRC := $(shell find include src -type f -type f \( -iname "*.cc" -o -iname "*.h" \))

debug:
	@cmake -DBUILD_TESTS=OFF -H. -GNinja -Bbuild -DCMAKE_BUILD_TYPE=Debug
	@cmake --build build

release-debug:
	@cmake -DBUILD_TESTS=OFF -H. -GNinja -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo
	@cmake --build build

run:
	@./build/nheko

lint:
	@clang-format -i $(SRC)

test:
	@cmake -DBUILD_TESTS=ON -H. -GNinja -Bbuild -DCMAKE_BUILD_TYPE=Release
	@cmake --build build
	@cd build && GTEST_COLOR=1 ctest --verbose

clean:
	rm -rf build

.PHONY: build