-
Notifications
You must be signed in to change notification settings - Fork 278
/
Makefile
824 lines (621 loc) · 26.6 KB
/
Makefile
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
VERSION = 1
SUBVERSION = 2
PATCHLEVEL = 0
EXTRAVERSION = Beta
# How to DEBUG?
# Simply type "make <debug mode>" to build OPL with the necessary debugging functionality.
# Debug modes:
# debug - UI-side debug mode (UDPTTY)
# iopcore_debug - UI-side + iopcore debug mode (UDPTTY).
# ingame_debug - UI-side + in-game debug mode. IOP core modules will not be built as debug versions (UDPTTY).
# debug_ppctty - UI-side debug mode (PowerPC UART)
# iopcore_ppctty_debug - UI-side + iopcore debug mode (PowerPC UART).
# ingame_ppctty_debug - UI-side + in-game debug mode. IOP core modules will not be built as debug versions (PowerPC UART).
# eesio_debug - UI-side + eecore debug mode (EE SIO)
# deci2_debug - UI-side + in-game DECI2 debug mode (EE-side only).
# I want to put my name in my custom build! How can I do it?
# Type "make LOCALVERSION=-foobar"
# ======== START OF CONFIGURABLE SECTION ========
# You can adjust the variables in this section to meet your needs.
# To enable a feature, set its variable's value to 1. To disable, change it to 0.
# Do not COMMENT out the variables!!
# You can also specify variables when executing make: "make RTL=1 IGS=1 PADEMU=1"
# Check if EXTRA_FEATURES is set, default to 0
EXTRA_FEATURES ?= 0
# Set RTL and IGS based on EXTRA_FEATURES, but allow user overrides
#Enables/disables Right-To-Left (RTL) language support
RTL ?= $(EXTRA_FEATURES)
#Enables/disables In Game Screenshot (IGS). NB: It depends on GSM and IGR to work
IGS ?= $(EXTRA_FEATURES)
#Enables/disables pad emulator
PADEMU ?= 1
#Enables/disables building of an edition of OPL that will support the DTL-T10000 (SDK v2.3+)
DTL_T10000 ?= 0
#Nor stripping neither compressing binary ELF after compiling.
NOT_PACKED ?= 0
# ======== END OF CONFIGURABLE SECTION. DO NOT MODIFY VARIABLES AFTER THIS POINT!! ========
DEBUG ?= 0
EESIO_DEBUG ?= 0
INGAME_DEBUG ?= 0
DECI2_DEBUG ?= 0
#How the TTY will reach developer: 'UDP', 'PPC_UART'.
TTY_APPROACH ?= UDP
# ======== DO NOT MODIFY VALUES AFTER THIS POINT! UNLESS YOU KNOW WHAT YOU ARE DOING ========
REVISION = $(shell expr $(shell git rev-list --count HEAD) + 2)
GIT_HASH = $(shell git rev-parse --short=7 HEAD 2>/dev/null)
ifeq ($(shell git diff --quiet; echo $$?),1)
DIRTY = -dirty
endif
ifneq ($(shell test -d .git; echo $$?),0)
DIRTY = -dirty
endif
GIT_TAG = $(shell git describe --exact-match --tags 2>/dev/null)
OPL_VERSION = v$(VERSION).$(SUBVERSION).$(PATCHLEVEL)$(if $(EXTRAVERSION),-$(EXTRAVERSION))-$(REVISION)$(if $(GIT_HASH),-$(GIT_HASH))$(if $(DIRTY),$(DIRTY))$(if $(LOCALVERSION),-$(LOCALVERSION))
ifneq ($(GIT_TAG),)
ifneq ($(GIT_TAG),latest)
# git revision is tagged
OPL_VERSION = $(GIT_TAG)$(if $(DIRTY),$(DIRTY))
endif
endif
FRONTEND_OBJS = pad.o xparam.o fntsys.o renderman.o menusys.o OSDHistory.o system.o lang.o lang_internal.o config.o hdd.o dialogs.o \
dia.o ioman.o texcache.o themes.o supportbase.o bdmsupport.o ethsupport.o hddsupport.o zso.o lz4.o \
appsupport.o gui.o guigame.o textures.o opl.o atlas.o nbns.o httpclient.o gsm.o cheatman.o sound.o ps2cnf.o
IOP_OBJS = iomanx.o filexio.o ps2fs.o usbd.o bdmevent.o \
bdm.o bdmfs_fatfs.o usbmass_bd.o iLinkman.o IEEE1394_bd.o mx4sio_bd.o \
ps2atad.o hdpro_atad.o poweroff.o ps2hdd.o xhdd.o genvmc.o lwnbdsvr.o \
ps2dev9.o smsutils.o ps2ip.o smap.o isofs.o nbns-iop.o \
sio2man.o padman.o mcman.o mcserv.o \
httpclient-iop.o netman.o ps2ips.o \
bdm_mcemu.o hdd_mcemu.o smb_mcemu.o \
iremsndpatch.o apemodpatch.o f2techioppatch.o cleareffects.o resetspu.o \
libsd.o audsrv.o
EECORE_OBJS = ee_core.o ioprp.o util.o \
udnl.o imgdrv.o eesync.o \
bdm_cdvdman.o IOPRP_img.o smb_cdvdman.o \
hdd_cdvdman.o hdd_hdpro_cdvdman.o cdvdfsv.o \
ingame_smstcpip.o smap_ingame.o smbman.o smbinit.o
PNG_ASSETS = load0 load1 load2 load3 load4 load5 load6 load7 usb usb_bd ilk_bd \
m4s_bd hdd_bd hdd eth app cross triangle circle square select start left right \
background info cover disc screen ELF HDL ISO ZSO UL APPS CD DVD Aspect_s Aspect_w Aspect_w1 \
Aspect_w2 Device_1 Device_2 Device_3 Device_4 Device_5 Device_6 Device_all Rating_0 \
Rating_1 Rating_2 Rating_3 Rating_4 Rating_5 Scan_240p Scan_240p1 Scan_480i Scan_480p \
Scan_480p1 Scan_480p2 Scan_480p3 Scan_480p4 Scan_480p5 Scan_576i Scan_576p Scan_720p \
Scan_1080i Scan_1080i2 Scan_1080p Vmode_multi Vmode_ntsc Vmode_pal logo case apps_case\
Index_0 Index_1 Index_2 Index_3 Index_4
# unused icons - up down l1 l2 l3 r1 r2 r3
GFX_OBJS = $(PNG_ASSETS:%=%_png.o) poeveticanew.o icon_sys.o icon_icn.o
AUDIO_OBJS = boot.o cancel.o confirm.o cursor.o message.o transition.o bd_connect.o bd_disconnect.o
MISC_OBJS = icon_sys_A.o icon_sys_J.o icon_sys_C.o conf_theme_OPL.o
TRANSLATIONS = Albanian Arabic Bulgarian Cebuano Croatian Czech Danish Dutch Filipino French \
German Greek Hungarian Indonesian Italian Japanese Korean Laotian Persian Polish Portuguese \
Portuguese_BR Romana Russian Ryukyuan SChinese Spanish Swedish TChinese Turkish Vietnamese
EE_BIN = opl.elf
EE_BIN_STRIPPED = opl_stripped.elf
EE_BIN_PACKED = OPNPS2LD.ELF
EE_VPKD = OPNPS2LD-$(OPL_VERSION)
EE_SRC_DIR = src/
EE_OBJS_DIR = obj/
EE_ASM_DIR = asm/
LNG_SRC_DIR = lng_src/
LNG_TMPL_DIR = lng_tmpl/
LNG_DIR = lng/
PNG_ASSETS_DIR = gfx/
MAPFILE = opl.map
EE_LDFLAGS += -Wl,-Map,$(MAPFILE)
EE_LIBS = -L$(PS2SDK)/ports/lib -L$(GSKIT)/lib -L./lib -lgskit -ldmakit -lpoweroff -lfileXio -lpatches -lpng -lz -lmc -lfreetype -lvux -lcdvd -lnetman -lps2ips -laudsrv -lvorbisfile -lvorbis -logg -lpadx -lelf-loader-nocolour
EE_INCS += -I$(PS2SDK)/ports/include -I$(PS2SDK)/ports/include/freetype2 -I$(GSKIT)/include -I$(GSKIT)/ee/dma/include -I$(GSKIT)/ee/gs/include -Imodules/iopcore/common -Imodules/network/common -Imodules/hdd/common -Iinclude
BIN2C = $(PS2SDK)/bin/bin2c
# WARNING: Only extra spaces are allowed and ignored at the beginning of the conditional directives (ifeq, ifneq, ifdef, ifndef, else and endif)
# but a tab is not allowed; if the line begins with a tab, it will be considered part of a recipe for a rule!
ifeq ($(RTL),1)
EE_CFLAGS += -D__RTL
endif
ifeq ($(DTL_T10000),1)
EE_CFLAGS += -D_DTL_T10000
EECORE_EXTRA_FLAGS += DTL_T10000=1
UDNL_OUT = $(PS2SDK)/iop/irx/udnl-t300.irx
else
UDNL_OUT = $(PS2SDK)/iop/irx/udnl.irx
endif
ifeq ($(IGS),1)
EE_CFLAGS += -DIGS
IGS_FLAGS = IGS=1
else
IGS_FLAGS = IGS=0
endif
ifeq ($(PADEMU),1)
IOP_OBJS += bt_pademu.o usb_pademu.o ds34usb.o ds34bt.o libds34usb.a libds34bt.a
EE_CFLAGS += -DPADEMU
EE_INCS += -Imodules/ds34bt/ee -Imodules/ds34usb/ee
PADEMU_FLAGS = PADEMU=1
else
PADEMU_FLAGS = PADEMU=0
endif
ifeq ($(DEBUG),1)
EE_CFLAGS += -D__DEBUG -g
ifeq ($(DECI2_DEBUG),1)
EE_OBJS += debug.o drvtif_irx.o tifinet_irx.o deci2_img.o
EE_LDFLAGS += -liopreboot
else ifeq ($(TTY_APPROACH),UDP)
EE_OBJS += debug.o udptty.o ioptrap.o ps2link.o
EE_CFLAGS += -DTTY_UDP
else ifeq ($(TTY_APPROACH),PPC_UART)
EE_OBJS += debug.o ppctty.o ioptrap.o
EE_CFLAGS += -DTTY_PPC_UART
else
$(error Unknown value for TTY_APPROACH: '$(TTY_APPROACH)')
endif
MOD_DEBUG_FLAGS = DEBUG=1
ifeq ($(IOPCORE_DEBUG),1)
EE_CFLAGS += -D__INGAME_DEBUG
EECORE_EXTRA_FLAGS += LOAD_DEBUG_MODULES=1
CDVDMAN_DEBUG_FLAGS = IOPCORE_DEBUG=1
MCEMU_DEBUG_FLAGS = IOPCORE_DEBUG=1
SMSTCPIP_INGAME_CFLAGS =
ifeq ($(TTY_APPROACH),UDP)
IOP_OBJS += udptty-ingame.o
endif
else ifeq ($(EESIO_DEBUG),1)
EE_CFLAGS += -D__EESIO_DEBUG
EE_LIBS += -lsiocookie
else ifeq ($(INGAME_DEBUG),1)
EE_CFLAGS += -D__INGAME_DEBUG
EECORE_EXTRA_FLAGS += LOAD_DEBUG_MODULES=1
CDVDMAN_DEBUG_FLAGS = IOPCORE_DEBUG=1
SMSTCPIP_INGAME_CFLAGS =
ifeq ($(DECI2_DEBUG),1)
EE_CFLAGS += -D__DECI2_DEBUG
EECORE_EXTRA_FLAGS += DECI2_DEBUG=1
IOP_OBJS += drvtif_ingame_irx.o tifinet_ingame_irx.o
DECI2_DEBUG=1
CDVDMAN_DEBUG_FLAGS = USE_DEV9=1 #(clear IOPCORE_DEBUG) dsidb cannot be used to handle exceptions or set breakpoints, so disable output to save resources.
else ifeq ($(TTY_APPROACH),UDP)
IOP_OBJS += udptty-ingame.o
EECORE_EXTRA_FLAGS += "TTY_APPROACH=$(TTY_APPROACH)"
else ifeq ($(TTY_APPROACH),PPC_UART)
EECORE_EXTRA_FLAGS += "TTY_APPROACH=$(TTY_APPROACH)"
endif
endif
else
EE_CFLAGS += -O2
SMSTCPIP_INGAME_CFLAGS = INGAME_DRIVER=1
endif
EE_CFLAGS += -fsingle-precision-constant -DOPL_VERSION=\"$(OPL_VERSION)\"
# There are a few places where the config key/value are truncated, so disable these warnings
EE_CFLAGS += -Wno-format-truncation -Wno-stringop-truncation
# Generate .d files to track header file dependencies of each object file
EE_CFLAGS += -MMD -MP
EE_OBJS += $(FRONTEND_OBJS) $(GFX_OBJS) $(AUDIO_OBJS) $(MISC_OBJS) $(EECORE_OBJS) $(IOP_OBJS)
EE_OBJS := $(EE_OBJS:%=$(EE_OBJS_DIR)%)
EE_DEPS = $($(filter %.o,$(EE_OBJS)):%.o=%.d)
# To help linking getting rid off unused functions and data
EE_CFLAGS += -fdata-sections -ffunction-sections
EE_LDFLAGS += -fdata-sections -ffunction-sections -Wl,--gc-sections
.SILENT:
.PHONY: all release debug iopcore_debug eesio_debug ingame_debug deci2_debug debug_ppctty iopcore_ppctty_debug ingame_ppctty_debug clean rebuild pc_tools pc_tools_win32 oplversion format format-check ps2sdk-not-setup download_lng download_lwNBD languages
ifdef PS2SDK
all: download_lng download_lwNBD languages
echo "Building Open PS2 Loader $(OPL_VERSION)..."
echo "-Interface"
ifneq ($(NOT_PACKED),1)
$(MAKE) $(EE_BIN_PACKED)
else
$(MAKE) $(EE_BIN)
endif
release: download_lng download_lwNBD languages $(EE_VPKD).ZIP
debug:
$(MAKE) DEBUG=1 all
iopcore_debug:
$(MAKE) DEBUG=1 IOPCORE_DEBUG=1 all
eesio_debug:
$(MAKE) DEBUG=1 EESIO_DEBUG=1 all
ingame_debug:
$(MAKE) DEBUG=1 INGAME_DEBUG=1 all
deci2_debug:
$(MAKE) DEBUG=1 INGAME_DEBUG=1 DECI2_DEBUG=1 all
debug_ppctty:
$(MAKE) DEBUG=1 TTY_APPROACH=PPC_UART all
iopcore_ppctty_debug:
$(MAKE) DEBUG=1 IOPCORE_DEBUG=1 TTY_APPROACH=PPC_UART all
ingame_ppctty_debug:
$(MAKE) DEBUG=1 INGAME_DEBUG=1 TTY_APPROACH=PPC_UART all
clean: download_lwNBD
echo "Cleaning..."
echo "-Interface"
rm -fr $(MAPFILE) $(EE_BIN) $(EE_BIN_PACKED) $(EE_BIN_STRIPPED) $(EE_VPKD).* $(EE_OBJS_DIR) $(EE_ASM_DIR)
echo "-EE core"
$(MAKE) -C ee_core clean
echo "-IOP core"
echo " -imgdrv"
$(MAKE) -C modules/iopcore/imgdrv clean
echo " -cdvdman"
$(MAKE) -C modules/iopcore/cdvdman USE_BDM=1 clean
$(MAKE) -C modules/iopcore/cdvdman USE_SMB=1 clean
$(MAKE) -C modules/iopcore/cdvdman USE_HDD=1 clean
$(MAKE) -C modules/iopcore/cdvdman USE_HDPRO=1 clean
echo " -cdvdfsv"
$(MAKE) -C modules/iopcore/cdvdfsv clean
echo " -resetspu"
$(MAKE) -C modules/iopcore/resetspu clean
echo " -patches"
echo " -iremsnd"
$(MAKE) -C modules/iopcore/patches/iremsndpatch clean
echo " -apemod"
$(MAKE) -C modules/iopcore/patches/apemodpatch clean
echo " -f2techiop"
$(MAKE) -C modules/iopcore/patches/f2techioppatch clean
echo " -cleareffects"
$(MAKE) -C modules/iopcore/patches/cleareffects clean
echo " -isofs"
$(MAKE) -C modules/isofs clean
echo " -bdmevent"
$(MAKE) -C modules/bdmevent clean
echo " -SMSUTILS"
$(MAKE) -C modules/network/SMSUTILS clean
echo " -SMSTCPIP"
$(MAKE) -C modules/network/SMSTCPIP clean
echo " -in-game SMAP"
$(MAKE) -C modules/network/smap-ingame clean
echo " -smbinit"
$(MAKE) -C modules/network/smbinit clean
echo " -nbns"
$(MAKE) -C modules/network/nbns clean
echo " -httpclient"
$(MAKE) -C modules/network/httpclient clean
echo " -xhdd"
$(MAKE) -C modules/hdd/xhdd clean
echo " -mcemu"
$(MAKE) -C modules/mcemu USE_BDM=1 clean
$(MAKE) -C modules/mcemu USE_HDD=1 clean
$(MAKE) -C modules/mcemu USE_SMB=1 clean
echo " -genvmc"
$(MAKE) -C modules/vmc/genvmc clean
echo " -lwnbdsvr"
$(MAKE) -C modules/network/lwNBD/ TARGET=iop clean
echo " -udptty-ingame"
$(MAKE) -C modules/debug/udptty-ingame clean
echo " -ps2link"
$(MAKE) -C modules/debug/ps2link clean
echo " -ds34usb"
$(MAKE) -C modules/ds34usb clean
echo " -ds34bt"
$(MAKE) -C modules/ds34bt clean
echo " -pademu"
$(MAKE) -C modules/pademu USE_BT=1 clean
$(MAKE) -C modules/pademu USE_USB=1 clean
echo "-pc tools"
$(MAKE) -C pc clean
realclean: clean
echo "-Language"
rm -fr $(LNG_SRC_DIR) $(LNG_DIR)lang_*.lng $(INTERNAL_LANGUAGE_C) $(INTERNAL_LANGUAGE_H)
rebuild: clean all
run: $(EE_BIN_PACKED)
ps2client -h 192.168.1.10 execee host:$<
sim: $(EE_BIN_PACKED)
PCSX2 --elf=$(PWD)/$< --nodisc --nogui
pc_tools:
echo "Building iso2opl, opl2iso and genvmc..."
$(MAKE) _WIN32=0 -C pc
pc_tools_win32:
echo "Building WIN32 iso2opl, opl2iso and genvmc..."
$(MAKE) _WIN32=1 -C pc
cfla = "thirdparty/clang-format-lint-action"
format-check: download_cfla
@python3 $(cfla)/run-clang-format.py --clang-format-executable $(cfla)/clang-format/clang-format12 -r .
format: download_cfla
@python3 $(cfla)/run-clang-format.py --clang-format-executable $(cfla)/clang-format/clang-format12 -r . -i true
$(EE_ASM_DIR):
@mkdir -p $@
$(EE_OBJS_DIR):
@mkdir -p $@
.PHONY: DETAILED_CHANGELOG
DETAILED_CHANGELOG:
sh make_changelog.sh
$(EE_BIN_STRIPPED): $(EE_BIN)
echo "Stripping..."
$(EE_STRIP) -o $@ $<
$(EE_BIN_PACKED): $(EE_BIN_STRIPPED)
echo "Compressing..."
ps2-packer $< $@ > /dev/null
$(EE_VPKD).ELF: $(EE_BIN_PACKED)
cp -f $< $@
$(EE_VPKD).ZIP: $(EE_VPKD).ELF DETAILED_CHANGELOG CREDITS LICENSE README.md
zip -r $@ $^
echo "Package Complete: $@"
ee_core/ee_core.elf: ee_core
echo "-EE core"
$(MAKE) $(IGS_FLAGS) $(PADEMU_FLAGS) $(EECORE_EXTRA_FLAGS) -C $<
$(EE_ASM_DIR)ee_core.c: ee_core/ee_core.elf | $(EE_ASM_DIR)
$(BIN2C) $< $@ eecore_elf
$(EE_ASM_DIR)udnl.c: $(UDNL_OUT) | $(EE_ASM_DIR)
$(BIN2C) $(UDNL_OUT) $@ udnl_irx
modules/iopcore/imgdrv/imgdrv.irx: modules/iopcore/imgdrv
$(MAKE) -C $<
$(EE_ASM_DIR)imgdrv.c: modules/iopcore/imgdrv/imgdrv.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
$(EE_ASM_DIR)eesync.c: $(PS2SDK)/iop/irx/eesync-nano.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
modules/iopcore/cdvdman/bdm_cdvdman.irx: modules/iopcore/cdvdman
$(MAKE) $(CDVDMAN_PS2LOGO_FLAGS) $(CDVDMAN_DEBUG_FLAGS) USE_BDM=1 -C $< all
$(EE_ASM_DIR)bdm_cdvdman.c: modules/iopcore/cdvdman/bdm_cdvdman.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
modules/iopcore/cdvdman/smb_cdvdman.irx: modules/iopcore/cdvdman
$(MAKE) $(CDVDMAN_PS2LOGO_FLAGS) $(CDVDMAN_DEBUG_FLAGS) USE_SMB=1 -C $< all
$(EE_ASM_DIR)smb_cdvdman.c: modules/iopcore/cdvdman/smb_cdvdman.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
modules/iopcore/cdvdman/hdd_cdvdman.irx: modules/iopcore/cdvdman
$(MAKE) $(CDVDMAN_PS2LOGO_FLAGS) $(CDVDMAN_DEBUG_FLAGS) USE_HDD=1 -C $< all
$(EE_ASM_DIR)hdd_cdvdman.c: modules/iopcore/cdvdman/hdd_cdvdman.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
modules/iopcore/cdvdman/hdd_hdpro_cdvdman.irx: modules/iopcore/cdvdman
$(MAKE) $(CDVDMAN_PS2LOGO_FLAGS) $(CDVDMAN_DEBUG_FLAGS) USE_HDPRO=1 -C $< all
$(EE_ASM_DIR)hdd_hdpro_cdvdman.c: modules/iopcore/cdvdman/hdd_hdpro_cdvdman.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
modules/iopcore/cdvdfsv/cdvdfsv.irx: modules/iopcore/cdvdfsv
$(MAKE) -C $<
$(EE_ASM_DIR)cdvdfsv.c: modules/iopcore/cdvdfsv/cdvdfsv.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
modules/iopcore/patches/iremsndpatch/iremsndpatch.irx: modules/iopcore/patches/iremsndpatch
$(MAKE) -C $<
$(EE_ASM_DIR)iremsndpatch.c: modules/iopcore/patches/iremsndpatch/iremsndpatch.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
modules/iopcore/patches/apemodpatch/apemodpatch.irx: modules/iopcore/patches/apemodpatch
$(MAKE) -C $<
$(EE_ASM_DIR)apemodpatch.c: modules/iopcore/patches/apemodpatch/apemodpatch.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
modules/iopcore/patches/f2techioppatch/f2techioppatch.irx: modules/iopcore/patches/f2techioppatch
$(MAKE) -C $<
$(EE_ASM_DIR)f2techioppatch.c: modules/iopcore/patches/f2techioppatch/f2techioppatch.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
modules/iopcore/patches/cleareffects/cleareffects.irx: modules/iopcore/patches/cleareffects
$(MAKE) -C $<
$(EE_ASM_DIR)cleareffects.c: modules/iopcore/patches/cleareffects/cleareffects.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
modules/iopcore/resetspu/resetspu.irx: modules/iopcore/resetspu
$(MAKE) -C $<
$(EE_ASM_DIR)resetspu.c: modules/iopcore/resetspu/resetspu.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
modules/mcemu/bdm_mcemu.irx: modules/mcemu
$(MAKE) $(MCEMU_DEBUG_FLAGS) $(PADEMU_FLAGS) USE_BDM=1 -C $< all
$(EE_ASM_DIR)bdm_mcemu.c: modules/mcemu/bdm_mcemu.irx
$(BIN2C) $< $@ $(*F)_irx
modules/mcemu/hdd_mcemu.irx: modules/mcemu
$(MAKE) $(MCEMU_DEBUG_FLAGS) $(PADEMU_FLAGS) USE_HDD=1 -C $< all
$(EE_ASM_DIR)hdd_mcemu.c: modules/mcemu/hdd_mcemu.irx
$(BIN2C) $< $@ $(*F)_irx
modules/mcemu/smb_mcemu.irx: modules/mcemu
$(MAKE) $(MCEMU_DEBUG_FLAGS) $(PADEMU_FLAGS) USE_SMB=1 -C $< all
$(EE_ASM_DIR)smb_mcemu.c: modules/mcemu/smb_mcemu.irx
$(BIN2C) $< $@ $(*F)_irx
modules/isofs/isofs.irx: modules/isofs
$(MAKE) -C $<
$(EE_ASM_DIR)isofs.c: modules/isofs/isofs.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
$(EE_ASM_DIR)usbd.c: $(PS2SDK)/iop/irx/usbd_mini.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
$(EE_ASM_DIR)libsd.c: $(PS2SDK)/iop/irx/libsd.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
$(EE_ASM_DIR)audsrv.c: $(PS2SDK)/iop/irx/audsrv.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
$(EE_OBJS_DIR)libds34bt.a: modules/ds34bt/ee/libds34bt.a
cp $< $@
modules/ds34bt/ee/libds34bt.a: modules/ds34bt/ee
$(MAKE) -C $<
modules/ds34bt/iop/ds34bt.irx: modules/ds34bt/iop
$(MAKE) -C $<
$(EE_ASM_DIR)ds34bt.c: modules/ds34bt/iop/ds34bt.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
$(EE_OBJS_DIR)libds34usb.a: modules/ds34usb/ee/libds34usb.a
cp $< $@
modules/ds34usb/ee/libds34usb.a: modules/ds34usb/ee
$(MAKE) -C $<
modules/ds34usb/iop/ds34usb.irx: modules/ds34usb/iop
$(MAKE) -C $<
$(EE_ASM_DIR)ds34usb.c: modules/ds34usb/iop/ds34usb.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
modules/pademu/bt_pademu.irx: modules/pademu
$(MAKE) -C $< USE_BT=1
$(EE_ASM_DIR)bt_pademu.c: modules/pademu/bt_pademu.irx
$(BIN2C) $< $@ $(*F)_irx
modules/pademu/usb_pademu.irx: modules/pademu
$(MAKE) -C $< USE_USB=1
$(EE_ASM_DIR)usb_pademu.c: modules/pademu/usb_pademu.irx
$(BIN2C) $< $@ $(*F)_irx
$(EE_ASM_DIR)bdm.c: $(PS2SDK)/iop/irx/bdm.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
$(EE_ASM_DIR)bdmfs_fatfs.c: $(PS2SDK)/iop/irx/bdmfs_fatfs.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
$(EE_ASM_DIR)iLinkman.c: $(PS2SDK)/iop/irx/iLinkman.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
ifeq ($(DEBUG),1)
# block device drivers with printf's
$(EE_ASM_DIR)usbmass_bd.c: $(PS2SDK)/iop/irx/usbmass_bd.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
$(EE_ASM_DIR)IEEE1394_bd.c: $(PS2SDK)/iop/irx/IEEE1394_bd.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
$(EE_ASM_DIR)mx4sio_bd.c: $(PS2SDK)/iop/irx/mx4sio_bd.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
else
# block device drivers without printf's
$(EE_ASM_DIR)usbmass_bd.c: $(PS2SDK)/iop/irx/usbmass_bd_mini.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
$(EE_ASM_DIR)IEEE1394_bd.c: $(PS2SDK)/iop/irx/IEEE1394_bd_mini.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
$(EE_ASM_DIR)mx4sio_bd.c: $(PS2SDK)/iop/irx/mx4sio_bd_mini.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
endif
modules/bdmevent/bdmevent.irx: modules/bdmevent
$(MAKE) -C $<
$(EE_ASM_DIR)bdmevent.c: modules/bdmevent/bdmevent.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
$(EE_ASM_DIR)ps2dev9.c: $(PS2SDK)/iop/irx/ps2dev9.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
modules/network/SMSUTILS/SMSUTILS.irx: modules/network/SMSUTILS
$(MAKE) -C $<
$(EE_ASM_DIR)smsutils.c: modules/network/SMSUTILS/SMSUTILS.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
$(EE_ASM_DIR)ps2ip.c: $(PS2SDK)/iop/irx/ps2ip-nm.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
modules/network/SMSTCPIP/SMSTCPIP.irx: modules/network/SMSTCPIP
$(MAKE) $(SMSTCPIP_INGAME_CFLAGS) -C $< rebuild
$(EE_ASM_DIR)ingame_smstcpip.c: modules/network/SMSTCPIP/SMSTCPIP.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
modules/network/smap-ingame/smap.irx: modules/network/smap-ingame
$(MAKE) -C $<
$(EE_ASM_DIR)smap_ingame.c: modules/network/smap-ingame/smap.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
$(EE_ASM_DIR)smap.c: $(PS2SDK)/iop/irx/smap.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
$(EE_ASM_DIR)netman.c: $(PS2SDK)/iop/irx/netman.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
$(EE_ASM_DIR)ps2ips.c: $(PS2SDK)/iop/irx/ps2ips.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
$(EE_ASM_DIR)smbman.c: $(PS2SDK)/iop/irx/smbman.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
modules/network/smbinit/smbinit.irx: modules/network/smbinit
$(MAKE) -C $<
$(EE_ASM_DIR)smbinit.c: modules/network/smbinit/smbinit.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
$(EE_ASM_DIR)ps2atad.c: $(PS2SDK)/iop/irx/ps2atad.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
$(EE_ASM_DIR)hdpro_atad.c: $(PS2SDK)/iop/irx/hdproatad.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
$(EE_ASM_DIR)poweroff.c: $(PS2SDK)/iop/irx/poweroff.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
modules/hdd/xhdd/xhdd.irx: modules/hdd/xhdd
$(MAKE) -C $<
$(EE_ASM_DIR)xhdd.c: modules/hdd/xhdd/xhdd.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
$(EE_ASM_DIR)ps2hdd.c: $(PS2SDK)/iop/irx/ps2hdd-osd.irx
$(BIN2C) $< $@ $(*F)_irx
$(EE_ASM_DIR)ps2fs.c: $(PS2SDK)/iop/irx/ps2fs-osd.irx
$(BIN2C) $< $@ $(*F)_irx
modules/vmc/genvmc/genvmc.irx: modules/vmc/genvmc
$(MAKE) $(MOD_DEBUG_FLAGS) -C $<
$(EE_ASM_DIR)genvmc.c: modules/vmc/genvmc/genvmc.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
modules/network/lwNBD/lwnbdsvr.irx: modules/network/lwNBD
$(MAKE) TARGET=iop -C $<
$(EE_ASM_DIR)lwnbdsvr.c: modules/network/lwNBD/lwnbdsvr.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
$(EE_ASM_DIR)udptty.c: $(PS2SDK)/iop/irx/udptty.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
$(EE_ASM_DIR)ppctty.c: $(PS2SDK)/iop/irx/ppctty.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
modules/debug/udptty-ingame/udptty.irx: modules/debug/udptty-ingame
$(MAKE) -C $<
$(EE_ASM_DIR)udptty-ingame.c: modules/debug/udptty-ingame/udptty.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ udptty_ingame_irx
$(EE_ASM_DIR)ioptrap.c: $(PS2SDK)/iop/irx/ioptrap.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
modules/debug/ps2link/ps2link.irx: modules/debug/ps2link
$(MAKE) -C $<
$(EE_ASM_DIR)ps2link.c: modules/debug/ps2link/ps2link.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
modules/network/nbns/nbns.irx: modules/network/nbns
$(MAKE) -C $<
$(EE_ASM_DIR)nbns-iop.c: modules/network/nbns/nbns.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ nbns_irx
modules/network/httpclient/httpclient.irx: modules/network/httpclient
$(MAKE) -C $<
$(EE_ASM_DIR)httpclient-iop.c: modules/network/httpclient/httpclient.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ httpclient_irx
$(EE_ASM_DIR)iomanx.c: $(PS2SDK)/iop/irx/iomanX.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
$(EE_ASM_DIR)filexio.c: $(PS2SDK)/iop/irx/fileXio.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
$(EE_ASM_DIR)sio2man.c: $(PS2SDK)/iop/irx/freesio2.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
$(EE_ASM_DIR)padman.c: $(PS2SDK)/iop/irx/freepad.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
$(EE_ASM_DIR)mcman.c: $(PS2SDK)/iop/irx/mcman.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
$(EE_ASM_DIR)mcserv.c: $(PS2SDK)/iop/irx/mcserv.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_irx
$(EE_ASM_DIR)poeveticanew.c: thirdparty/PoeVeticaNew.ttf | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_raw
$(EE_ASM_DIR)icon_sys.c: gfx/icon.sys | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)
$(EE_ASM_DIR)icon_icn.c: gfx/opl.icn | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)
$(EE_ASM_DIR)icon_sys_A.c: misc/icon_A.sys | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)
$(EE_ASM_DIR)icon_sys_J.c: misc/icon_J.sys | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)
$(EE_ASM_DIR)icon_sys_C.c: misc/icon_C.sys | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)
$(EE_ASM_DIR)conf_theme_OPL.c: misc/conf_theme_OPL.cfg | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_cfg
$(EE_ASM_DIR)boot.c: audio/boot.adp | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_adp
$(EE_ASM_DIR)cancel.c: audio/cancel.adp | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_adp
$(EE_ASM_DIR)confirm.c: audio/confirm.adp | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_adp
$(EE_ASM_DIR)cursor.c: audio/cursor.adp | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_adp
$(EE_ASM_DIR)message.c: audio/message.adp | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_adp
$(EE_ASM_DIR)transition.c: audio/transition.adp | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_adp
$(EE_ASM_DIR)bd_connect.c: audio/bd_connect.adp | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_adp
$(EE_ASM_DIR)bd_disconnect.c: audio/bd_disconnect.adp | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)_adp
$(EE_ASM_DIR)IOPRP_img.c: modules/iopcore/IOPRP.img | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)
$(EE_ASM_DIR)drvtif_ingame_irx.c: modules/debug/drvtif-ingame.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)
$(EE_ASM_DIR)tifinet_ingame_irx.c: modules/debug/tifinet-ingame.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)
$(EE_ASM_DIR)drvtif_irx.c: modules/debug/drvtif.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)
$(EE_ASM_DIR)tifinet_irx.c: modules/debug/tifinet.irx | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)
$(EE_ASM_DIR)deci2_img.c: modules/debug/deci2.img | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(*F)
$(EE_OBJS_DIR)%.o: $(EE_SRC_DIR)%.c | $(EE_OBJS_DIR)
$(EE_CC) $(EE_CFLAGS) $(EE_INCS) -c $< -o $@
$(EE_OBJS_DIR)%.o: $(EE_ASM_DIR)%.c | $(EE_OBJS_DIR)
$(EE_CC) $(EE_CFLAGS) $(EE_INCS) -c $< -o $@
$(PNG_ASSETS:%=$(EE_ASM_DIR)%_png.c): $(EE_ASM_DIR)%_png.c: $(PNG_ASSETS_DIR)%.png | $(EE_ASM_DIR)
$(BIN2C) $< $@ $(@:$(EE_ASM_DIR)%.c=%)
endif
TRANSLATIONS_LNG = $(TRANSLATIONS:%=$(LNG_DIR)lang_%.lng)
TRANSLATIONS_YML = $(TRANSLATIONS:%=$(LNG_SRC_DIR)%.yml)
ENGLISH_TEMPLATE_YML = $(LNG_SRC_DIR)English.yml
ENGLISH_LNG = $(LNG_SRC_DIR)lang_English.lng
BASE_LANGUAGE = $(LNG_TMPL_DIR)_base.yml
INTERNAL_LANGUAGE_C = src/lang_internal.c
INTERNAL_LANGUAGE_H = include/lang_autogen.h
LANG_COMPILER = lang_compiler.py
languages: $(ENGLISH_TEMPLATE_YML) $(TRANSLATIONS_YML) $(ENGLISH_LNG) $(TRANSLATIONS_LNG) $(INTERNAL_LANGUAGE_C) $(INTERNAL_LANGUAGE_H)
download_lng:
./download_lng.sh
download_lwNBD:
./download_lwNBD.sh
download_cfla:
./download_cfla.sh
$(TRANSLATIONS_LNG): $(LNG_DIR)lang_%.lng: $(LNG_SRC_DIR)%.yml $(BASE_LANGUAGE) $(LANG_COMPILER)
python3 $(LANG_COMPILER) --make_lng --base $(BASE_LANGUAGE) --translation $< $@
$(TRANSLATIONS_YML): %.yml: $(BASE_LANGUAGE) $(LANG_COMPILER)
python3 $(LANG_COMPILER) --update_translation_yml --base $(BASE_LANGUAGE) --translation $@
$(ENGLISH_TEMPLATE_YML): $(BASE_LANGUAGE) $(LANG_COMPILER)
python3 $(LANG_COMPILER) --make_template_yml --base $< $@
$(ENGLISH_LNG): $(ENGLISH_TEMPLATE_YML) $(BASE_LANGUAGE) $(LANG_COMPILER)
python3 $(LANG_COMPILER) --make_lng --base $(BASE_LANGUAGE) --translation $< $@
$(INTERNAL_LANGUAGE_C): $(BASE_LANGUAGE) $(LANG_COMPILER)
python3 $(LANG_COMPILER) --make_source --base $< $@
$(INTERNAL_LANGUAGE_H): $(BASE_LANGUAGE) $(LANG_COMPILER)
python3 $(LANG_COMPILER) --make_header --base $< $@
ifndef PS2SDK
ps2sdk-not-setup:
@echo "PS2SDK is not setup. Please setup PS2SDK before building this project"
endif
oplversion:
@echo $(OPL_VERSION)
ifdef PS2SDK
include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal
endif
-include $(EE_DEPS)