5 #comment following line to build without vmc
10 FT_DIR
= thirdparty
/freetype-2.3
.12
11 FT_LIBDIR
= $(FT_DIR
)/objs
13 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 \
14 obj
/dia.o obj
/ioman.o obj
/texcache.o obj
/themes.o obj
/supportbase.o obj
/usbsupport.o obj
/ethsupport.o obj
/hddsupport.o \
15 obj
/appsupport.o obj
/gui.o obj
/textures.o obj
/opl.o obj
/atlas.o
17 GFX_OBJS
= obj
/usb_icon.o obj
/hdd_icon.o obj
/eth_icon.o obj
/app_icon.o \
18 obj
/cross_icon.o obj
/triangle_icon.o obj
/circle_icon.o obj
/square_icon.o obj
/select_icon.o obj
/start_icon.o \
19 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 \
20 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 \
21 obj
/icon_sys.o obj
/icon_icn.o
23 EECORE_OBJS
= obj
/ee_core.o \
24 obj
/alt_ee_core.o obj
/elfldr.o obj
/kpatch_10K.o obj
/imgdrv.o obj
/eesync.o \
25 obj
/usb_cdvdman.o obj
/usb_4Ksectors_cdvdman.o obj
/smb_cdvdman.o obj
/smb_pcmcia_cdvdman.o \
26 obj
/hdd_cdvdman.o obj
/hdd_pcmcia_cdvdman.o obj
/hdd_hdpro_cdvdman.o \
27 obj
/cdvdfsv.o obj
/usbd_ps2.o obj
/usbd_ps3.o obj
/usbhdfsd.o obj
/cddev.o \
28 obj
/ps2dev9.o obj
/smsutils.o obj
/smstcpip.o obj
/ingame_smstcpip.o obj
/smsmap.o obj
/smbman.o obj
/discid.o \
29 obj
/ps2atad.o obj
/hdpro_atad.o obj
/poweroff.o obj
/ps2hdd.o obj
/genvmc.o obj
/hdldsvr.o \
30 obj
/udptty.o obj
/iomanx.o obj
/filexio.o obj
/ps2fs.o obj
/util.o obj
/ioptrap.o obj
/ps2link.o
33 EECORE_OBJS
+= obj
/usb_mcemu.o obj
/hdd_mcemu.o obj
/smb_mcemu.o
40 EE_OBJS
= $(FRONTEND_OBJS
) $(GFX_OBJS
) $(EECORE_OBJS
)
42 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
43 #EE_LIBS = -L$(FT_LIBDIR) -L$(PS2SDK)/ports/lib -L$(GSKIT)/lib -lgskit -ldmakit -lgskit_toolkit -ldebug -lpoweroff -lfileXio -lpatches -lpad -lm -lmc -lfreetype
44 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
47 EE_CFLAGS
:= -D__DEBUG
-g
48 ifeq ($(EESIO_DEBUG
),1)
49 EE_CFLAGS
+= -D__EESIO_DEBUG
59 ifeq ($(CHILDPROOF
),1)
60 EE_CFLAGS
+= -D__CHILDPROOF
70 SMSTCPIP_INGAME_CFLAGS
= INGAME_DRIVER
=1
72 MOD_DEBUG_FLAGS
= DEBUG
=1
74 ifeq ($(EESIO_DEBUG
),1)
75 EECORE_DEBUG_FLAGS
= EESIO_DEBUG
=1
77 ifeq ($(INGAME_DEBUG
),1)
78 EECORE_DEBUG_FLAGS
= LOAD_DEBUG_MODULES
=1
79 CDVDMAN_DEBUG_FLAGS
= USE_DEV9
=1
80 SMSTCPIP_INGAME_CFLAGS
=
82 ifeq ($(IOPCORE_DEBUG
),1)
83 EECORE_DEBUG_FLAGS
= LOAD_DEBUG_MODULES
=1
84 CDVDMAN_DEBUG_FLAGS
= IOPCORE_DEBUG
=1
85 MCEMU_DEBUG_FLAGS
= IOPCORE_DEBUG
=1
86 SMSTCPIP_INGAME_CFLAGS
=
95 echo
"Building Freetype..."
96 $(MAKE
) -C
$(FT_DIR
) setup ps2
> /dev
/null
99 echo
"Building Open PS2 Loader..."
107 echo
"Compressing..."
108 ps2-packer opl.elf OPNPS2LD.ELF
> /dev
/null
112 $(MAKE
) CHILDPROOF
=1 all
118 $(MAKE
) INGAME_DEBUG
=1 DEBUG
=1 all
121 $(MAKE
) EESIO_DEBUG
=1 DEBUG
=1 all
124 $(MAKE
) IOPCORE_DEBUG
=1 DEBUG
=1 all
127 echo
" * Freetype..."
128 $(MAKE
) -C
$(FT_DIR
) distclean
133 rm -f
$(EE_BIN
) OPNPS2LD.ELF asm
/*.
* obj
/*.
*
135 $(MAKE
) -C ee_core
clean
136 $(MAKE
) -C ee_core
-f Makefile.alt
clean
138 $(MAKE
) -C elfldr
clean
139 echo
" * 10K kernel patches"
140 $(MAKE
) -C kpatch_10K
clean
142 $(MAKE
) -C modules
/iopcore
/imgdrv
clean
144 $(MAKE
) -C modules
/iopcore
/eesync
clean
145 echo
" * cdvdman.irx"
146 $(MAKE
) -C modules
/iopcore
/cdvdman
-f Makefile.usb
clean
147 $(MAKE
) -C modules
/iopcore
/cdvdman
-f Makefile.usb
.4Ksectors
clean
148 $(MAKE
) -C modules
/iopcore
/cdvdman
-f Makefile.smb
clean
149 $(MAKE
) -C modules
/iopcore
/cdvdman
-f Makefile.smb.pcmcia
clean
150 $(MAKE
) -C modules
/iopcore
/cdvdman
-f Makefile.hdd
clean
151 $(MAKE
) -C modules
/iopcore
/cdvdman
-f Makefile.hdd.pcmcia
clean
152 $(MAKE
) -C modules
/iopcore
/cdvdman
-f Makefile.hdd.hdpro
clean
153 echo
" * cdvdfsv.irx"
154 $(MAKE
) -C modules
/iopcore
/cdvdfsv
clean
156 $(MAKE
) -C modules
/iopcore
/cddev
clean
157 echo
" * usbhdfsd.irx"
158 $(MAKE
) -C modules
/usb
/usbhdfsd
clean
159 echo
" * ps2dev9.irx"
160 $(MAKE
) -C modules
/dev9
clean
161 echo
" * SMSUTILS.irx"
162 $(MAKE
) -C modules
/network
/SMSUTILS
clean
163 echo
" * SMSTCPIP.irx"
164 $(MAKE
) -C modules
/network
/SMSTCPIP
clean
166 $(MAKE
) -C modules
/network
/SMSMAP
clean
168 $(MAKE
) -C modules
/cdvd
/discID
clean
169 echo
" * ps2atad.irx"
170 $(MAKE
) -C modules
/hdd
/atad
clean
171 echo
" * hdpro_atad.irx"
172 $(MAKE
) -C modules
/hdd
/hdpro_atad
clean
174 $(MAKE
) -C modules
/hdd
/ps2hdd
clean
177 $(MAKE
) -C modules
/ps2fs
clean
179 $(MAKE
) -C modules
/mcemu
-f Makefile.usb
clean
180 $(MAKE
) -C modules
/mcemu
-f Makefile.hdd
clean
181 $(MAKE
) -C modules
/mcemu
-f Makefile.smb
clean
184 $(MAKE
) -C modules
/vmc
/genvmc
clean
185 echo
" * hdldsvr.irx"
186 $(MAKE
) -C modules
/hdd
/hdldsvr
clean
188 $(MAKE
) -C modules
/debug
/udptty
clean
189 echo
" * ioptrap.irx"
190 $(MAKE
) -C modules
/debug
/ioptrap
clean
191 echo
" * ps2link.irx"
192 $(MAKE
) -C modules
/debug
/ps2link
clean
199 echo
"Building iso2opl, opl2iso and genvmc..."
200 $(MAKE
) _WIN32
=0 -C
pc
203 echo
"Building WIN32 iso2opl, opl2iso and genvmc..."
204 $(MAKE
) _WIN32
=1 -C
pc
208 $(MAKE
) -C ee_core
clean
209 $(MAKE
) $(VMC_FLAGS
) $(EECORE_DEBUG_FLAGS
) -C ee_core
210 bin2s ee_core
/ee_core.elf asm
/ee_core.s eecore_elf
213 echo
" * alternative EE core"
214 $(MAKE
) -C ee_core
-f Makefile.alt
clean
215 $(MAKE
) $(VMC_FLAGS
) $(EECORE_DEBUG_FLAGS
) -C ee_core
-f Makefile.alt
216 bin2s ee_core
/ee_core.elf asm
/alt_ee_core.s alt_eecore_elf
220 $(MAKE
) -C elfldr
clean
222 bin2s elfldr
/elfldr.elf asm
/elfldr.s elfldr_elf
225 echo
" * 10K kernel patches"
226 $(MAKE
) -C kpatch_10K
227 bin2s kpatch_10K
/kpatch.elf asm
/kpatch_10K.s kpatch_10K_elf
231 $(MAKE
) -C modules
/iopcore
/imgdrv
232 bin2s modules
/iopcore
/imgdrv
/imgdrv.irx asm
/imgdrv.s imgdrv_irx
236 $(MAKE
) -C modules
/iopcore
/eesync
237 bin2s modules
/iopcore
/eesync
/eesync.irx asm
/eesync.s eesync_irx
240 echo
" * usb_cdvdman.irx"
241 $(MAKE
) $(VMC_FLAGS
) $(CDVDMAN_DEBUG_FLAGS
) -C modules
/iopcore
/cdvdman
-f Makefile.usb rebuild
242 bin2s modules
/iopcore
/cdvdman
/cdvdman.irx asm
/usb_cdvdman.s usb_cdvdman_irx
244 usb_4Ksectors_cdvdman.s
:
245 echo
" * usb_4Ksectors_cdvdman.irx"
246 $(MAKE
) $(VMC_FLAGS
) $(CDVDMAN_DEBUG_FLAGS
) -C modules
/iopcore
/cdvdman
-f Makefile.usb
.4Ksectors rebuild
247 bin2s modules
/iopcore
/cdvdman
/cdvdman.irx asm
/usb_4Ksectors_cdvdman.s usb_4Ksectors_cdvdman_irx
250 echo
" * smb_cdvdman.irx"
251 $(MAKE
) $(VMC_FLAGS
) $(CDVDMAN_DEBUG_FLAGS
) -C modules
/iopcore
/cdvdman
-f Makefile.smb rebuild
252 bin2s modules
/iopcore
/cdvdman
/cdvdman.irx asm
/smb_cdvdman.s smb_cdvdman_irx
254 smb_pcmcia_cdvdman.s
:
255 echo
" * smb_pcmcia_cdvdman.irx"
256 $(MAKE
) $(VMC_FLAGS
) $(CDVDMAN_DEBUG_FLAGS
) -C modules
/iopcore
/cdvdman
-f Makefile.smb.pcmcia rebuild
257 bin2s modules
/iopcore
/cdvdman
/cdvdman.irx asm
/smb_pcmcia_cdvdman.s smb_pcmcia_cdvdman_irx
260 echo
" * hdd_cdvdman.irx"
261 $(MAKE
) $(VMC_FLAGS
) $(CDVDMAN_DEBUG_FLAGS
) -C modules
/iopcore
/cdvdman
-f Makefile.hdd rebuild
262 bin2s modules
/iopcore
/cdvdman
/cdvdman.irx asm
/hdd_cdvdman.s hdd_cdvdman_irx
264 hdd_pcmcia_cdvdman.s
:
265 echo
" * hdd_pcmcia_cdvdman.irx"
266 $(MAKE
) $(VMC_FLAGS
) $(CDVDMAN_DEBUG_FLAGS
) -C modules
/iopcore
/cdvdman
-f Makefile.hdd.pcmcia rebuild
267 bin2s modules
/iopcore
/cdvdman
/cdvdman.irx asm
/hdd_pcmcia_cdvdman.s hdd_pcmcia_cdvdman_irx
270 echo
" * hdd_hdpro_cdvdman.irx"
271 $(MAKE
) $(VMC_FLAGS
) $(CDVDMAN_DEBUG_FLAGS
) -C modules
/iopcore
/cdvdman
-f Makefile.hdd.hdpro rebuild
272 bin2s modules
/iopcore
/cdvdman
/cdvdman.irx asm
/hdd_hdpro_cdvdman.s hdd_hdpro_cdvdman_irx
275 echo
" * cdvdfsv.irx"
276 $(MAKE
) -C modules
/iopcore
/cdvdfsv
277 bin2s modules
/iopcore
/cdvdfsv
/cdvdfsv.irx asm
/cdvdfsv.s cdvdfsv_irx
281 $(MAKE
) -C modules
/iopcore
/cddev
282 bin2s modules
/iopcore
/cddev
/cddev.irx asm
/cddev.s cddev_irx
285 echo
" * usb_mcemu.irx"
286 $(MAKE
) $(MCEMU_DEBUG_FLAGS
) -C modules
/mcemu
-f Makefile.usb rebuild
287 bin2s modules
/mcemu
/mcemu.irx asm
/usb_mcemu.s usb_mcemu_irx
290 echo
" * hdd_mcemu.irx"
291 $(MAKE
) $(MCEMU_DEBUG_FLAGS
) -C modules
/mcemu
-f Makefile.hdd rebuild
292 bin2s modules
/mcemu
/mcemu.irx asm
/hdd_mcemu.s hdd_mcemu_irx
295 echo
" * smb_mcemu.irx"
296 $(MAKE
) $(MCEMU_DEBUG_FLAGS
) -C modules
/mcemu
-f Makefile.smb rebuild
297 bin2s modules
/mcemu
/mcemu.irx asm
/smb_mcemu.s smb_mcemu_irx
300 bin2s
$(PS2SDK
)/iop
/irx
/usbd.irx asm
/usbd_ps2.s usbd_ps2_irx
303 bin2s modules
/usb
/usbd
/usbd.irx asm
/usbd_ps3.s usbd_ps3_irx
306 echo
" * usbhdfsd.irx"
307 $(MAKE
) -C modules
/usb
/usbhdfsd
308 bin2s modules
/usb
/usbhdfsd
/usbhdfsd.irx asm
/usbhdfsd.s usbhdfsd_irx
311 echo
" * ps2dev9.irx"
312 $(MAKE
) -C modules
/dev9
313 bin2s modules
/dev9
/ps2dev9.irx asm
/ps2dev9.s ps2dev9_irx
316 echo
" * SMSUTILS.irx"
317 $(MAKE
) -C modules
/network
/SMSUTILS
318 bin2s modules
/network
/SMSUTILS
/SMSUTILS.irx asm
/smsutils.s smsutils_irx
321 echo
" * SMSTCPIP.irx"
322 $(MAKE
) -C modules
/network
/SMSTCPIP
-f Makefile rebuild
323 bin2s modules
/network
/SMSTCPIP
/SMSTCPIP.irx asm
/smstcpip.s smstcpip_irx
326 echo
" * in-game SMSTCPIP.irx"
327 $(MAKE
) $(SMSTCPIP_INGAME_CFLAGS
) -C modules
/network
/SMSTCPIP rebuild
328 bin2s modules
/network
/SMSTCPIP
/SMSTCPIP.irx asm
/ingame_smstcpip.s ingame_smstcpip_irx
332 $(MAKE
) -C modules
/network
/SMSMAP
333 bin2s modules
/network
/SMSMAP
/SMSMAP.irx asm
/smsmap.s smsmap_irx
336 bin2s
$(PS2SDK
)/iop
/irx
/smbman.irx asm
/smbman.s smbman_irx
340 $(MAKE
) -C modules
/cdvd
/discID
341 bin2s modules
/cdvd
/discID
/discID.irx asm
/discid.s discid_irx
344 echo
" * ps2atad.irx"
345 $(MAKE
) -C modules
/hdd
/atad
346 bin2s modules
/hdd
/atad
/ps2atad.irx asm
/ps2atad.s ps2atad_irx
349 echo
" * hdpro_atad.irx"
350 $(MAKE
) -C modules
/hdd
/hdpro_atad
351 bin2s modules
/hdd
/hdpro_atad
/hdpro_atad.irx asm
/hdpro_atad.s hdpro_atad_irx
354 bin2s
$(PS2SDK
)/iop
/irx
/poweroff.irx asm
/poweroff.s poweroff_irx
358 $(MAKE
) -C modules
/hdd
/ps2hdd
359 bin2s modules
/hdd
/ps2hdd
/ps2hdd.irx asm
/ps2hdd.s ps2hdd_irx
363 $(MAKE
) $(MOD_DEBUG_FLAGS
) -C modules
/vmc
/genvmc
364 bin2s modules
/vmc
/genvmc
/genvmc.irx asm
/genvmc.s genvmc_irx
367 echo
" * hdldsvr.irx"
368 $(MAKE
) -C modules
/hdd
/hdldsvr
369 bin2s modules
/hdd
/hdldsvr
/hdldsvr.irx asm
/hdldsvr.s hdldsvr_irx
373 $(MAKE
) -C modules
/debug
/udptty
374 bin2s modules
/debug
/udptty
/udptty.irx asm
/udptty.s udptty_irx
377 echo
" * ioptrap.irx"
378 $(MAKE
) -C modules
/debug
/ioptrap
379 bin2s modules
/debug
/ioptrap
/ioptrap.irx asm
/ioptrap.s ioptrap_irx
382 echo
" * ps2link.irx"
383 $(MAKE
) -C modules
/debug
/ps2link
384 bin2s modules
/debug
/ps2link
/ps2link.irx asm
/ps2link.s ps2link_irx
388 $(MAKE
) -C modules
/ps2fs
389 bin2s modules
/ps2fs
/ps2fs.irx asm
/ps2fs.s ps2fs_irx
392 bin2s
$(PS2SDK
)/iop
/irx
/iomanX.irx asm
/iomanx.s iomanx_irx
395 bin2s
$(PS2SDK
)/iop
/irx
/fileXio.irx asm
/filexio.s filexio_irx
398 bin2s gfx
/load0.png asm
/load0.s load0_png
401 bin2s gfx
/load1.png asm
/load1.s load1_png
404 bin2s gfx
/load2.png asm
/load2.s load2_png
407 bin2s gfx
/load3.png asm
/load3.s load3_png
410 bin2s gfx
/load4.png asm
/load4.s load4_png
413 bin2s gfx
/load5.png asm
/load5.s load5_png
416 bin2s gfx
/load6.png asm
/load6.s load6_png
419 bin2s gfx
/load7.png asm
/load7.s load7_png
422 bin2s gfx
/logo.png asm
/logo.s logo_png
425 bin2s gfx
/usb.png asm
/usb_icon.s usb_png
428 bin2s gfx
/hdd.png asm
/hdd_icon.s hdd_png
431 bin2s gfx
/eth.png asm
/eth_icon.s eth_png
434 bin2s gfx
/app.png asm
/app_icon.s app_png
437 bin2s gfx
/cross.png asm
/cross_icon.s cross_png
440 bin2s gfx
/triangle.png asm
/triangle_icon.s triangle_png
443 bin2s gfx
/circle.png asm
/circle_icon.s circle_png
446 bin2s gfx
/square.png asm
/square_icon.s square_png
449 bin2s gfx
/select.png asm
/select_icon.s select_png
452 bin2s gfx
/start.png asm
/start_icon.s start_png
455 bin2s gfx
/left.png asm
/left_icon.s left_png
458 bin2s gfx
/right.png asm
/right_icon.s right_png
461 bin2s gfx
/up.png asm
/up_icon.s up_png
464 bin2s gfx
/down.png asm
/down_icon.s down_png
467 bin2s gfx
/L1.png asm
/L1_icon.s L1_png
470 bin2s gfx
/L2.png asm
/L2_icon.s L2_png
473 bin2s gfx
/R1.png asm
/R1_icon.s R1_png
476 bin2s gfx
/R2.png asm
/R2_icon.s R2_png
479 bin2s thirdparty
/FreeSans_basic_latin.ttf asm
/freesans.s freesansfont_raw
482 bin2s gfx
/icon.sys asm
/icon_sys.s icon_sys
485 bin2s gfx
/opl.icn asm
/icon_icn.s icon_icn
487 $(EE_OBJS_DIR
)%.o
: $(EE_SRC_DIR
)%.c
488 $(EE_CC
) $(EE_CFLAGS
) $(EE_INCS
) -c
$< -o
$@
490 $(EE_OBJS_DIR
)%.o
: %.s
491 $(EE_AS
) $(EE_ASFLAGS
) $(EE_ASM_DIR
)$< -o
$@
494 include $(PS2SDK
)/samples
/Makefile.pref
495 include $(PS2SDK
)/samples
/Makefile.eeglobal