nheko/Makefile

48 lines
1022 B
Makefile
Raw Normal View History

2017-08-13 18:17:04 +02:00
APP_NAME = nheko
MAC_DIST_DIR = dist/MacOS
APP_TEMPLATE = $(MAC_DIST_DIR)/Nheko.app
2017-04-30 14:10:59 +02:00
SRC := $(shell find include src -type f -type f \( -iname "*.cc" -o -iname "*.h" \))
2017-08-13 18:17:04 +02:00
# Linux specific helpers
debug:
2017-05-02 03:22:33 +02:00
@cmake -DBUILD_TESTS=OFF -H. -GNinja -Bbuild -DCMAKE_BUILD_TYPE=Debug
@cmake --build build
2017-04-06 03:07:53 +02:00
release-debug:
2017-08-13 18:17:04 +02:00
@cmake -DBUILD_TESTS=OFF -H. -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo
@cmake --build build
test:
@cmake -DBUILD_TESTS=ON -H. -GNinja -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo
@cmake --build build
@cd build && GTEST_COLOR=1 ctest --verbose
2017-08-13 18:17:04 +02:00
app: release-debug $(APP_TEMPLATE)
@cp -fp ./build/$(APP_NAME) $(APP_TEMPLATE)/Contents/MacOS
@echo "Created '$(APP_NAME).app' in '$(APP_TEMPLATE)'"
2017-08-13 18:17:04 +02:00
app-install: app
cp -rf $(APP_TEMPLATE) /Applications/Nheko.app
dmg: app
hdiutil create $(MAC_DIST_DIR)/Nheko.dmg \
-volname "$(APP_NAME)" \
-fs HFS+ \
-srcfolder $(MAC_DIST_DIR) \
-ov -format UDZO
run:
@./build/nheko
2017-04-06 13:58:48 +02:00
2017-04-30 14:10:59 +02:00
lint:
@clang-format -i $(SRC)
2017-05-02 03:22:33 +02:00
2017-04-06 03:07:53 +02:00
clean:
rm -rf build
2017-08-13 18:17:04 +02:00
.PHONY: build app dmg