2017-08-13 19:17:04 +03:00
|
|
|
APP_NAME = nheko
|
|
|
|
|
|
|
|
MAC_DIST_DIR = dist/MacOS
|
|
|
|
APP_TEMPLATE = $(MAC_DIST_DIR)/Nheko.app
|
|
|
|
|
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-04-06 19:56:33 +03:00
|
|
|
release-debug:
|
2017-10-21 18:53:15 +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
|
|
|
|
|
2017-08-13 19:17:04 +03:00
|
|
|
app: release-debug $(APP_TEMPLATE)
|
|
|
|
@cp -fp ./build/$(APP_NAME) $(APP_TEMPLATE)/Contents/MacOS
|
|
|
|
@echo "Created '$(APP_NAME).app' in '$(APP_TEMPLATE)'"
|
2017-07-01 12:46:58 +03:00
|
|
|
|
2017-08-13 19:17:04 +03:00
|
|
|
app-install: app
|
2017-08-15 21:06:27 +03:00
|
|
|
cp -Rf $(APP_TEMPLATE) /Applications/
|
2017-08-13 19:17:04 +03:00
|
|
|
|
|
|
|
dmg: app
|
|
|
|
hdiutil create $(MAC_DIST_DIR)/Nheko.dmg \
|
|
|
|
-volname "$(APP_NAME)" \
|
|
|
|
-fs HFS+ \
|
|
|
|
-srcfolder $(MAC_DIST_DIR) \
|
|
|
|
-ov -format UDZO
|
2017-07-01 12:46:58 +03:00
|
|
|
|
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:
|
2017-09-24 17:08:11 +03:00
|
|
|
@./.ci/format.sh
|
2017-05-02 04:22:33 +03:00
|
|
|
|
2017-04-06 04:07:53 +03:00
|
|
|
clean:
|
|
|
|
rm -rf build
|
|
|
|
|
2017-08-13 19:17:04 +03:00
|
|
|
.PHONY: build app dmg
|