ItemsList can now use clipping too. As a result, the "items" option for ItemsList...
[open-ps2-loader/simon.git] / Makefile
blobf98d08e457483033732ff694335125dd97d2530b
1 .SILENT:
3 DEBUG = 0
4 EESIO_DEBUG = 0
5 #comment following line to build without vmc
6 VMC = 1
7 CHILDPROOF = 0
9 FT_DIR = thirdparty/freetype-2.3.12
10 FT_LIBDIR = $(FT_DIR)/objs
12 FRONTEND_OBJS = obj/pad.o obj/fntsys.o obj/renderman.o obj/menusys.o obj/system.o obj/debug.o obj/lang.o obj/config.o obj/hdd.o obj/dialogs.o \
13 obj/dia.o obj/ioman.o obj/texcache.o obj/themes.o obj/supportbase.o obj/usbsupport.o obj/ethsupport.o obj/hddsupport.o \
14 obj/appsupport.o obj/gui.o obj/textures.o obj/opl.o obj/atlas.o
16 GFX_OBJS = obj/usb_icon.o obj/hdd_icon.o obj/eth_icon.o obj/app_icon.o \
17 obj/cross_icon.o obj/triangle_icon.o obj/circle_icon.o obj/square_icon.o obj/select_icon.o obj/start_icon.o \
18 obj/left_icon.o obj/right_icon.o obj/up_icon.o obj/down_icon.o obj/L1_icon.o obj/L2_icon.o obj/R1_icon.o obj/R2_icon.o \
19 obj/load0.o obj/load1.o obj/load2.o obj/load3.o obj/load4.o obj/load5.o obj/load6.o obj/load7.o obj/logo.o obj/freesans.o \
20 obj/icon_sys.o obj/icon_icn.o
22 EECORE_OBJS = obj/ee_core.o \
23 obj/alt_ee_core.o obj/elfldr.o obj/kpatch_10K.o obj/imgdrv.o obj/eesync.o \
24 obj/usb_cdvdman.o obj/usb_4Ksectors_cdvdman.o obj/smb_cdvdman.o obj/smb_pcmcia_cdvdman.o \
25 obj/hdd_cdvdman.o obj/hdd_pcmcia_cdvdman.o obj/hdd_hdpro_cdvdman.o \
26 obj/cdvdfsv.o obj/usbd_ps2.o obj/usbd_ps3.o obj/usbhdfsd.o obj/cddev.o \
27 obj/ps2dev9.o obj/smsutils.o obj/smstcpip.o obj/ingame_smstcpip.o obj/smsmap.o obj/smbman.o obj/discid.o \
28 obj/ps2atad.o obj/hdpro_atad.o obj/poweroff.o obj/ps2hdd.o obj/genvmc.o obj/hdldsvr.o \
29 obj/udptty.o obj/iomanx.o obj/filexio.o obj/ps2fs.o obj/util.o obj/ioptrap.o obj/ps2link.o
31 ifeq ($(VMC),1)
32 EECORE_OBJS += obj/usb_mcemu.o obj/hdd_mcemu.o obj/smb_mcemu.o
33 endif
35 EE_BIN = opl.elf
36 EE_SRC_DIR = src/
37 EE_OBJS_DIR = obj/
38 EE_ASM_DIR = asm/
39 EE_OBJS = $(FRONTEND_OBJS) $(GFX_OBJS) $(EECORE_OBJS)
41 EE_LIBS = -L$(FT_LIBDIR) -L$(PS2SDK)/ports/lib -L$(GSKIT)/lib -lgskit -ldmakit -lgskit_toolkit -lpoweroff -lfileXio -lpatches -lpad -ljpeg -lpng -lz -ldebug -lm -lmc -lfreetype -lvux -lcdvd
42 #EE_LIBS = -L$(FT_LIBDIR) -L$(PS2SDK)/ports/lib -L$(GSKIT)/lib -lgskit -ldmakit -lgskit_toolkit -ldebug -lpoweroff -lfileXio -lpatches -lpad -lm -lmc -lfreetype
43 EE_INCS += -I$(PS2SDK)/ports/include -I$(GSKIT)/include -I$(GSKIT)/ee/dma/include -I$(GSKIT)/ee/gs/include -I$(GSKIT)/ee/toolkit/include -I$(FT_DIR)/include
45 ifeq ($(DEBUG),1)
46 EE_CFLAGS := -D__DEBUG -g
47 ifeq ($(EESIO_DEBUG),1)
48 EE_CFLAGS += -D__EESIO_DEBUG
49 endif
50 else
51 EE_CFLAGS := -O2
52 endif
54 ifeq ($(CHILDPROOF),1)
55 EE_CFLAGS += -D__CHILDPROOF
56 endif
58 ifeq ($(VMC),1)
59 EE_CFLAGS += -DVMC
60 VMC_FLAGS = VMC=1
61 else
62 VMC_FLAGS = VMC=0
63 endif
65 SMSTCPIP_INGAME_CFLAGS = INGAME_DRIVER=1
66 ifeq ($(DEBUG),1)
67 MOD_DEBUG_FLAGS = DEBUG=1
68 endif
69 ifeq ($(EESIO_DEBUG),1)
70 EECORE_DEBUG_FLAGS = EESIO_DEBUG=1
71 endif
72 ifeq ($(INGAME_DEBUG),1)
73 EECORE_DEBUG_FLAGS = LOAD_DEBUG_MODULES=1
74 CDVDMAN_DEBUG_FLAGS = USE_DEV9=1
75 SMSTCPIP_INGAME_CFLAGS =
76 else
77 ifeq ($(IOPCORE_DEBUG),1)
78 EECORE_DEBUG_FLAGS = LOAD_DEBUG_MODULES=1
79 CDVDMAN_DEBUG_FLAGS = IOPCORE_DEBUG=1
80 MCEMU_DEBUG_FLAGS = IOPCORE_DEBUG=1
81 SMSTCPIP_INGAME_CFLAGS =
82 endif
83 endif
86 all:
87 @mkdir -p obj
88 @mkdir -p asm
90 echo "Building Freetype..."
91 $(MAKE) -C $(FT_DIR) setup ps2 > /dev/null
92 $(MAKE) -C $(FT_DIR)
94 echo "Building Open PS2 Loader..."
95 echo " * Interface"
96 $(MAKE) $(EE_BIN)
98 ifeq ($(DEBUG),0)
99 echo "Stripping..."
100 ee-strip opl.elf
102 echo "Compressing..."
103 ps2-packer opl.elf OPNPS2LD.ELF > /dev/null
104 endif
106 childproof:
107 $(MAKE) CHILDPROOF=1 all
109 debug:
110 $(MAKE) DEBUG=1 all
112 ingame_debug:
113 $(MAKE) INGAME_DEBUG=1 DEBUG=1 all
115 eesio_debug:
116 $(MAKE) EESIO_DEBUG=1 DEBUG=1 all
118 iopcore_debug:
119 $(MAKE) IOPCORE_DEBUG=1 DEBUG=1 all
121 clean: sclean
122 echo " * Freetype..."
123 $(MAKE) -C $(FT_DIR) distclean
125 sclean:
126 echo "Cleaning..."
127 echo " * Interface"
128 rm -f $(EE_BIN) OPNPS2LD.ELF asm/*.* obj/*.*
129 echo " * EE core"
130 $(MAKE) -C ee_core clean
131 echo " * Elf Loader"
132 $(MAKE) -C elfldr clean
133 echo " * 10K kernel patches"
134 $(MAKE) -C kpatch_10K clean
135 echo " * imgdrv.irx"
136 $(MAKE) -C modules/iopcore/imgdrv clean
137 echo " * eesync.irx"
138 $(MAKE) -C modules/iopcore/eesync clean
139 echo " * cdvdman.irx"
140 $(MAKE) -C modules/iopcore/cdvdman -f Makefile.usb clean
141 $(MAKE) -C modules/iopcore/cdvdman -f Makefile.usb.4Ksectors clean
142 $(MAKE) -C modules/iopcore/cdvdman -f Makefile.smb clean
143 $(MAKE) -C modules/iopcore/cdvdman -f Makefile.smb.pcmcia clean
144 $(MAKE) -C modules/iopcore/cdvdman -f Makefile.hdd clean
145 $(MAKE) -C modules/iopcore/cdvdman -f Makefile.hdd.pcmcia clean
146 $(MAKE) -C modules/iopcore/cdvdman -f Makefile.hdd.hdpro clean
147 echo " * cdvdfsv.irx"
148 $(MAKE) -C modules/iopcore/cdvdfsv clean
149 echo " * cddev.irx"
150 $(MAKE) -C modules/iopcore/cddev clean
151 echo " * usbhdfsd.irx"
152 $(MAKE) -C modules/usb/usbhdfsd clean
153 echo " * ps2dev9.irx"
154 $(MAKE) -C modules/dev9 clean
155 echo " * SMSUTILS.irx"
156 $(MAKE) -C modules/network/SMSUTILS clean
157 echo " * SMSTCPIP.irx"
158 $(MAKE) -C modules/network/SMSTCPIP clean
159 echo " * SMSMAP.irx"
160 $(MAKE) -C modules/network/SMSMAP clean
161 echo " * smbman.irx"
162 $(MAKE) -C modules/network/smbman clean
163 echo " * discID.irx"
164 $(MAKE) -C modules/cdvd/discID clean
165 echo " * ps2atad.irx"
166 $(MAKE) -C modules/hdd/atad clean
167 echo " * hdpro_atad.irx"
168 $(MAKE) -C modules/hdd/hdpro_atad clean
169 echo " * ps2hdd.irx"
170 $(MAKE) -C modules/hdd/ps2hdd clean
171 ifeq ($(VMC),1)
172 echo " * ps2fs.irx"
173 $(MAKE) -C modules/ps2fs clean
174 echo " * mcemu.irx"
175 $(MAKE) -C modules/mcemu -f Makefile.usb clean
176 $(MAKE) -C modules/mcemu -f Makefile.hdd clean
177 $(MAKE) -C modules/mcemu -f Makefile.smb clean
178 endif
179 echo " * genvmc.irx"
180 $(MAKE) -C modules/vmc/genvmc clean
181 echo " * hdldsvr.irx"
182 $(MAKE) -C modules/hdd/hdldsvr clean
183 echo " * udptty.irx"
184 $(MAKE) -C modules/debug/udptty clean
185 echo " * ioptrap.irx"
186 $(MAKE) -C modules/debug/ioptrap clean
187 echo " * ps2link.irx"
188 $(MAKE) -C modules/debug/ps2link clean
189 echo " * pc tools"
190 $(MAKE) -C pc clean
192 rebuild: clean all
194 pc_tools:
195 echo "Building iso2opl, opl2iso and genvmc..."
196 $(MAKE) _WIN32=0 -C pc
198 pc_tools_win32:
199 echo "Building WIN32 iso2opl, opl2iso and genvmc..."
200 $(MAKE) _WIN32=1 -C pc
202 ee_core.s:
203 echo " * EE core"
204 $(MAKE) -C ee_core clean
205 $(MAKE) $(VMC_FLAGS) $(EECORE_DEBUG_FLAGS) -C ee_core
206 bin2s ee_core/ee_core.elf asm/ee_core.s eecore_elf
208 alt_ee_core.s:
209 echo " * alternative EE core"
210 $(MAKE) -C ee_core clean
211 $(MAKE) $(VMC_FLAGS) $(EECORE_DEBUG_FLAGS) -C ee_core -f Makefile.alt
212 bin2s ee_core/ee_core.elf asm/alt_ee_core.s alt_eecore_elf
214 elfldr.s:
215 echo " * Elf Loader"
216 $(MAKE) -C elfldr clean
217 $(MAKE) -C elfldr
218 bin2s elfldr/elfldr.elf asm/elfldr.s elfldr_elf
220 kpatch_10K.s:
221 echo " * 10K kernel patches"
222 $(MAKE) -C kpatch_10K
223 bin2s kpatch_10K/kpatch.elf asm/kpatch_10K.s kpatch_10K_elf
225 imgdrv.s:
226 echo " * imgdrv.irx"
227 $(MAKE) -C modules/iopcore/imgdrv
228 bin2s modules/iopcore/imgdrv/imgdrv.irx asm/imgdrv.s imgdrv_irx
230 eesync.s:
231 echo " * eesync.irx"
232 $(MAKE) -C modules/iopcore/eesync
233 bin2s modules/iopcore/eesync/eesync.irx asm/eesync.s eesync_irx
235 usb_cdvdman.s:
236 echo " * usb_cdvdman.irx"
237 $(MAKE) $(VMC_FLAGS) $(CDVDMAN_DEBUG_FLAGS) -C modules/iopcore/cdvdman -f Makefile.usb rebuild
238 bin2s modules/iopcore/cdvdman/cdvdman.irx asm/usb_cdvdman.s usb_cdvdman_irx
240 usb_4Ksectors_cdvdman.s:
241 echo " * usb_4Ksectors_cdvdman.irx"
242 $(MAKE) $(VMC_FLAGS) $(CDVDMAN_DEBUG_FLAGS) -C modules/iopcore/cdvdman -f Makefile.usb.4Ksectors rebuild
243 bin2s modules/iopcore/cdvdman/cdvdman.irx asm/usb_4Ksectors_cdvdman.s usb_4Ksectors_cdvdman_irx
245 smb_cdvdman.s:
246 echo " * smb_cdvdman.irx"
247 $(MAKE) $(VMC_FLAGS) $(CDVDMAN_DEBUG_FLAGS) -C modules/iopcore/cdvdman -f Makefile.smb rebuild
248 bin2s modules/iopcore/cdvdman/cdvdman.irx asm/smb_cdvdman.s smb_cdvdman_irx
250 smb_pcmcia_cdvdman.s:
251 echo " * smb_pcmcia_cdvdman.irx"
252 $(MAKE) $(VMC_FLAGS) $(CDVDMAN_DEBUG_FLAGS) -C modules/iopcore/cdvdman -f Makefile.smb.pcmcia rebuild
253 bin2s modules/iopcore/cdvdman/cdvdman.irx asm/smb_pcmcia_cdvdman.s smb_pcmcia_cdvdman_irx
255 hdd_cdvdman.s:
256 echo " * hdd_cdvdman.irx"
257 $(MAKE) $(VMC_FLAGS) $(CDVDMAN_DEBUG_FLAGS) -C modules/iopcore/cdvdman -f Makefile.hdd rebuild
258 bin2s modules/iopcore/cdvdman/cdvdman.irx asm/hdd_cdvdman.s hdd_cdvdman_irx
260 hdd_pcmcia_cdvdman.s:
261 echo " * hdd_pcmcia_cdvdman.irx"
262 $(MAKE) $(VMC_FLAGS) $(CDVDMAN_DEBUG_FLAGS) -C modules/iopcore/cdvdman -f Makefile.hdd.pcmcia rebuild
263 bin2s modules/iopcore/cdvdman/cdvdman.irx asm/hdd_pcmcia_cdvdman.s hdd_pcmcia_cdvdman_irx
265 hdd_hdpro_cdvdman.s:
266 echo " * hdd_hdpro_cdvdman.irx"
267 $(MAKE) $(VMC_FLAGS) $(CDVDMAN_DEBUG_FLAGS) -C modules/iopcore/cdvdman -f Makefile.hdd.hdpro rebuild
268 bin2s modules/iopcore/cdvdman/cdvdman.irx asm/hdd_hdpro_cdvdman.s hdd_hdpro_cdvdman_irx
270 cdvdfsv.s:
271 echo " * cdvdfsv.irx"
272 $(MAKE) -C modules/iopcore/cdvdfsv
273 bin2s modules/iopcore/cdvdfsv/cdvdfsv.irx asm/cdvdfsv.s cdvdfsv_irx
275 cddev.s:
276 echo " * cddev.irx"
277 $(MAKE) -C modules/iopcore/cddev
278 bin2s modules/iopcore/cddev/cddev.irx asm/cddev.s cddev_irx
280 usb_mcemu.s:
281 echo " * usb_mcemu.irx"
282 $(MAKE) $(MCEMU_DEBUG_FLAGS) -C modules/mcemu -f Makefile.usb rebuild
283 bin2s modules/mcemu/mcemu.irx asm/usb_mcemu.s usb_mcemu_irx
285 hdd_mcemu.s:
286 echo " * hdd_mcemu.irx"
287 $(MAKE) $(MCEMU_DEBUG_FLAGS) -C modules/mcemu -f Makefile.hdd rebuild
288 bin2s modules/mcemu/mcemu.irx asm/hdd_mcemu.s hdd_mcemu_irx
290 smb_mcemu.s:
291 echo " * smb_mcemu.irx"
292 $(MAKE) $(MCEMU_DEBUG_FLAGS) -C modules/mcemu -f Makefile.smb rebuild
293 bin2s modules/mcemu/mcemu.irx asm/smb_mcemu.s smb_mcemu_irx
295 usbd_ps2.s:
296 bin2s $(PS2SDK)/iop/irx/usbd.irx asm/usbd_ps2.s usbd_ps2_irx
298 usbd_ps3.s:
299 bin2s modules/usb/usbd/usbd.irx asm/usbd_ps3.s usbd_ps3_irx
301 usbhdfsd.s:
302 echo " * usbhdfsd.irx"
303 $(MAKE) -C modules/usb/usbhdfsd
304 bin2s modules/usb/usbhdfsd/usbhdfsd.irx asm/usbhdfsd.s usbhdfsd_irx
306 ps2dev9.s:
307 echo " * ps2dev9.irx"
308 $(MAKE) -C modules/dev9
309 bin2s modules/dev9/ps2dev9.irx asm/ps2dev9.s ps2dev9_irx
311 smsutils.s:
312 echo " * SMSUTILS.irx"
313 $(MAKE) -C modules/network/SMSUTILS
314 bin2s modules/network/SMSUTILS/SMSUTILS.irx asm/smsutils.s smsutils_irx
316 smstcpip.s:
317 echo " * SMSTCPIP.irx"
318 $(MAKE) -C modules/network/SMSTCPIP -f Makefile rebuild
319 bin2s modules/network/SMSTCPIP/SMSTCPIP.irx asm/smstcpip.s smstcpip_irx
321 ingame_smstcpip.s:
322 echo " * in-game SMSTCPIP.irx"
323 $(MAKE) $(SMSTCPIP_INGAME_CFLAGS) -C modules/network/SMSTCPIP rebuild
324 bin2s modules/network/SMSTCPIP/SMSTCPIP.irx asm/ingame_smstcpip.s ingame_smstcpip_irx
326 smsmap.s:
327 echo " * SMSMAP.irx"
328 $(MAKE) -C modules/network/SMSMAP
329 bin2s modules/network/SMSMAP/SMSMAP.irx asm/smsmap.s smsmap_irx
331 smbman.s:
332 echo " * smbman.irx"
333 $(MAKE) $(MOD_DEBUG_FLAGS) -C modules/network/smbman
334 bin2s modules/network/smbman/smbman.irx asm/smbman.s smbman_irx
336 discid.s:
337 echo " * discID.irx"
338 $(MAKE) -C modules/cdvd/discID
339 bin2s modules/cdvd/discID/discID.irx asm/discid.s discid_irx
341 ps2atad.s:
342 echo " * ps2atad.irx"
343 $(MAKE) -C modules/hdd/atad
344 bin2s modules/hdd/atad/ps2atad.irx asm/ps2atad.s ps2atad_irx
346 hdpro_atad.s:
347 echo " * hdpro_atad.irx"
348 $(MAKE) -C modules/hdd/hdpro_atad
349 bin2s modules/hdd/hdpro_atad/hdpro_atad.irx asm/hdpro_atad.s hdpro_atad_irx
351 poweroff.s:
352 bin2s $(PS2SDK)/iop/irx/poweroff.irx asm/poweroff.s poweroff_irx
354 ps2hdd.s:
355 echo " * ps2hdd.irx"
356 $(MAKE) -C modules/hdd/ps2hdd
357 bin2s modules/hdd/ps2hdd/ps2hdd.irx asm/ps2hdd.s ps2hdd_irx
359 genvmc.s:
360 echo " * genvmc.irx"
361 $(MAKE) $(MOD_DEBUG_FLAGS) -C modules/vmc/genvmc
362 bin2s modules/vmc/genvmc/genvmc.irx asm/genvmc.s genvmc_irx
364 hdldsvr.s:
365 echo " * hdldsvr.irx"
366 $(MAKE) -C modules/hdd/hdldsvr
367 bin2s modules/hdd/hdldsvr/hdldsvr.irx asm/hdldsvr.s hdldsvr_irx
369 udptty.s:
370 echo " * udptty.irx"
371 $(MAKE) -C modules/debug/udptty
372 bin2s modules/debug/udptty/udptty.irx asm/udptty.s udptty_irx
374 ioptrap.s:
375 echo " * ioptrap.irx"
376 $(MAKE) -C modules/debug/ioptrap
377 bin2s modules/debug/ioptrap/ioptrap.irx asm/ioptrap.s ioptrap_irx
379 ps2link.s:
380 echo " * ps2link.irx"
381 $(MAKE) -C modules/debug/ps2link
382 bin2s modules/debug/ps2link/ps2link.irx asm/ps2link.s ps2link_irx
384 ps2fs.s:
385 echo " * ps2fs.irx"
386 $(MAKE) -C modules/ps2fs
387 bin2s modules/ps2fs/ps2fs.irx asm/ps2fs.s ps2fs_irx
389 iomanx.s:
390 bin2s $(PS2SDK)/iop/irx/iomanX.irx asm/iomanx.s iomanx_irx
392 filexio.s:
393 bin2s $(PS2SDK)/iop/irx/fileXio.irx asm/filexio.s filexio_irx
395 load0.s:
396 bin2s gfx/load0.png asm/load0.s load0_png
398 load1.s:
399 bin2s gfx/load1.png asm/load1.s load1_png
401 load2.s:
402 bin2s gfx/load2.png asm/load2.s load2_png
404 load3.s:
405 bin2s gfx/load3.png asm/load3.s load3_png
407 load4.s:
408 bin2s gfx/load4.png asm/load4.s load4_png
410 load5.s:
411 bin2s gfx/load5.png asm/load5.s load5_png
413 load6.s:
414 bin2s gfx/load6.png asm/load6.s load6_png
416 load7.s:
417 bin2s gfx/load7.png asm/load7.s load7_png
419 logo.s:
420 bin2s gfx/logo.png asm/logo.s logo_png
422 usb_icon.s:
423 bin2s gfx/usb.png asm/usb_icon.s usb_png
425 hdd_icon.s:
426 bin2s gfx/hdd.png asm/hdd_icon.s hdd_png
428 eth_icon.s:
429 bin2s gfx/eth.png asm/eth_icon.s eth_png
431 app_icon.s:
432 bin2s gfx/app.png asm/app_icon.s app_png
434 cross_icon.s:
435 bin2s gfx/cross.png asm/cross_icon.s cross_png
437 triangle_icon.s:
438 bin2s gfx/triangle.png asm/triangle_icon.s triangle_png
440 circle_icon.s:
441 bin2s gfx/circle.png asm/circle_icon.s circle_png
443 square_icon.s:
444 bin2s gfx/square.png asm/square_icon.s square_png
446 select_icon.s:
447 bin2s gfx/select.png asm/select_icon.s select_png
449 start_icon.s:
450 bin2s gfx/start.png asm/start_icon.s start_png
452 left_icon.s:
453 bin2s gfx/left.png asm/left_icon.s left_png
455 right_icon.s:
456 bin2s gfx/right.png asm/right_icon.s right_png
458 up_icon.s:
459 bin2s gfx/up.png asm/up_icon.s up_png
461 down_icon.s:
462 bin2s gfx/down.png asm/down_icon.s down_png
464 L1_icon.s:
465 bin2s gfx/L1.png asm/L1_icon.s L1_png
467 L2_icon.s:
468 bin2s gfx/L2.png asm/L2_icon.s L2_png
470 R1_icon.s:
471 bin2s gfx/R1.png asm/R1_icon.s R1_png
473 R2_icon.s:
474 bin2s gfx/R2.png asm/R2_icon.s R2_png
476 freesans.s:
477 bin2s thirdparty/FreeSans_basic_latin.ttf asm/freesans.s freesansfont_raw
479 icon_sys.s:
480 bin2s gfx/icon.sys asm/icon_sys.s icon_sys
482 icon_icn.s:
483 bin2s gfx/opl.icn asm/icon_icn.s icon_icn
485 $(EE_OBJS_DIR)%.o : $(EE_SRC_DIR)%.c
486 $(EE_CC) $(EE_CFLAGS) $(EE_INCS) -c $< -o $@
488 $(EE_OBJS_DIR)%.o : %.s
489 $(EE_AS) $(EE_ASFLAGS) $(EE_ASM_DIR)$< -o $@
492 include $(PS2SDK)/samples/Makefile.pref
493 include $(PS2SDK)/samples/Makefile.eeglobal