mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Wii: Output and package the binary as .dol instead of .elf.
git-svn-id: https://svn.eduke32.com/eduke32@4824 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
dbcca52303
commit
30407c8e87
3 changed files with 63 additions and 36 deletions
|
@ -175,11 +175,11 @@ TESTGAME_OBJ=$(TESTGAME_ROOT)/$(obj)
|
||||||
|
|
||||||
TEST_CFLAGS=-I$(TESTGAME_SRC)
|
TEST_CFLAGS=-I$(TESTGAME_SRC)
|
||||||
|
|
||||||
TESTGAME ?= testgame$(EXESUFFIX)
|
TESTGAME ?= testgame
|
||||||
TESTEDITOR ?= testeditor$(EXESUFFIX)
|
TESTEDITOR ?= testeditor
|
||||||
|
|
||||||
TESTGAME_TARGET:=$(TESTGAME)
|
TESTGAME_TARGET:=$(TESTGAME)$(EXESUFFIX)
|
||||||
TESTEDITOR_TARGET:=$(TESTEDITOR)
|
TESTEDITOR_TARGET:=$(TESTEDITOR)$(EXESUFFIX)
|
||||||
|
|
||||||
TESTGAME_OBJS=game sound_stub common config
|
TESTGAME_OBJS=game sound_stub common config
|
||||||
TESTEDITOR_OBJS=bstub common
|
TESTEDITOR_OBJS=bstub common
|
||||||
|
@ -211,11 +211,11 @@ DUKE3D_EDITOR_LINKERFLAGS=
|
||||||
|
|
||||||
DUKE3D_OBJ=$(DUKE3D_SRC)/$(obj)
|
DUKE3D_OBJ=$(DUKE3D_SRC)/$(obj)
|
||||||
|
|
||||||
EDUKE32 ?= eduke32$(EXESUFFIX)
|
EDUKE32 ?= eduke32
|
||||||
MAPSTER32 ?= mapster32$(EXESUFFIX)
|
MAPSTER32 ?= mapster32
|
||||||
|
|
||||||
EDUKE32_TARGET:=$(EDUKE32)
|
EDUKE32_TARGET:=$(EDUKE32)$(EXESUFFIX)
|
||||||
MAPSTER32_TARGET:=$(MAPSTER32)
|
MAPSTER32_TARGET:=$(MAPSTER32)$(EXESUFFIX)
|
||||||
|
|
||||||
COMMON_OBJS=rev
|
COMMON_OBJS=rev
|
||||||
COMMON_EDITOR_OBJS=m32common m32def m32exec m32vars mathutil rev
|
COMMON_EDITOR_OBJS=m32common m32def m32exec m32vars mathutil rev
|
||||||
|
@ -353,18 +353,18 @@ endif
|
||||||
|
|
||||||
all: start $(EDUKE32_TARGET) $(MAPSTER32_TARGET) finish
|
all: start $(EDUKE32_TARGET) $(MAPSTER32_TARGET) finish
|
||||||
ifneq (,$(EDUKE32_TARGET))
|
ifneq (,$(EDUKE32_TARGET))
|
||||||
@ls -l $(EDUKE32)
|
@ls -l $(EDUKE32)$(EXESUFFIX)
|
||||||
endif
|
endif
|
||||||
ifneq (,$(MAPSTER32_TARGET))
|
ifneq (,$(MAPSTER32_TARGET))
|
||||||
@ls -l $(MAPSTER32)
|
@ls -l $(MAPSTER32)$(EXESUFFIX)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
test: start $(TESTGAME_TARGET) $(TESTEDITOR_TARGET) finish
|
test: start $(TESTGAME_TARGET) $(TESTEDITOR_TARGET) finish
|
||||||
ifneq (,$(TESTGAME_TARGET))
|
ifneq (,$(TESTGAME_TARGET))
|
||||||
@ls -l $(TESTGAME)
|
@ls -l $(TESTGAME)$(EXESUFFIX)
|
||||||
endif
|
endif
|
||||||
ifneq (,$(TESTEDITOR_TARGET))
|
ifneq (,$(TESTEDITOR_TARGET))
|
||||||
@ls -l $(TESTEDITOR)
|
@ls -l $(TESTEDITOR)$(EXESUFFIX)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ebacktrace: start $(EBACKTRACEDLL_TARGET) finish
|
ebacktrace: start $(EBACKTRACEDLL_TARGET) finish
|
||||||
|
@ -387,45 +387,73 @@ dxutils: $(addsuffix $(EXESUFFIX),$(DXUTILS))
|
||||||
sdlutils: $(addsuffix $(EXESUFFIX),$(SDLUTILS))
|
sdlutils: $(addsuffix $(EXESUFFIX),$(SDLUTILS))
|
||||||
@ls -l $^
|
@ls -l $^
|
||||||
|
|
||||||
$(TESTGAME): $(TESTGAME_OBJS_EXP) $(COMMON_OBJS_EXP) $(ENGINE_OBJS_EXP)
|
ifeq ($(PLATFORM),WII)
|
||||||
$(LINK_STATUS)
|
ifneq ($(ELF2DOL),)
|
||||||
$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
|
$(TESTGAME)$(DOLSUFFIX): $(TESTGAME)$(EXESUFFIX)
|
||||||
ifneq ($(STRIP),)
|
$(TESTEDITOR)$(DOLSUFFIX): $(TESTEDITOR)$(EXESUFFIX)
|
||||||
$(STRIP) $(TESTGAME)
|
$(EDUKE32)$(DOLSUFFIX): $(EDUKE32)$(EXESUFFIX)
|
||||||
|
$(MAPSTER32)$(DOLSUFFIX): $(MAPSTER32)$(EXESUFFIX)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(TESTEDITOR): $(TESTEDITOR_OBJS_EXP) $(COMMON_EDITOR_OBJS_EXP) $(ENGINE_EDITOR_OBJS_EXP) $(ENGINE_OBJS_EXP)
|
$(TESTGAME)$(EXESUFFIX): $(TESTGAME_OBJS_EXP) $(COMMON_OBJS_EXP) $(ENGINE_OBJS_EXP)
|
||||||
$(LINK_STATUS)
|
$(LINK_STATUS)
|
||||||
$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
|
$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
|
||||||
|
ifeq ($(PLATFORM),WII)
|
||||||
|
ifneq ($(ELF2DOL),)
|
||||||
|
$(ELF2DOL) $(TESTGAME)$(EXESUFFIX) $(TESTGAME)$(DOLSUFFIX)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
ifneq ($(STRIP),)
|
ifneq ($(STRIP),)
|
||||||
$(STRIP) $(TESTEDITOR)
|
$(STRIP) $(TESTGAME)$(EXESUFFIX)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(EDUKE32): $(DUKE3D_OBJS_EXP) $(COMMON_OBJS_EXP) $(ENGINE_OBJS_EXP) $(AUDIOLIB_OBJS_EXP) $(ENET_TARGET) $(DUKE3D_MISCDEPS)
|
$(TESTEDITOR)$(EXESUFFIX): $(TESTEDITOR_OBJS_EXP) $(COMMON_EDITOR_OBJS_EXP) $(ENGINE_EDITOR_OBJS_EXP) $(ENGINE_OBJS_EXP)
|
||||||
|
$(LINK_STATUS)
|
||||||
|
$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
|
||||||
|
ifeq ($(PLATFORM),WII)
|
||||||
|
ifneq ($(ELF2DOL),)
|
||||||
|
$(ELF2DOL) $(TESTEDITOR)$(EXESUFFIX) $(TESTEDITOR)$(DOLSUFFIX)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
ifneq ($(STRIP),)
|
||||||
|
$(STRIP) $(TESTEDITOR)$(EXESUFFIX)
|
||||||
|
endif
|
||||||
|
|
||||||
|
$(EDUKE32)$(EXESUFFIX): $(DUKE3D_OBJS_EXP) $(COMMON_OBJS_EXP) $(ENGINE_OBJS_EXP) $(AUDIOLIB_OBJS_EXP) $(ENET_TARGET) $(DUKE3D_MISCDEPS)
|
||||||
$(LINK_STATUS)
|
$(LINK_STATUS)
|
||||||
$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(DUKE3D_LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
|
$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(DUKE3D_LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
|
||||||
|
ifeq ($(PLATFORM),WII)
|
||||||
|
ifneq ($(ELF2DOL),)
|
||||||
|
$(ELF2DOL) $(EDUKE32)$(EXESUFFIX) $(EDUKE32)$(DOLSUFFIX)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
ifneq ($(STRIP),)
|
ifneq ($(STRIP),)
|
||||||
$(STRIP) $(EDUKE32)
|
$(STRIP) $(EDUKE32)$(EXESUFFIX)
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),DARWIN)
|
ifeq ($(PLATFORM),DARWIN)
|
||||||
cp -RPf "platform/Apple/bundles/EDuke32.app" "./"
|
cp -RPf "platform/Apple/bundles/EDuke32.app" "./"
|
||||||
mkdir -p "EDuke32.app/Contents/MacOS"
|
mkdir -p "EDuke32.app/Contents/MacOS"
|
||||||
cp -f "$(EDUKE32)" "EDuke32.app/Contents/MacOS/"
|
cp -f "$(EDUKE32)$(EXESUFFIX)" "EDuke32.app/Contents/MacOS/"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(MAPSTER32): $(DUKE3D_EDITOR_OBJS_EXP) $(COMMON_EDITOR_OBJS_EXP) $(ENGINE_EDITOR_OBJS_EXP) $(ENGINE_OBJS_EXP) $(AUDIOLIB_OBJS_EXP) $(DUKE3D_EDITOR_MISCDEPS)
|
$(MAPSTER32)$(EXESUFFIX): $(DUKE3D_EDITOR_OBJS_EXP) $(COMMON_EDITOR_OBJS_EXP) $(ENGINE_EDITOR_OBJS_EXP) $(ENGINE_OBJS_EXP) $(AUDIOLIB_OBJS_EXP) $(DUKE3D_EDITOR_MISCDEPS)
|
||||||
$(LINK_STATUS)
|
$(LINK_STATUS)
|
||||||
$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(DUKE3D_EDITOR_LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
|
$(RECIPE_IF) $(LINKER) -o $@ $^ $(COMMONFLAGS) $(LINKERFLAGS) $(DUKE3D_EDITOR_LINKERFLAGS) $(LIBDIRS) $(LIBS) $(STATICSTDCPP) $(RECIPE_RESULT_LINK)
|
||||||
|
ifeq ($(PLATFORM),WII)
|
||||||
|
ifneq ($(ELF2DOL),)
|
||||||
|
$(ELF2DOL) $(MAPSTER32)$(EXESUFFIX) $(MAPSTER32)$(DOLSUFFIX)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
ifneq ($(STRIP),)
|
ifneq ($(STRIP),)
|
||||||
$(STRIP) $(MAPSTER32)
|
$(STRIP) $(MAPSTER32)$(EXESUFFIX)
|
||||||
endif
|
endif
|
||||||
ifeq ($(PLATFORM),DARWIN)
|
ifeq ($(PLATFORM),DARWIN)
|
||||||
cp -RPf "platform/Apple/bundles/Mapster32.app" "./"
|
cp -RPf "platform/Apple/bundles/Mapster32.app" "./"
|
||||||
mkdir -p "Mapster32.app/Contents/MacOS"
|
mkdir -p "Mapster32.app/Contents/MacOS"
|
||||||
cp -f "$(MAPSTER32)" "Mapster32.app/Contents/MacOS/"
|
cp -f "$(MAPSTER32)$(EXESUFFIX)" "Mapster32.app/Contents/MacOS/"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
include Makefile.deps
|
include Makefile.deps
|
||||||
include $(ENGINE_ROOT)/Makefile.deps
|
include $(ENGINE_ROOT)/Makefile.deps
|
||||||
|
|
||||||
|
@ -610,14 +638,14 @@ $(ENGINE_OBJ) $(AUDIOLIB_OBJ) $(ENET_OBJ) $(DUKE3D_OBJ) $(TESTGAME_OBJ):
|
||||||
# Delete executables, object files created from sources in source/, and
|
# Delete executables, object files created from sources in source/, and
|
||||||
# miscellaneous generated files related to Lunatic on non-Linux.
|
# miscellaneous generated files related to Lunatic on non-Linux.
|
||||||
clean:
|
clean:
|
||||||
echo "rm -f $(EDUKE32) $(MAPSTER32) $(DUKE3D_OBJ)/*.o $(DUKE3D_MISCDEPS) $(DUKE3D_EDITOR_MISCDEPS)"
|
echo "rm -f $(EDUKE32)$(EXESUFFIX) $(MAPSTER32)$(EXESUFFIX) $(DUKE3D_OBJ)/*.o $(DUKE3D_MISCDEPS) $(DUKE3D_EDITOR_MISCDEPS)"
|
||||||
-rm -f $(EDUKE32) $(MAPSTER32) $(DUKE3D_OBJ)/*.o $(DUKE3D_MISCDEPS) $(DUKE3D_EDITOR_MISCDEPS)
|
-rm -f $(EDUKE32)$(EXESUFFIX) $(MAPSTER32)$(EXESUFFIX) $(DUKE3D_OBJ)/*.o $(DUKE3D_MISCDEPS) $(DUKE3D_EDITOR_MISCDEPS)
|
||||||
ifeq ($(PLATFORM),DARWIN)
|
ifeq ($(PLATFORM),DARWIN)
|
||||||
-rm -rf EDuke32.app Mapster32.app
|
-rm -rf EDuke32.app Mapster32.app
|
||||||
endif
|
endif
|
||||||
|
|
||||||
cleantest:
|
cleantest:
|
||||||
-rm -f $(TESTGAME) $(TESTEDITOR) $(TESTGAME_OBJS_EXP) $(TESTEDITOR_OBJS_EXP)
|
-rm -f $(TESTGAME)$(EXESUFFIX) $(TESTEDITOR)$(EXESUFFIX) $(TESTGAME_OBJS_EXP) $(TESTEDITOR_OBJS_EXP)
|
||||||
|
|
||||||
cleanutils:
|
cleanutils:
|
||||||
-rm -f $(addsuffix $(EXESUFFIX),$(UTILS) $(GAMEUTILS)) $(addprefix $(ENGINE_OBJ)/,$(addsuffix .$o,$(UTILS))) $(addprefix $(DUKE3D_OBJ)/,$(addsuffix .$o,$(GAMEUTILS))) $(addsuffix $(EXESUFFIX),$(DXUTILS)) $(addprefix $(ENGINE_OBJ)/,$(addsuffix .$o,$(DXUTILS))) $(addsuffix $(EXESUFFIX),$(SDLUTILS)) $(addprefix $(ENGINE_OBJ)/,$(addsuffix .$o,$(SDLUTILS))) $(UTIL_OBJS_EXP)
|
-rm -f $(addsuffix $(EXESUFFIX),$(UTILS) $(GAMEUTILS)) $(addprefix $(ENGINE_OBJ)/,$(addsuffix .$o,$(UTILS))) $(addprefix $(DUKE3D_OBJ)/,$(addsuffix .$o,$(GAMEUTILS))) $(addsuffix $(EXESUFFIX),$(DXUTILS)) $(addprefix $(ENGINE_OBJ)/,$(addsuffix .$o,$(DXUTILS))) $(addsuffix $(EXESUFFIX),$(SDLUTILS)) $(addprefix $(ENGINE_OBJ)/,$(addsuffix .$o,$(SDLUTILS))) $(UTIL_OBJS_EXP)
|
||||||
|
|
|
@ -54,6 +54,8 @@ ifeq ($(PLATFORM),WII)
|
||||||
CROSS=powerpc-eabi-
|
CROSS=powerpc-eabi-
|
||||||
RANLIB=powerpc-eabi-ranlib
|
RANLIB=powerpc-eabi-ranlib
|
||||||
STRIP=powerpc-eabi-strip
|
STRIP=powerpc-eabi-strip
|
||||||
|
ELF2DOL=elf2dol
|
||||||
|
DOLSUFFIX=.dol
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CLANG?=0
|
CLANG?=0
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
setlocal ENABLEEXTENSIONS DISABLEDELAYEDEXPANSION
|
setlocal ENABLEEXTENSIONS DISABLEDELAYEDEXPANSION
|
||||||
|
|
||||||
set targets=eduke32 mapster32
|
set targets=eduke32 mapster32
|
||||||
set PATH=C:\devkitPro\devkitPPC\bin;C:\devkitPro\msys\bin;C:\MinGW\bin;C:\MinGW\msys\1.0\bin;%PATH%
|
set PATH=C:\devkitPro\devkitPPC\bin;C:\MinGW\bin;C:\MinGW\msys\1.0\bin;C:\devkitPro\msys\bin;%PATH%
|
||||||
set DEVKITPPC=C:/devkitPro/devkitPPC
|
set DEVKITPPC=C:/devkitPro/devkitPPC
|
||||||
set DEVKITPRO=C:/devkitPro
|
set DEVKITPRO=C:/devkitPro
|
||||||
|
|
||||||
|
@ -25,16 +25,12 @@ set commandline=make PLATFORM=WII %* STRIP=""
|
||||||
echo %commandline%
|
echo %commandline%
|
||||||
%commandline%
|
%commandline%
|
||||||
|
|
||||||
for %%G in (%targets%) do if not exist "%%~G.elf" goto end
|
for %%G in (%targets%) do if not exist "%%~G.dol" goto end
|
||||||
|
|
||||||
:: Strip:
|
|
||||||
for %%G in (%targets%) do for %%H in (.elf) do if exist "%%~G%%~H" copy /y "%%~G%%~H" "%%~G-unstripped%%~H"
|
|
||||||
for %%G in (%targets%) do for %%H in (.elf) do if exist "%%~G%%~H" powerpc-eabi-strip "%%~G%%~H"
|
|
||||||
|
|
||||||
:: Package data:
|
:: Package data:
|
||||||
if not exist apps mkdir apps
|
if not exist apps mkdir apps
|
||||||
for %%G in (%targets%) do xcopy /e /q /y %wiidir%\apps\%%~G apps\%%~G\
|
for %%G in (%targets%) do xcopy /e /q /y %wiidir%\apps\%%~G apps\%%~G\
|
||||||
for %%G in (%targets%) do for %%H in (.elf) do if exist "%%~G%%~H" move /y "%%~G%%~H" "apps\%%~G\boot%%~H"
|
for %%G in (%targets%) do for %%H in (.dol) do if exist "%%~G%%~H" move /y "%%~G%%~H" "apps\%%~G\boot%%~H"
|
||||||
for %%G in (%targets%) do for %%H in (.elf.map) do if exist "%%~G%%~H" del /f /q "%%~G%%~H"
|
for %%G in (%targets%) do for %%H in (.elf.map) do if exist "%%~G%%~H" del /f /q "%%~G%%~H"
|
||||||
for %%G in (%targets%) do "echo.exe" -e " <version>r%rev%</version>\n <release_date>%currentdate%</release_date>" | "cat.exe" "%wiidir%\%%~G_meta_1.xml" - "%wiidir%\%%~G_meta_2.xml" >"apps\%%~G\meta.xml"
|
for %%G in (%targets%) do "echo.exe" -e " <version>r%rev%</version>\n <release_date>%currentdate%</release_date>" | "cat.exe" "%wiidir%\%%~G_meta_1.xml" - "%wiidir%\%%~G_meta_2.xml" >"apps\%%~G\meta.xml"
|
||||||
|
|
||||||
|
@ -44,6 +40,7 @@ xcopy /e /q /y /EXCLUDE:%wiidir%\xcopy_exclude.txt package\common apps\mapster32
|
||||||
xcopy /e /q /y /EXCLUDE:%wiidir%\xcopy_exclude.txt package\sdk apps\mapster32\
|
xcopy /e /q /y /EXCLUDE:%wiidir%\xcopy_exclude.txt package\sdk apps\mapster32\
|
||||||
|
|
||||||
"ls.exe" -l -R apps
|
"ls.exe" -l -R apps
|
||||||
|
7z.exe a -mx9 -t7z eduke32-wii-r%rev%-debug-elf.7z *.elf -xr!*.svn*
|
||||||
7z.exe a -mx9 -t7z eduke32-wii-r%rev%.7z apps -xr!*.svn*
|
7z.exe a -mx9 -t7z eduke32-wii-r%rev%.7z apps -xr!*.svn*
|
||||||
|
|
||||||
:end
|
:end
|
||||||
|
|
Loading…
Reference in a new issue