JSRF-Decompilation/decompile/Makefile
KeybadeBlox d435282a8b Compile XDK code as C
It appears to be all C code (especially the non-C++ parts of the C
runtime, of course), so we'll compile it as such.
2026-02-17 10:27:50 -05:00

49 lines
1.5 KiB
Makefile

# JSRF Decompilation Makefile
# An NMAKE Makefile to compile the game with the Visual C++ 7.0 toolchain
# All object files to link together
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
src/JSRF/Jet2.exe: $(OBJ) $(LIB)
LINK.EXE /NOLOGO /NODEFAULTLIB /MERGE:.CRT=.data /OUT:$@ $**
# Create import library for Xbox kernel
.def.lib:
LIB.EXE /NOLOGO /MACHINE:X86 /DEF:$< /OUT:$@
# Compile object files from source
.c.obj:
CL.EXE /nologo /Wall /W4 /Ogityb0 /GfX /Fo$@ /c $<
.cpp.obj:
CL.EXE /nologo /Wall /W4 /Ogityb0 /GfX /Fo$@ /c $<
# Header files used for each object
src/JSRF/Jet2.obj: src/JSRF/Core.hpp src/Std.hpp src/XDK/D3D.h\
src/XDK/Win32.h
src/JSRF/Core.obj: src/JSRF/Core.hpp src/Smilebit/MMatrix.hpp src/Std.hpp\
src/XDK/D3D.h src/XDK/Win32.h
src/JSRF/GameData.obj: src/JSRF/GameData.hpp
src/XDK/CRT/CRT0.obj: src/XDK/Win32.h