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
137 $(MAKE
) -C elfldr
clean
138 echo
" * 10K kernel patches"
139 $(MAKE
) -C kpatch_10K
clean
141 $(MAKE
) -C modules
/iopcore
/imgdrv
clean
143 $(MAKE
) -C modules
/iopcore
/eesync
clean
144 echo
" * cdvdman.irx"
145 $(MAKE
) -C modules
/iopcore
/cdvdman
-f Makefile.usb
clean
146 $(MAKE
) -C modules
/iopcore
/cdvdman
-f Makefile.usb
.4Ksectors
clean
147 $(MAKE
) -C modules
/iopcore
/cdvdman
-f Makefile.smb
clean
148 $(MAKE
) -C modules
/iopcore
/cdvdman
-f Makefile.smb.pcmcia
clean
149 $(MAKE
) -C modules
/iopcore
/cdvdman
-f Makefile.hdd
clean
150 $(MAKE
) -C modules
/iopcore
/cdvdman
-f Makefile.hdd.pcmcia
clean
151 $(MAKE
) -C modules
/iopcore
/cdvdman
-f Makefile.hdd.hdpro
clean
152 echo
" * cdvdfsv.irx"
153 $(MAKE
) -C modules
/iopcore
/cdvdfsv
clean
155 $(MAKE
) -C modules
/iopcore
/cddev
clean
156 echo
" * usbhdfsd.irx"
157 $(MAKE
) -C modules
/usb
/usbhdfsd
clean
158 echo
" * ps2dev9.irx"
159 $(MAKE
) -C modules
/dev9
clean
160 echo
" * SMSUTILS.irx"
161 $(MAKE
) -C modules
/network
/SMSUTILS
clean
162 echo
" * SMSTCPIP.irx"
163 $(MAKE
) -C modules
/network
/SMSTCPIP
clean
165 $(MAKE
) -C modules
/network
/SMSMAP
clean
167 $(MAKE
) -C modules
/cdvd
/discID
clean
168 echo
" * ps2atad.irx"
169 $(MAKE
) -C modules
/hdd
/atad
clean
170 echo
" * hdpro_atad.irx"
171 $(MAKE
) -C modules
/hdd
/hdpro_atad
clean
173 $(MAKE
) -C modules
/hdd
/ps2hdd
clean
176 $(MAKE
) -C modules
/ps2fs
clean
178 $(MAKE
) -C modules
/mcemu
-f Makefile.usb
clean
179 $(MAKE
) -C modules
/mcemu
-f Makefile.hdd
clean
180 $(MAKE
) -C modules
/mcemu
-f Makefile.smb
clean
183 $(MAKE
) -C modules
/vmc
/genvmc
clean
184 echo
" * hdldsvr.irx"
185 $(MAKE
) -C modules
/hdd
/hdldsvr
clean
187 $(MAKE
) -C modules
/debug
/udptty
clean
188 echo
" * ioptrap.irx"
189 $(MAKE
) -C modules
/debug
/ioptrap
clean
190 echo
" * ps2link.irx"
191 $(MAKE
) -C modules
/debug
/ps2link
clean
198 echo
"Building iso2opl, opl2iso and genvmc..."
199 $(MAKE
) _WIN32
=0 -C
pc
202 echo
"Building WIN32 iso2opl, opl2iso and genvmc..."
203 $(MAKE
) _WIN32
=1 -C
pc
207 $(MAKE
) -C ee_core
clean
208 $(MAKE
) $(VMC_FLAGS
) $(EECORE_DEBUG_FLAGS
) -C ee_core
209 bin2s ee_core
/ee_core.elf asm
/ee_core.s eecore_elf
212 echo
" * alternative EE core"
213 $(MAKE
) -C ee_core
clean
214 $(MAKE
) $(VMC_FLAGS
) $(EECORE_DEBUG_FLAGS
) -C ee_core
-f Makefile.alt
215 bin2s ee_core
/ee_core.elf asm
/alt_ee_core.s alt_eecore_elf
219 $(MAKE
) -C elfldr
clean
221 bin2s elfldr
/elfldr.elf asm
/elfldr.s elfldr_elf
224 echo
" * 10K kernel patches"
225 $(MAKE
) -C kpatch_10K
226 bin2s kpatch_10K
/kpatch.elf asm
/kpatch_10K.s kpatch_10K_elf
230 $(MAKE
) -C modules
/iopcore
/imgdrv
231 bin2s modules
/iopcore
/imgdrv
/imgdrv.irx asm
/imgdrv.s imgdrv_irx
235 $(MAKE
) -C modules
/iopcore
/eesync
236 bin2s modules
/iopcore
/eesync
/eesync.irx asm
/eesync.s eesync_irx
239 echo
" * usb_cdvdman.irx"
240 $(MAKE
) $(VMC_FLAGS
) $(CDVDMAN_DEBUG_FLAGS
) -C modules
/iopcore
/cdvdman
-f Makefile.usb rebuild
241 bin2s modules
/iopcore
/cdvdman
/cdvdman.irx asm
/usb_cdvdman.s usb_cdvdman_irx
243 usb_4Ksectors_cdvdman.s
:
244 echo
" * usb_4Ksectors_cdvdman.irx"
245 $(MAKE
) $(VMC_FLAGS
) $(CDVDMAN_DEBUG_FLAGS
) -C modules
/iopcore
/cdvdman
-f Makefile.usb
.4Ksectors rebuild
246 bin2s modules
/iopcore
/cdvdman
/cdvdman.irx asm
/usb_4Ksectors_cdvdman.s usb_4Ksectors_cdvdman_irx
249 echo
" * smb_cdvdman.irx"
250 $(MAKE
) $(VMC_FLAGS
) $(CDVDMAN_DEBUG_FLAGS
) -C modules
/iopcore
/cdvdman
-f Makefile.smb rebuild
251 bin2s modules
/iopcore
/cdvdman
/cdvdman.irx asm
/smb_cdvdman.s smb_cdvdman_irx
253 smb_pcmcia_cdvdman.s
:
254 echo
" * smb_pcmcia_cdvdman.irx"
255 $(MAKE
) $(VMC_FLAGS
) $(CDVDMAN_DEBUG_FLAGS
) -C modules
/iopcore
/cdvdman
-f Makefile.smb.pcmcia rebuild
256 bin2s modules
/iopcore
/cdvdman
/cdvdman.irx asm
/smb_pcmcia_cdvdman.s smb_pcmcia_cdvdman_irx
259 echo
" * hdd_cdvdman.irx"
260 $(MAKE
) $(VMC_FLAGS
) $(CDVDMAN_DEBUG_FLAGS
) -C modules
/iopcore
/cdvdman
-f Makefile.hdd rebuild
261 bin2s modules
/iopcore
/cdvdman
/cdvdman.irx asm
/hdd_cdvdman.s hdd_cdvdman_irx
263 hdd_pcmcia_cdvdman.s
:
264 echo
" * hdd_pcmcia_cdvdman.irx"
265 $(MAKE
) $(VMC_FLAGS
) $(CDVDMAN_DEBUG_FLAGS
) -C modules
/iopcore
/cdvdman
-f Makefile.hdd.pcmcia rebuild
266 bin2s modules
/iopcore
/cdvdman
/cdvdman.irx asm
/hdd_pcmcia_cdvdman.s hdd_pcmcia_cdvdman_irx
269 echo
" * hdd_hdpro_cdvdman.irx"
270 $(MAKE
) $(VMC_FLAGS
) $(CDVDMAN_DEBUG_FLAGS
) -C modules
/iopcore
/cdvdman
-f Makefile.hdd.hdpro rebuild
271 bin2s modules
/iopcore
/cdvdman
/cdvdman.irx asm
/hdd_hdpro_cdvdman.s hdd_hdpro_cdvdman_irx
274 echo
" * cdvdfsv.irx"
275 $(MAKE
) -C modules
/iopcore
/cdvdfsv
276 bin2s modules
/iopcore
/cdvdfsv
/cdvdfsv.irx asm
/cdvdfsv.s cdvdfsv_irx
280 $(MAKE
) -C modules
/iopcore
/cddev
281 bin2s modules
/iopcore
/cddev
/cddev.irx asm
/cddev.s cddev_irx
284 echo
" * usb_mcemu.irx"
285 $(MAKE
) $(MCEMU_DEBUG_FLAGS
) -C modules
/mcemu
-f Makefile.usb rebuild
286 bin2s modules
/mcemu
/mcemu.irx asm
/usb_mcemu.s usb_mcemu_irx
289 echo
" * hdd_mcemu.irx"
290 $(MAKE
) $(MCEMU_DEBUG_FLAGS
) -C modules
/mcemu
-f Makefile.hdd rebuild
291 bin2s modules
/mcemu
/mcemu.irx asm
/hdd_mcemu.s hdd_mcemu_irx
294 echo
" * smb_mcemu.irx"
295 $(MAKE
) $(MCEMU_DEBUG_FLAGS
) -C modules
/mcemu
-f Makefile.smb rebuild
296 bin2s modules
/mcemu
/mcemu.irx asm
/smb_mcemu.s smb_mcemu_irx
299 bin2s
$(PS2SDK
)/iop
/irx
/usbd.irx asm
/usbd_ps2.s usbd_ps2_irx
302 bin2s modules
/usb
/usbd
/usbd.irx asm
/usbd_ps3.s usbd_ps3_irx
305 echo
" * usbhdfsd.irx"
306 $(MAKE
) -C modules
/usb
/usbhdfsd
307 bin2s modules
/usb
/usbhdfsd
/usbhdfsd.irx asm
/usbhdfsd.s usbhdfsd_irx
310 echo
" * ps2dev9.irx"
311 $(MAKE
) -C modules
/dev9
312 bin2s modules
/dev9
/ps2dev9.irx asm
/ps2dev9.s ps2dev9_irx
315 echo
" * SMSUTILS.irx"
316 $(MAKE
) -C modules
/network
/SMSUTILS
317 bin2s modules
/network
/SMSUTILS
/SMSUTILS.irx asm
/smsutils.s smsutils_irx
320 echo
" * SMSTCPIP.irx"
321 $(MAKE
) -C modules
/network
/SMSTCPIP
-f Makefile rebuild
322 bin2s modules
/network
/SMSTCPIP
/SMSTCPIP.irx asm
/smstcpip.s smstcpip_irx
325 echo
" * in-game SMSTCPIP.irx"
326 $(MAKE
) $(SMSTCPIP_INGAME_CFLAGS
) -C modules
/network
/SMSTCPIP rebuild
327 bin2s modules
/network
/SMSTCPIP
/SMSTCPIP.irx asm
/ingame_smstcpip.s ingame_smstcpip_irx
331 $(MAKE
) -C modules
/network
/SMSMAP
332 bin2s modules
/network
/SMSMAP
/SMSMAP.irx asm
/smsmap.s smsmap_irx
335 bin2s
$(PS2SDK
)/iop
/irx
/smbman.irx asm
/smbman.s smbman_irx
339 $(MAKE
) -C modules
/cdvd
/discID
340 bin2s modules
/cdvd
/discID
/discID.irx asm
/discid.s discid_irx
343 echo
" * ps2atad.irx"
344 $(MAKE
) -C modules
/hdd
/atad
345 bin2s modules
/hdd
/atad
/ps2atad.irx asm
/ps2atad.s ps2atad_irx
348 echo
" * hdpro_atad.irx"
349 $(MAKE
) -C modules
/hdd
/hdpro_atad
350 bin2s modules
/hdd
/hdpro_atad
/hdpro_atad.irx asm
/hdpro_atad.s hdpro_atad_irx
353 bin2s
$(PS2SDK
)/iop
/irx
/poweroff.irx asm
/poweroff.s poweroff_irx
357 $(MAKE
) -C modules
/hdd
/ps2hdd
358 bin2s modules
/hdd
/ps2hdd
/ps2hdd.irx asm
/ps2hdd.s ps2hdd_irx
362 $(MAKE
) $(MOD_DEBUG_FLAGS
) -C modules
/vmc
/genvmc
363 bin2s modules
/vmc
/genvmc
/genvmc.irx asm
/genvmc.s genvmc_irx
366 echo
" * hdldsvr.irx"
367 $(MAKE
) -C modules
/hdd
/hdldsvr
368 bin2s modules
/hdd
/hdldsvr
/hdldsvr.irx asm
/hdldsvr.s hdldsvr_irx
372 $(MAKE
) -C modules
/debug
/udptty
373 bin2s modules
/debug
/udptty
/udptty.irx asm
/udptty.s udptty_irx
376 echo
" * ioptrap.irx"
377 $(MAKE
) -C modules
/debug
/ioptrap
378 bin2s modules
/debug
/ioptrap
/ioptrap.irx asm
/ioptrap.s ioptrap_irx
381 echo
" * ps2link.irx"
382 $(MAKE
) -C modules
/debug
/ps2link
383 bin2s modules
/debug
/ps2link
/ps2link.irx asm
/ps2link.s ps2link_irx
387 $(MAKE
) -C modules
/ps2fs
388 bin2s modules
/ps2fs
/ps2fs.irx asm
/ps2fs.s ps2fs_irx
391 bin2s
$(PS2SDK
)/iop
/irx
/iomanX.irx asm
/iomanx.s iomanx_irx
394 bin2s
$(PS2SDK
)/iop
/irx
/fileXio.irx asm
/filexio.s filexio_irx
397 bin2s gfx
/load0.png asm
/load0.s load0_png
400 bin2s gfx
/load1.png asm
/load1.s load1_png
403 bin2s gfx
/load2.png asm
/load2.s load2_png
406 bin2s gfx
/load3.png asm
/load3.s load3_png
409 bin2s gfx
/load4.png asm
/load4.s load4_png
412 bin2s gfx
/load5.png asm
/load5.s load5_png
415 bin2s gfx
/load6.png asm
/load6.s load6_png
418 bin2s gfx
/load7.png asm
/load7.s load7_png
421 bin2s gfx
/logo.png asm
/logo.s logo_png
424 bin2s gfx
/usb.png asm
/usb_icon.s usb_png
427 bin2s gfx
/hdd.png asm
/hdd_icon.s hdd_png
430 bin2s gfx
/eth.png asm
/eth_icon.s eth_png
433 bin2s gfx
/app.png asm
/app_icon.s app_png
436 bin2s gfx
/cross.png asm
/cross_icon.s cross_png
439 bin2s gfx
/triangle.png asm
/triangle_icon.s triangle_png
442 bin2s gfx
/circle.png asm
/circle_icon.s circle_png
445 bin2s gfx
/square.png asm
/square_icon.s square_png
448 bin2s gfx
/select.png asm
/select_icon.s select_png
451 bin2s gfx
/start.png asm
/start_icon.s start_png
454 bin2s gfx
/left.png asm
/left_icon.s left_png
457 bin2s gfx
/right.png asm
/right_icon.s right_png
460 bin2s gfx
/up.png asm
/up_icon.s up_png
463 bin2s gfx
/down.png asm
/down_icon.s down_png
466 bin2s gfx
/L1.png asm
/L1_icon.s L1_png
469 bin2s gfx
/L2.png asm
/L2_icon.s L2_png
472 bin2s gfx
/R1.png asm
/R1_icon.s R1_png
475 bin2s gfx
/R2.png asm
/R2_icon.s R2_png
478 bin2s thirdparty
/FreeSans_basic_latin.ttf asm
/freesans.s freesansfont_raw
481 bin2s gfx
/icon.sys asm
/icon_sys.s icon_sys
484 bin2s gfx
/opl.icn asm
/icon_icn.s icon_icn
486 $(EE_OBJS_DIR
)%.o
: $(EE_SRC_DIR
)%.c
487 $(EE_CC
) $(EE_CFLAGS
) $(EE_INCS
) -c
$< -o
$@
489 $(EE_OBJS_DIR
)%.o
: %.s
490 $(EE_AS
) $(EE_ASFLAGS
) $(EE_ASM_DIR
)$< -o
$@
493 include $(PS2SDK
)/samples
/Makefile.pref
494 include $(PS2SDK
)/samples
/Makefile.eeglobal