forked from 173210/snes9xTYL
-
Notifications
You must be signed in to change notification settings - Fork 16
/
makefile_multi
102 lines (73 loc) · 2.72 KB
/
makefile_multi
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
TARGET = snes9xTYL
ifdef ME_ACTIVE
EMUNAME_VERSION = Snes9xTYLme Mod 180404
else
EMUNAME_VERSION = Snes9xTYLcm Mod 180404
endif
INCDIR = psp psp/me psp/openspc++ psp/adhoc zlib danzeff
CFLAGS = -march=allegrex -O2 -G0 -Wall -pipe \
-fsingle-precision-constant -fpredictive-commoning -ffunction-sections -frename-registers -fno-gcse \
-finline-functions -finline-limit=20000 -falign-functions=64 -falign-loops=64 -fno-align-jumps -fno-align-labels \
-DFW3X -DPSP -D__PSP__ -DEMUNAME_VERSION="\"$(EMUNAME_VERSION)\""
LDFLAGS = -fwhole-program
ifndef ME_ACTIVE
USE_USER_LIBS = 1
endif
ifndef FAT_SUPPORT
BUILD_PRX = 1
endif
PSP_FW_VERSION = 371
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS) -c
LIBS = -ljpeg -lpng -lstdc++ \
-lpspaudio -lpsppower -lpsputility -lpspwlan -lpspkubridge \
-lpspgum_vfpu -lpspvfpu -lpspgu \
-lpspusb -lpspusbstor
EXTRA_TARGETS = EBOOT.PBP
# use my own target - thx to zelurker for pointing this to me in neocdpsp ;-)
PSP_EBOOT_TITLE = $(EMUNAME_VERSION)
PSP_EBOOT_ICON = data/icon0.png
# Object files
PSP_OBJECTS = apu.o apudebug.o c4.o c4emu.o cheats.o cheats2.o clip.o \
cpu.o cpuexec.o cpuops.o data.o debug.o dma.o dsp1.o \
fxdbg.o fxemu.o fxinst.o gfx_mode7.o gfx.o gfx_org.o gfx_psp.o gfx_psp_fix.o \
globals.o hwregisters.o loadzip.o memmap.o ppu.o sa1.o sa1cpu.o sdd1.o sdd1emu.o \
snapshot.o snes9x.o spc700.o spc7110.o srtc.o soundux.o \
tile.o tile_org.o tile_sw.o tile_psp.o unzip.o
#sound_mips.o snaporig.o
PLATFORMOBJ = psp/blitter.o psp/config.o psp/decrypt.o psp/filer.o \
psp/imageio.o psp/img_jpeg.o psp/math.o psp/menu.o psp/menu_fx.o \
psp/me/mem64.o psp/psp.o psp/psp_ui.o psp/psplib.o psp/pg.o psp/psp_msg.o
MEOBJ = psp/MediaEngine.o psp/mediaengineprx/me.o
HOMEHOOKOBJ = psp/homehook.o
SPCOBJ = psp/openspc++/dsp.o psp/openspc++/spc.o psp/openspc++/ospcmain.o psp/openspc++/os9xZ_openspc.o
NETOBJ = psp/psp_net.o psp/adhoc/pspadhoc.o psp/adhoc/selectorMenu.o
ZLIBOBJ = zlib/adler32.o zlib/compress.o zlib/crc32.o zlib/gzio.o \
zlib/uncompr.o zlib/deflate.o zlib/trees.o zlib/zutil.o zlib/inflate.o \
zlib/infback.o zlib/inftrees.o zlib/inffast.o
DANZOBJ = danzeff/danzeff.o
OBJS = $(PLATFORMOBJ) $(PSP_OBJECTS) $(ZLIBOBJ) $(SPCOBJ) $(DANZOBJ)
ifdef ME_ACTIVE
INCDIR += psp/mediaengineprx
OBJS += $(MEOBJ)
CFLAGS += -DME_SOUND
endif
ifdef HOME_HOOK_ON
INCDIR += psp/homehookprx
OBJS += $(HOMEHOOKOBJ)
CFLAGS += -DHOME_HOOK
endif
ifdef USE_ADHOC
LIBS += -lpspnet_adhoc -lpspnet_adhocctl -lpspnet_adhocmatching
OBJS += $(NETOBJ)
CFLAGS+= -DUSE_ADHOC
endif
ifdef FAT_SUPPORT
CFLAGS+= -DFAT_SUPPORT
endif
CFLAGS += -DNOKERNEL
# Rules to make libraries
PSPSDK = $(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
clean:
OBJS += $(MEOBJ) $(NETOBJ) $(HOMEHOOKOBJ)