In MAKE_XXX.bat
set GAME_DEFINES=-Ddefine1 -Ddefine2 -Ddefine3
call build_brew.bat contra LG_VX7000 BREW2
In build_brew.bat
set GAME_NAME=%1
set GAME_BUILD=%2
if("%3"=="BREW1) set BREW_SDK=lib\1.1.0
if("%3"=="BREW2) set BREW_SDK=lib\2.1.3
if("%3"=="BREW3) set BREW_SDK=lib\3.1.5
set BUILD_SOURCE=.\src
set BUILD_DEFINES=-DDYNAMIC_APP %GAME_DEFINES%
set BUILD_INCLUDES=-I%BUILD_SOURCE% -I%BREW_SDK%\inc
set BUILD_FLAGS=-cpu ARM7TDMI -apcs/ropi/interwork -littleend -zas1 -zas4 -fa -g -Ospace -O2 -Wy -c
set COMPILE_ARGS=%BUILD_DEFINES% %BUILD_INCLUDES% %BUILD_FLAGS% -w
:: for each .cpp to compile
tcpp %COMPILE_ARGS% -oFILENAME.o -oDIR\TO\FILENAME.cpp
tcpp ...
armlink -o %GAME_NAME%.elf -ropi "%BREW_SDK%\compiled\AEEAppGen.o" "%BREW_SDK%\compiled\AEEModGen.o" FILENAME.o FILENAME1.o ... -first AEEMod_Load -map -list out.map -split -reloc
elf2mod %GAME_NAME%.elf %GAME_NAME%.mod
No comments:
Post a Comment