forked from ps2homebrew/wLaunchELF
-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
embed.make
209 lines (151 loc) · 5.71 KB
/
embed.make
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
ifeq ($(MX4SIO),0) # no mx4sio? use ps2dev:1.0 drivers
$(info using ps2dev:1.0 mc drivers)
MCMAN_SOURCE = $(PS2SDK)/iop/irx/mcman.irx
MCSERV_SOURCE = $(PS2SDK)/iop/irx/mcserv.irx
SIO2MAN_SOURCE = $(PS2SDK)/iop/irx/sio2man.irx
else # if we have mx4sio use newer IRX to avoid deadlocks when opening common memory card
$(info using latest mc drivers)
MCMAN_SOURCE = iop/__precompiled/mcman.irx
MCSERV_SOURCE = iop/__precompiled/mcserv.irx
SIO2MAN_SOURCE = iop/__precompiled/sio2man.irx
endif
#---{ MC }---#
$(EE_ASM_DIR)mcman_irx.s: $(MCMAN_SOURCE) | $(EE_ASM_DIR)
$(BIN2S) $< $@ mcman_irx
$(EE_ASM_DIR)mcserv_irx.s: $(MCSERV_SOURCE) | $(EE_ASM_DIR)
$(BIN2S) $< $@ mcserv_irx
$(EE_ASM_DIR)sio2man.s: $(SIO2MAN_SOURCE) | $(EE_ASM_DIR)
$(BIN2S) $< $@ sio2man_irx
$(EE_ASM_DIR)mx4sio_bd.s: iop/__precompiled/mx4sio_bd.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ mx4sio_bd_irx
#---{ USB }---#
$(EE_ASM_DIR)usbd_irx.s: $(PS2SDK)/iop/irx/usbd.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ usbd_irx
ifeq ($(EXFAT),1)
$(EE_ASM_DIR)bdm_irx.s:iop/__precompiled/bdm.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ bdm_irx
$(EE_ASM_DIR)bdmfs_fatfs_irx.s:iop/__precompiled/bdmfs_fatfs.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ bdmfs_fatfs_irx
$(EE_ASM_DIR)usbmass_bd_irx.s:iop/__precompiled/usbmass_bd.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ usbmass_bd_irx
else
$(EE_ASM_DIR)usbhdfsd_irx.s: $(PS2SDK)/iop/irx/usbhdfsd.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ usb_mass_irx
endif
# ----- #
iop/cdvd.irx: iop/oldlibs/libcdvd
$(MAKE) -C $<
$(EE_ASM_DIR)cdvd_irx.s: $(CDVD_SOURCE) | $(EE_ASM_DIR)
$(BIN2S) $< $@ cdvd_irx
$(MAKE) -C iop/oldlibs/libcdvd
$(EE_ASM_DIR)ioptrap_irx.s: $(PS2SDK)/iop/irx/ioptrap.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ ioptrap_irx
$(EE_ASM_DIR)poweroff_irx.s: $(PS2SDK)/iop/irx/poweroff.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ poweroff_irx
$(EE_ASM_DIR)iomanx_irx.s: $(PS2SDK)/iop/irx/iomanX.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ iomanx_irx
$(EE_ASM_DIR)filexio_irx.s: $(PS2SDK)/iop/irx/fileXio.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ filexio_irx
$(EE_ASM_DIR)ps2dev9_irx.s: $(PS2SDK)/iop/irx/ps2dev9.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ ps2dev9_irx
ifeq ($(ETH),1)
$(EE_ASM_DIR)ps2ip_irx.s: $(PS2SDK)/iop/irx/ps2ip.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ ps2ip_irx
$(EE_ASM_DIR)udptty.s: $(PS2SDK)/iop/irx/udptty.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ udptty_irx
vpath ps2smap.irx $(PS2DEV)/ps2eth/smap/
vpath ps2smap.irx iop/__precompiled/
$(EE_ASM_DIR)ps2smap_irx.s: ps2smap.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ ps2smap_irx
$(EE_ASM_DIR)ps2ftpd_irx.s: iop/ps2ftpd.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ ps2ftpd_irx
$(EE_ASM_DIR)ps2netfs_irx.s: $(PS2SDK)/iop/irx/ps2netfs.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ ps2netfs_irx
$(EE_ASM_DIR)ps2host_irx.s: iop/ps2host.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ ps2host_irx
endif
iop/ps2ftpd.irx: iop/oldlibs/ps2ftpd
$(MAKE) -C $<
$(EE_ASM_DIR)ps2atad_irx.s: $(PS2SDK)/iop/irx/ps2atad.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ ps2atad_irx
$(EE_ASM_DIR)ps2hdd_irx.s: $(PS2SDK)/iop/irx/ps2hdd-osd.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ ps2hdd_irx
$(EE_ASM_DIR)ps2fs_irx.s: $(PS2SDK)/iop/irx/ps2fs.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ ps2fs_irx
ifeq ($(DVRP),1)
$(EE_ASM_DIR)dvrdrv_irx.s:iop/__precompiled/dvrdrv.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ dvrdrv_irx
$(EE_ASM_DIR)dvrfile_irx.s:iop/__precompiled/dvrfile.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ dvrfile_irx
endif
iop/hdl_info.irx: iop/hdl_info
$(MAKE) -C $<
$(EE_ASM_DIR)hdl_info_irx.s: iop/hdl_info.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ hdl_info_irx
iop/ps2host.irx: iop/ps2host
$(MAKE) -C $<
iop/ds34usb/ee/libds34usb.a: iop/ds34usb/ee
$(MAKE) -C $<
iop/ds34usb.irx: iop/ds34usb/iop
$(MAKE) -C $<
iop/ds34bt/ee/libds34bt.a: iop/ds34bt/ee
$(MAKE) -C $<
iop/ds34bt.irx: iop/ds34bt/iop
$(MAKE) -C $<
$(EE_ASM_DIR)ds34usb.s: iop/ds34usb.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ ds34usb_irx
$(EE_OBJS_DIR)libds34usb.a: iop/ds34usb/ee/libds34usb.a
cp $< $@
$(EE_OBJS_DIR)libds34bt.a: iop/ds34bt/ee/libds34bt.a
cp $< $@
$(EE_ASM_DIR)ds34bt.s: iop/ds34bt.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ ds34bt_irx
$(EE_ASM_DIR)padman.s: $(PS2SDK)/iop/irx/padman.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ padman_irx
ifeq ($(SMB),1)
$(EE_ASM_DIR)smbman_irx.s: $(PS2SDK)/iop/irx/smbman.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ smbman_irx
endif
iop/vmc_fs.irx: iop/vmc_fs
$(MAKE) -C $<
$(EE_ASM_DIR)vmc_fs_irx.s: iop/vmc_fs.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ vmc_fs_irx
loader/loader.elf: loader
$(MAKE) -C $<
$(EE_ASM_DIR)loader_elf.s: loader/loader.elf | $(EE_ASM_DIR)
$(BIN2S) $< $@ loader_elf
$(EE_ASM_DIR)ps2kbd_irx.s: $(PS2SDK)/iop/irx/ps2kbd.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ ps2kbd_irx
$(EE_ASM_DIR)sior_irx.s: $(PS2SDK)/iop/irx/sior.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ sior_irx
$(EE_ASM_DIR)ppctty_irx.s:iop/__precompiled/ppctty.irx | $(EE_ASM_DIR)
$(BIN2S) $< $@ ppctty_irx
iop/AllowDVDV.irx: iop/AllowDVDV
$(MAKE) -C $<
$(EE_ASM_DIR)allowdvdv_irx.s: iop/AllowDVDV.irx
$(BIN2S) $< $@ allowdvdv_irx
ISO_BIN_DIR ?= iso/
ISO_BIN ?= wLE_ISR$(BIN_NAME).iso
ISO_BIN_ELF ?= ISRA_000.00
SYSTEMCNF_VERSION ?= 1.00
SYSTEMCNF_VMODE ?= PAL
ISO_BIN_DUMMYSIZE ?= 64
iso: $(ISO_BIN_DIR) $(ISO_BIN_DIR)system.cnf $(EE_BIN_PKD)
cp $(EE_BIN_PKD) $(ISO_BIN_DIR)$(ISO_BIN_ELF)
echo "Extra Build features: $(BIN_NAME)" > "$(ISO_BIN_DIR)BUILD_OPT.TXT"
dd if=/dev/zero of="$(ISO_BIN_DIR)DUMMY.BIN" bs=1M count=$(ISO_BIN_DUMMYSIZE)
mkisofs -o "$(ISO_BIN)" "$(ISO_BIN_DIR)"
$(info ISO generation finished.)
ifeq ($(PACK_ISO), YES)
$(info ISO will be compressed)
zip -q -j -9 wLE_ISR_ISO$(BIN_NAME).zip $(ISO_BIN)
endif
isoclean:
rm -rf $(ISO_BIN_DIR)
$(ISO_BIN_DIR):
mkdir $@
$(ISO_BIN_DIR)system.cnf: $(ISO_BIN_DIR)
$(info - generating 'system.cnf' ...)
echo "BOOT2 = cdrom0:\$(ISO_BIN_ELF);1" >"$@"
echo VER = $(SYSTEMCNF_VERSION)>>"$@"
echo VMODE = $(SYSTEMCNF_VMODE)>>"$@"