2017-04-30 15:10:59 +03:00
|
|
|
SRC := $(shell find include src -type f -type f \( -iname "*.cc" -o -iname "*.h" \))
|
|
|
|
|
2017-07-01 12:46:58 +03:00
|
|
|
# Linux specific helpers
|
2017-04-06 19:56:33 +03:00
|
|
|
debug:
|
2017-05-02 04:22:33 +03:00
|
|
|
@cmake -DBUILD_TESTS=OFF -H. -GNinja -Bbuild -DCMAKE_BUILD_TYPE=Debug
|
2017-04-11 17:45:47 +03:00
|
|
|
@cmake --build build
|
2017-04-06 04:07:53 +03:00
|
|
|
|
2017-07-01 12:46:58 +03:00
|
|
|
|
2017-04-06 19:56:33 +03:00
|
|
|
release-debug:
|
2017-05-02 04:22:33 +03:00
|
|
|
@cmake -DBUILD_TESTS=OFF -H. -GNinja -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
2017-04-11 17:45:47 +03:00
|
|
|
@cmake --build build
|
|
|
|
|
2017-07-01 12:46:58 +03:00
|
|
|
test:
|
|
|
|
@cmake -DBUILD_TESTS=ON -H. -GNinja -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
|
|
|
@cmake --build build
|
|
|
|
@cd build && GTEST_COLOR=1 ctest --verbose
|
|
|
|
|
|
|
|
# MacOS specific helpers
|
|
|
|
mdebug:
|
|
|
|
@cmake -DBUILD_TESTS=OFF \
|
|
|
|
-H. \
|
|
|
|
-GNinja \
|
|
|
|
-Bbuild \
|
|
|
|
-DCMAKE_PREFIX_PATH=/usr/local/opt/qt5 \
|
|
|
|
-DCMAKE_BUILD_TYPE=Debug
|
|
|
|
@cmake --build build
|
|
|
|
|
|
|
|
mrelease:
|
|
|
|
@cmake -DBUILD_TESTS=OFF \
|
|
|
|
-H. \
|
|
|
|
-GNinja \
|
|
|
|
-Bbuild \
|
|
|
|
-DCMAKE_PREFIX_PATH=/usr/local/opt/qt5 \
|
|
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo
|
|
|
|
@cmake --build build
|
|
|
|
|
2017-04-11 17:45:47 +03:00
|
|
|
run:
|
|
|
|
@./build/nheko
|
2017-04-06 14:58:48 +03:00
|
|
|
|
2017-04-30 15:10:59 +03:00
|
|
|
lint:
|
|
|
|
@clang-format -i $(SRC)
|
|
|
|
|
2017-05-02 04:22:33 +03:00
|
|
|
|
2017-04-06 04:07:53 +03:00
|
|
|
clean:
|
|
|
|
rm -rf build
|
|
|
|
|
|
|
|
.PHONY: build
|