2023-08-25 00:12:49 -05:00
|
|
|
BC_VAR_PROJECT_NAME=nostalgia
|
2023-12-16 10:35:28 -06:00
|
|
|
BC_VAR_PROJECT_NAME_CAP=Nostalgia
|
2021-03-02 21:16:07 -06:00
|
|
|
BUILDCORE_PATH=deps/buildcore
|
|
|
|
include ${BUILDCORE_PATH}/base.mk
|
2016-12-18 15:54:13 -06:00
|
|
|
|
2023-08-25 00:12:49 -05:00
|
|
|
ifeq ($(BC_VAR_OS),darwin)
|
2023-12-16 10:35:28 -06:00
|
|
|
NOSTALGIA_STUDIO=./build/${BC_VAR_CURRENT_BUILD}/bin/${BC_VAR_PROJECT_NAME_CAP}Studio.app/Contents/MacOS/${BC_VAR_PROJECT_NAME_CAP}Studio
|
2019-12-30 22:51:35 -06:00
|
|
|
MGBA=/Applications/mGBA.app/Contents/MacOS/mGBA
|
2019-11-13 20:37:23 -06:00
|
|
|
else
|
2023-12-16 10:35:28 -06:00
|
|
|
NOSTALGIA_STUDIO=./build/${BC_VAR_CURRENT_BUILD}/bin/${BC_VAR_PROJECT_NAME_CAP}Studio
|
2019-12-30 22:51:35 -06:00
|
|
|
MGBA=mgba-qt
|
2019-11-13 20:37:23 -06:00
|
|
|
endif
|
|
|
|
|
2020-01-03 20:00:58 -06:00
|
|
|
.PHONY: pkg-gba
|
2023-10-22 21:14:29 -05:00
|
|
|
pkg-gba: build
|
2023-12-11 22:26:20 -06:00
|
|
|
${BC_CMD_ENVRUN} ${BC_PY3} ./scripts/pkg-gba.py sample_project ${BC_VAR_PROJECT_NAME}
|
2016-12-23 18:06:27 -06:00
|
|
|
|
2020-01-03 20:00:58 -06:00
|
|
|
.PHONY: run
|
2023-06-24 12:40:49 -05:00
|
|
|
run: build
|
2023-12-11 22:26:20 -06:00
|
|
|
./build/${BC_VAR_CURRENT_BUILD}/bin/${BC_VAR_PROJECT_NAME} sample_project
|
2020-01-03 20:00:58 -06:00
|
|
|
.PHONY: run-studio
|
2023-06-24 12:40:49 -05:00
|
|
|
run-studio: build
|
2021-12-18 17:51:46 -06:00
|
|
|
${NOSTALGIA_STUDIO}
|
2020-01-03 20:00:58 -06:00
|
|
|
.PHONY: gba-run
|
2019-02-27 23:23:10 -06:00
|
|
|
gba-run: pkg-gba
|
2023-12-11 22:26:20 -06:00
|
|
|
${MGBA} ${BC_VAR_PROJECT_NAME}.gba
|
2021-03-02 21:32:00 -06:00
|
|
|
.PHONY: debug
|
2023-06-24 12:40:49 -05:00
|
|
|
debug: build
|
2023-12-11 22:26:20 -06:00
|
|
|
${BC_CMD_HOST_DEBUGGER} ./build/${BC_VAR_CURRENT_BUILD}/bin/${BC_VAR_PROJECT_NAME} sample_project
|
2021-03-02 21:32:00 -06:00
|
|
|
.PHONY: debug-studio
|
2023-06-24 12:40:49 -05:00
|
|
|
debug-studio: build
|
2023-09-30 13:36:17 -05:00
|
|
|
${BC_CMD_HOST_DEBUGGER} ${NOSTALGIA_STUDIO}
|
2016-12-23 18:06:27 -06:00
|
|
|
|
2020-01-03 20:00:58 -06:00
|
|
|
.PHONY: configure-gba
|
2019-03-07 18:04:25 -06:00
|
|
|
configure-gba:
|
2023-08-25 00:12:49 -05:00
|
|
|
${BC_CMD_SETUP_BUILD} --toolchain=deps/gbabuildcore/cmake/modules/GBA.cmake --target=gba --current_build=0 --build_type=release --build_root=${BC_VAR_BUILD_PATH}
|
2016-12-24 13:06:44 -06:00
|
|
|
|
2020-01-03 20:00:58 -06:00
|
|
|
.PHONY: configure-gba-debug
|
2019-03-07 18:04:25 -06:00
|
|
|
configure-gba-debug:
|
2023-08-25 00:12:49 -05:00
|
|
|
${BC_CMD_SETUP_BUILD} --toolchain=deps/gbabuildcore/cmake/modules/GBA.cmake --target=gba --current_build=0 --build_type=debug --build_root=${BC_VAR_BUILD_PATH}
|