-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.PSP
84 lines (63 loc) · 2.56 KB
/
Makefile.PSP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# -*- Makefile -*-
#
# Makefile.PSP - Makefile rules for Sony Play Station Portable Firmware version 1.0
# Thanks Shiikuru-san
#
PSPPRE = $(shell psp-config --psp-prefix)
PSPDEV = $(shell psp-config --pspdev-path)
PSPSDK = $(shell psp-config --pspsdk-path)
INCS = $(shell $(PSPPRE)/bin/sdl-config --cflags) $(shell $(PSPPRE)/bin/freetype-config --cflags)
LIBS = $(shell $(PSPPRE)/bin/sdl-config --libs)
LIBS += -lSDL_ttf -lfreetype -lSDL_mixer -lSDL_image -lSDL -lSDLmain -lbz2 -ljpeg -lpng -lz -lmad -lvorbisidec
# Include PSPSDK and Libc Headers
INCS += -I$(PSPSDK)/include -I$(PSPDEV)/include -I$(PSPPRE)/include
# Link PSPSDK and Libc Libraries
LIBS += -L$(PSPSDK)/lib -L$(PSPDEV)/lib -lstdc++ -lc -lm -lpsppower -lpspnet_inet
# with OggVorbis (Tremor) in PDA size (QVGA)
#DEFS = -DPSP -DPDA_WIDTH=320 -DBPP16 -DMP3_MAD -DUSE_OGG_VORBIS -DINTEGER_OGG_VORBIS -DUSE_RWOPS
# with OggVorbis (Tremor) in PSP size (360x270)
DEFS = -DPSP -DPDA_WIDTH=360 -DBPP16 -DMP3_MAD -DUSE_OGG_VORBIS -DINTEGER_OGG_VORBIS -DUSE_RWOPS
# with OggVorbis (Tremor) in PSP size (384x288)
#DEFS = -DPSP -DPDA_WIDTH=384 -DBPP16 -DMP3_MAD -DUSE_OGG_VORBIS -DINTEGER_OGG_VORBIS -DUSE_RWOPS
EXESUFFIX = .elf
OBJSUFFIX = .o
.SUFFIXES:
.SUFFIXES: $(OBJSUFFIX) .cpp .h
CC = psp-gcc
LD = psp-gcc -o
CFLAGS = -g -G0 -O3 -Wall -Wpointer-arith -fno-exceptions -fno-rtti -fno-check-new -pipe -c $(INCS) $(DEFS)
RM = rm -f
TARGET = EBOOT.PBP
EXT_OBJS = MadWrapper$(OBJSUFFIX)
# onscripter.elf -> EBOOT.PBP for PSP Firmware version 1.0
FIXUP_IMPORTS = psp-fixup-imports
STRIP = psp-strip
MKSFO = mksfo
PACK_PBP = pack-pbp
PSP_TARGET = onscripter$(EXESUFFIX)
PSP_TARGET_FIXUP = onscripter_fixup$(EXESUFFIX)
PSP_TARGET_STRIP = onscripter_strip$(EXESUFFIX)
PSP_EBOOT_TITLE = ONScripter for PSP
PSP_EBOOT_SFO = PARAM.SFO
PSP_EBOOT_ICON = NULL
PSP_EBOOT_ICON1 = NULL
PSP_EBOOT_UNKPNG = NULL
PSP_EBOOT_PIC1 = NULL
PSP_EBOOT_SND0 = NULL
PSP_EBOOT_PSAR = NULL
EBOOT.PBP : $(PSP_TARGET_STRIP) $(PSP_EBOOT_SFO)
$(PACK_PBP) EBOOT.PBP $(PSP_EBOOT_SFO) $(PSP_EBOOT_ICON) \
$(PSP_EBOOT_ICON1) $(PSP_EBOOT_UNKPNG) $(PSP_EBOOT_PIC1) \
$(PSP_EBOOT_SND0) $(PSP_TARGET_STRIP) $(PSP_EBOOT_PSAR)
$(PSP_EBOOT_SFO) :
$(MKSFO) '$(PSP_EBOOT_TITLE)' $(PSP_EBOOT_SFO)
$(PSP_TARGET_FIXUP) : $(PSP_TARGET)
$(FIXUP_IMPORTS) $(PSP_TARGET) -o $(PSP_TARGET_FIXUP)
$(PSP_TARGET_STRIP) : $(PSP_TARGET_FIXUP)
$(STRIP) $(PSP_TARGET_FIXUP) -o $(PSP_TARGET_STRIP)
include Makefile.onscripter
# overriding
clean :
$(RM) $(TARGET)
$(RM) $(PSP_TARGET) $(PSP_TARGET_FIXUP) $(PSP_TARGET_STRIP) $(PSP_EBOOT_SFO)
$(RM) *.o