Complete basic build process

We now have generation of an import library for linking against the Xbox
kernel, linking together an .exe, and converting it to an .xbe via cxbe.
Some further development of tooling aside (including filling in some
features in cxbe to better match the original JSRF executable), all that
remains now is to write decompiled code.
This commit is contained in:
KeybadeBlox 2026-02-14 23:05:32 -05:00
parent 43f4d10461
commit 84c165a0af
4 changed files with 418 additions and 12 deletions

View file

@ -5,19 +5,32 @@
OBJ = src/JSRF/Jet2.obj src/JSRF/Core.obj src/JSRF/GameData.obj\
src/XDK/CRT/CRT0.obj
# Import library for the only thing we don't compile ourselves, the Xbox kernel
LIB = lib/xboxkrnl.lib
#all: src/JSRF/Jet2.xbe
all: $(OBJ) # For now, just compile all the object files
## Build commands
.SUFFIXES: .cpp .obj .def .lib .exe.xbe
# Convert compiled executable into a working Xbox executable
# (TODO: we may want to fork cxbe to add section checksums and the game ID)
.exe.xbe:
cxbe.exe -OUT:$@ -TITLE:'Jet Set Radio Future' -MODE:retail $<
# Linking into an executable; expect this to fail with undefined references
# until we've made at least stubs for everything in the game
#all: src/JSRF/Jet2.exe
#src/JSRF/Jet2.exe: $(OBJ)
# LINK.EXE /NOLOGO /NODEFAULTLIB /MERGE:.CRT=.data /OUT:$@ $**
src/JSRF/Jet2.exe: $(OBJ) $(LIB)
LINK.EXE /NOLOGO /NODEFAULTLIB /MERGE:.CRT=.data /OUT:$@ $**
# For now, just compile all the object files
all: $(OBJ)
# Create import library for Xbox kernel
.def.lib:
LIB.EXE /NOLOGO /MACHINE:X86 /DEF:$< /OUT:$@
# Simple inference rule for producing object files
.SUFFIXES: .cpp .obj
# Compile object files from source
.cpp.obj:
CL.EXE /nologo /Wall /W4 /Ogityb0 /GfX /Fo$@ /c $<