Restore ability to build GBA roms
This commit is contained in:
		
							
								
								
									
										13
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								Makefile
									
									
									
									
									
								
							| @@ -11,8 +11,9 @@ endif | ||||
| make: | ||||
| 	${ENV_RUN} make -j -C build HOST_ENV=${HOST_ENV} | ||||
| build_rom: | ||||
| 	${ENV_RUN} make -j -C build ARGS="install" HOST_ENV=${HOST_ENV} | ||||
| 	${ENV_RUN} make -j -C build HOST_ENV=${HOST_ENV} | ||||
| 	${ENV_RUN} ./build_rom.sh | ||||
| 	${ENV_RUN} ./scripts/build_rom.sh | ||||
| preinstall: | ||||
| 	${ENV_RUN} make -j -C build ARGS="preinstall" HOST_ENV=${HOST_ENV} | ||||
| install: | ||||
| @@ -20,7 +21,7 @@ install: | ||||
| clean: | ||||
| 	${ENV_RUN} make -j -C build ARGS="clean" HOST_ENV=${HOST_ENV} | ||||
| purge: | ||||
| 	${ENV_RUN} rm -rf $$(find build -mindepth 1 -maxdepth 1 -type d) | ||||
| 	${ENV_RUN} rm -rf $$(find build -mindepth 1 -maxdepth 1 -type d) dist | ||||
| test: | ||||
| 	${ENV_RUN} make -j -C build ARGS="test" HOST_ENV=${HOST_ENV} | ||||
|  | ||||
| @@ -55,34 +56,28 @@ release: | ||||
| 	${ENV_RUN} rm -rf build/${HOST_ENV}-release | ||||
| 	${ENV_RUN} ./scripts/setup_build ${HOST_ENV} release | ||||
| 	${ENV_RUN} rm -f build/current | ||||
| 	${ENV_RUN} ln -s ${HOST_ENV}-release build/current | ||||
|  | ||||
| debug: | ||||
| 	${ENV_RUN} rm -rf build/${HOST_ENV}-debug | ||||
| 	${ENV_RUN} ./scripts/setup_build ${HOST_ENV} debug | ||||
| 	${ENV_RUN} rm -f build/current | ||||
| 	${ENV_RUN} ln -s ${HOST_ENV}-debug build/current | ||||
|  | ||||
| windows: | ||||
| 	${ENV_RUN} rm -rf build/windows | ||||
| 	${ENV_RUN} ./scripts/setup_build windows | ||||
| 	${ENV_RUN} rm -f build/current | ||||
| 	${ENV_RUN} ln -s windows build/current | ||||
|  | ||||
| windows-debug: | ||||
| 	${ENV_RUN} rm -rf build/windows | ||||
| 	${ENV_RUN} ./scripts/setup_build windows debug | ||||
| 	${ENV_RUN} rm -f build/current | ||||
| 	${ENV_RUN} ln -s windows build/current | ||||
|  | ||||
| gba: | ||||
| 	${ENV_RUN} rm -rf build/gba-release | ||||
| 	${ENV_RUN} ./scripts/setup_build gba | ||||
| 	${ENV_RUN} ./scripts/setup_build gba release | ||||
| 	${ENV_RUN} rm -f build/current | ||||
| 	${ENV_RUN} ln -s gba-release build/current | ||||
|  | ||||
| gba-debug: | ||||
| 	${ENV_RUN} rm -rf build/gba-debug | ||||
| 	${ENV_RUN} ./scripts/setup_build gba debug | ||||
| 	${ENV_RUN} rm -f build/current | ||||
| 	${ENV_RUN} ln -s gba-debug build/current | ||||
|   | ||||
							
								
								
									
										12
									
								
								build_rom.sh
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								build_rom.sh
									
									
									
									
									
								
							| @@ -1,12 +0,0 @@ | ||||
| #! /usr/bin/env bash | ||||
|  | ||||
| set -e | ||||
|  | ||||
| echo NOSTALGIA_MEDIA_HEADER_________ > media_header.txt | ||||
|  | ||||
| ./build/current/deps/ox/src/ox/fs/oxfs format 32 1k nostalgia_media.oxfs | ||||
| ./build/current/src/tools/nost-pack -fs nostalgia_media.oxfs -img charset.png -inode 101 -tiles 40 -bpp 4 -c | ||||
|  | ||||
| ${DEVKITARM}/bin/padbin 32 build/gba-release/src/player/nostalgia.bin | ||||
| cat build/gba-release/src/player/nostalgia.bin media_header.txt nostalgia_media.oxfs > nostalgia.gba | ||||
| ${DEVKITARM}/bin/gbafix nostalgia.gba | ||||
							
								
								
									
										12
									
								
								scripts/build_rom.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										12
									
								
								scripts/build_rom.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,12 @@ | ||||
| #! /usr/bin/env bash | ||||
|  | ||||
| set -e | ||||
|  | ||||
| echo NOSTALGIA_MEDIA_HEADER_________ > media_header.txt | ||||
|  | ||||
| ./dist/current/bin/oxfs format 32 1k nostalgia_media.oxfs | ||||
| ./dist/current/bin/nost-pack -fs nostalgia_media.oxfs -img charset.png -inode 101 -tiles 40 -bpp 4 -c | ||||
|  | ||||
| ${DEVKITARM}/bin/padbin 32 build/gba-release/src/nostalgia/player/nostalgia.bin | ||||
| cat build/gba-release/src/nostalgia/player/nostalgia.bin media_header.txt nostalgia_media.oxfs > nostalgia.gba | ||||
| ${DEVKITARM}/bin/gbafix nostalgia.gba | ||||
| @@ -10,7 +10,7 @@ BUILD_TYPE=$2 | ||||
| if [[ $TARGET == windows ]]; then | ||||
| 	toolchain="-DCMAKE_TOOLCHAIN_FILE=cmake/Modules/Mingw.cmake" | ||||
| elif [[ $TARGET == gba ]]; then | ||||
| 	toolchain="-DCMAKE_TOOLCHAIN_FILE=cmake/Modules/GBA.cmake -DWOMBAT_BUILD_TYPE=GBA -DOX_USE_STDLIB=OFF -DCMAKE_INSTALL_PREFIX=$DEVKITARM" | ||||
| 	toolchain="-DCMAKE_TOOLCHAIN_FILE=cmake/Modules/GBA.cmake -DWOMBAT_BUILD_TYPE=GBA -DOX_USE_STDLIB=OFF" | ||||
| fi | ||||
|  | ||||
| if [[ $BUILD_TYPE == debug ]]; then | ||||
| @@ -30,3 +30,8 @@ cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ | ||||
|       $toolchain \ | ||||
|       $project | ||||
| popd | ||||
|  | ||||
| rm -f build/current dist/current | ||||
| mkdir -p dist | ||||
| ln -s ${TARGET}-${BUILD_TYPE} build/current | ||||
| ln -s ${TARGET}-${BUILD_TYPE} dist/current | ||||
|   | ||||
| @@ -24,3 +24,12 @@ target_link_libraries( | ||||
| 		OxStd | ||||
| 		OxFS | ||||
| ) | ||||
|  | ||||
| add_custom_target("nostalgia.bin") | ||||
| install( | ||||
| 	TARGETS | ||||
| 		nostalgia | ||||
| 	DESTINATION | ||||
| 		bin | ||||
| ) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user