nostalgia/Makefile

40 lines
1.2 KiB
Makefile

PROJECT_NAME=nostalgia
BUILDCORE_PATH=deps/buildcore
include ${BUILDCORE_PATH}/base.mk
ifeq ($(OS),darwin)
NOSTALGIA_STUDIO=./build/${CURRENT_BUILD}/src/nostalgia/studio/nostalgia-studio.app/Contents/MacOS/nostalgia-studio
MGBA=/Applications/mGBA.app/Contents/MacOS/mGBA
else
NOSTALGIA_STUDIO=./build/${CURRENT_BUILD}/bin/nostalgia-studio
MGBA=mgba-qt
endif
.PHONY: pkg-gba
pkg-gba: install
${ENV_RUN} ./scripts/pkg-gba sample_project
.PHONY: run
run: build
./build/${CURRENT_BUILD}/bin/nostalgia sample_project
.PHONY: run-studio
run-studio: build
${NOSTALGIA_STUDIO}
.PHONY: gba-run
gba-run: pkg-gba
${MGBA} nostalgia.gba
.PHONY: debug
debug: build
${DEBUGGER} ./build/${CURRENT_BUILD}/bin/nostalgia sample_project
.PHONY: debug-studio
debug-studio: build
${DEBUGGER} ${NOSTALGIA_STUDIO}
.PHONY: configure-gba
configure-gba:
${ENV_RUN} ${SETUP_BUILD} --toolchain=deps/gbabuildcore/cmake/modules/GBA.cmake --target=gba --current_build=0 --build_type=release --build_root=${BUILD_PATH}
.PHONY: configure-gba-debug
configure-gba-debug:
${ENV_RUN} ${SETUP_BUILD} --toolchain=deps/gbabuildcore/cmake/modules/GBA.cmake --target=gba --current_build=0 --build_type=debug --build_root=${BUILD_PATH}