5 #comment following line to build without vmc
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
32 EECORE_OBJS
+= obj
/usb_mcemu.o obj
/hdd_mcemu.o obj
/smb_mcemu.o
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
46 EE_CFLAGS
:= -D__DEBUG
-g
47 ifeq ($(EESIO_DEBUG
),1)
48 EE_CFLAGS
+= -D__EESIO_DEBUG
54 ifeq ($(CHILDPROOF
),1)
55 EE_CFLAGS
+= -D__CHILDPROOF
65 SMSTCPIP_INGAME_CFLAGS
= INGAME_DRIVER
=1
67 MOD_DEBUG_FLAGS
= DEBUG
=1
69 ifeq ($(EESIO_DEBUG
),1)
70 EECORE_DEBUG_FLAGS
= EESIO_DEBUG
=1
72 ifeq ($(INGAME_DEBUG
),1)
73 EECORE_DEBUG_FLAGS
= LOAD_DEBUG_MODULES
=1
74 CDVDMAN_DEBUG_FLAGS
= USE_DEV9
=1
75 SMSTCPIP_INGAME_CFLAGS
=
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
=
90 echo
"Building Freetype..."
91 $(MAKE
) -C
$(FT_DIR
) setup ps2
> /dev
/null
94 echo
"Building Open PS2 Loader..."
102 echo
"Compressing..."
103 ps2-packer opl.elf OPNPS2LD.ELF
> /dev
/null
107 $(MAKE
) CHILDPROOF
=1 all
113 $(MAKE
) INGAME_DEBUG
=1 DEBUG
=1 all
116 $(MAKE
) EESIO_DEBUG
=1 DEBUG
=1 all
119 $(MAKE
) IOPCORE_DEBUG
=1 DEBUG
=1 all
122 echo
" * Freetype..."
123 $(MAKE
) -C
$(FT_DIR
) distclean
128 rm -f
$(EE_BIN
) OPNPS2LD.ELF asm
/*.
* obj
/*.
*
130 $(MAKE
) -C ee_core
clean
132 $(MAKE
) -C elfldr
clean
133 echo
" * 10K kernel patches"
134 $(MAKE
) -C kpatch_10K
clean
136 $(MAKE
) -C modules
/iopcore
/imgdrv
clean
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
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
160 $(MAKE
) -C modules
/network
/SMSMAP
clean
162 $(MAKE
) -C modules
/network
/smbman
clean
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
170 $(MAKE
) -C modules
/hdd
/ps2hdd
clean
173 $(MAKE
) -C modules
/ps2fs
clean
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
180 $(MAKE
) -C modules
/vmc
/genvmc
clean
181 echo
" * hdldsvr.irx"
182 $(MAKE
) -C modules
/hdd
/hdldsvr
clean
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
195 echo
"Building iso2opl, opl2iso and genvmc..."
196 $(MAKE
) _WIN32
=0 -C
pc
199 echo
"Building WIN32 iso2opl, opl2iso and genvmc..."
200 $(MAKE
) _WIN32
=1 -C
pc
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
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
216 $(MAKE
) -C elfldr
clean
218 bin2s elfldr
/elfldr.elf asm
/elfldr.s elfldr_elf
221 echo
" * 10K kernel patches"
222 $(MAKE
) -C kpatch_10K
223 bin2s kpatch_10K
/kpatch.elf asm
/kpatch_10K.s kpatch_10K_elf
227 $(MAKE
) -C modules
/iopcore
/imgdrv
228 bin2s modules
/iopcore
/imgdrv
/imgdrv.irx asm
/imgdrv.s imgdrv_irx
232 $(MAKE
) -C modules
/iopcore
/eesync
233 bin2s modules
/iopcore
/eesync
/eesync.irx asm
/eesync.s eesync_irx
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
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
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
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
271 echo
" * cdvdfsv.irx"
272 $(MAKE
) -C modules
/iopcore
/cdvdfsv
273 bin2s modules
/iopcore
/cdvdfsv
/cdvdfsv.irx asm
/cdvdfsv.s cdvdfsv_irx
277 $(MAKE
) -C modules
/iopcore
/cddev
278 bin2s modules
/iopcore
/cddev
/cddev.irx asm
/cddev.s cddev_irx
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
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
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
296 bin2s
$(PS2SDK
)/iop
/irx
/usbd.irx asm
/usbd_ps2.s usbd_ps2_irx
299 bin2s modules
/usb
/usbd
/usbd.irx asm
/usbd_ps3.s usbd_ps3_irx
302 echo
" * usbhdfsd.irx"
303 $(MAKE
) -C modules
/usb
/usbhdfsd
304 bin2s modules
/usb
/usbhdfsd
/usbhdfsd.irx asm
/usbhdfsd.s usbhdfsd_irx
307 echo
" * ps2dev9.irx"
308 $(MAKE
) -C modules
/dev9
309 bin2s modules
/dev9
/ps2dev9.irx asm
/ps2dev9.s ps2dev9_irx
312 echo
" * SMSUTILS.irx"
313 $(MAKE
) -C modules
/network
/SMSUTILS
314 bin2s modules
/network
/SMSUTILS
/SMSUTILS.irx asm
/smsutils.s smsutils_irx
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
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
328 $(MAKE
) -C modules
/network
/SMSMAP
329 bin2s modules
/network
/SMSMAP
/SMSMAP.irx asm
/smsmap.s smsmap_irx
333 $(MAKE
) $(MOD_DEBUG_FLAGS
) -C modules
/network
/smbman
334 bin2s modules
/network
/smbman
/smbman.irx asm
/smbman.s smbman_irx
338 $(MAKE
) -C modules
/cdvd
/discID
339 bin2s modules
/cdvd
/discID
/discID.irx asm
/discid.s discid_irx
342 echo
" * ps2atad.irx"
343 $(MAKE
) -C modules
/hdd
/atad
344 bin2s modules
/hdd
/atad
/ps2atad.irx asm
/ps2atad.s ps2atad_irx
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
352 bin2s
$(PS2SDK
)/iop
/irx
/poweroff.irx asm
/poweroff.s poweroff_irx
356 $(MAKE
) -C modules
/hdd
/ps2hdd
357 bin2s modules
/hdd
/ps2hdd
/ps2hdd.irx asm
/ps2hdd.s ps2hdd_irx
361 $(MAKE
) $(MOD_DEBUG_FLAGS
) -C modules
/vmc
/genvmc
362 bin2s modules
/vmc
/genvmc
/genvmc.irx asm
/genvmc.s genvmc_irx
365 echo
" * hdldsvr.irx"
366 $(MAKE
) -C modules
/hdd
/hdldsvr
367 bin2s modules
/hdd
/hdldsvr
/hdldsvr.irx asm
/hdldsvr.s hdldsvr_irx
371 $(MAKE
) -C modules
/debug
/udptty
372 bin2s modules
/debug
/udptty
/udptty.irx asm
/udptty.s udptty_irx
375 echo
" * ioptrap.irx"
376 $(MAKE
) -C modules
/debug
/ioptrap
377 bin2s modules
/debug
/ioptrap
/ioptrap.irx asm
/ioptrap.s ioptrap_irx
380 echo
" * ps2link.irx"
381 $(MAKE
) -C modules
/debug
/ps2link
382 bin2s modules
/debug
/ps2link
/ps2link.irx asm
/ps2link.s ps2link_irx
386 $(MAKE
) -C modules
/ps2fs
387 bin2s modules
/ps2fs
/ps2fs.irx asm
/ps2fs.s ps2fs_irx
390 bin2s
$(PS2SDK
)/iop
/irx
/iomanX.irx asm
/iomanx.s iomanx_irx
393 bin2s
$(PS2SDK
)/iop
/irx
/fileXio.irx asm
/filexio.s filexio_irx
396 bin2s gfx
/load0.png asm
/load0.s load0_png
399 bin2s gfx
/load1.png asm
/load1.s load1_png
402 bin2s gfx
/load2.png asm
/load2.s load2_png
405 bin2s gfx
/load3.png asm
/load3.s load3_png
408 bin2s gfx
/load4.png asm
/load4.s load4_png
411 bin2s gfx
/load5.png asm
/load5.s load5_png
414 bin2s gfx
/load6.png asm
/load6.s load6_png
417 bin2s gfx
/load7.png asm
/load7.s load7_png
420 bin2s gfx
/logo.png asm
/logo.s logo_png
423 bin2s gfx
/usb.png asm
/usb_icon.s usb_png
426 bin2s gfx
/hdd.png asm
/hdd_icon.s hdd_png
429 bin2s gfx
/eth.png asm
/eth_icon.s eth_png
432 bin2s gfx
/app.png asm
/app_icon.s app_png
435 bin2s gfx
/cross.png asm
/cross_icon.s cross_png
438 bin2s gfx
/triangle.png asm
/triangle_icon.s triangle_png
441 bin2s gfx
/circle.png asm
/circle_icon.s circle_png
444 bin2s gfx
/square.png asm
/square_icon.s square_png
447 bin2s gfx
/select.png asm
/select_icon.s select_png
450 bin2s gfx
/start.png asm
/start_icon.s start_png
453 bin2s gfx
/left.png asm
/left_icon.s left_png
456 bin2s gfx
/right.png asm
/right_icon.s right_png
459 bin2s gfx
/up.png asm
/up_icon.s up_png
462 bin2s gfx
/down.png asm
/down_icon.s down_png
465 bin2s gfx
/L1.png asm
/L1_icon.s L1_png
468 bin2s gfx
/L2.png asm
/L2_icon.s L2_png
471 bin2s gfx
/R1.png asm
/R1_icon.s R1_png
474 bin2s gfx
/R2.png asm
/R2_icon.s R2_png
477 bin2s thirdparty
/FreeSans_basic_latin.ttf asm
/freesans.s freesansfont_raw
480 bin2s gfx
/icon.sys asm
/icon_sys.s icon_sys
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