forked from sahlberg/wLaunchELF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
127 lines (90 loc) · 3.35 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
#.SILENT:
EE_BIN = BOOT-UNC.ELF
EE_BIN_PKD = BOOT.ELF
EE_OBJS = main.o nfs.o smb2.o pad.o config.o elf.o draw.o loader_elf.o filer.o \
poweroff_irx.o iomanx_irx.o filexio_irx.o ps2atad_irx.o DEV9_irx.o NETMAN_irx.o \
SMAP_irx.o ps2hdd_irx.o ps2fs_irx.o usbd_irx.o usbhdfsd_irx.o mcman_irx.o mcserv_irx.o\
cdfs_irx.o vmc_fs_irx.o ps2kbd_irx.o\
hdd.o hdl_rpc.o hdl_info_irx.o editor.o timer.o jpgviewer.o icon.o lang.o\
font_uLE.o makeicon.o chkesr.o sior_irx.o allowdvdv_irx.o
EE_INCS := -I$(PS2DEV)/gsKit/include -I$(PS2SDK)/ports/include
EE_LDFLAGS := -L$(PS2DEV)/gsKit/lib -L$(PS2SDK)/ports/lib -s
EE_LIBS = -lnfs -lsmb2 -lps2ip -lnetman -ldebug \
-lgskit -ldmakit -ljpeg_ps2_addons -ljpeg -lpad -lmc -lhdd -lkbd -lm \
-lcdvd -lfileXio -lpatches -lpoweroff -ldebug -lsior
EE_CFLAGS := -mno-gpopt -G0
BIN2S = $(PS2SDK)/bin/bin2s
.PHONY: all run reset clean rebuild format format-check
all: githash.h $(EE_BIN_PKD)
$(EE_BIN_PKD): $(EE_BIN)
ps2-packer $< $@
reset: clean
ps2client -h 192.168.0.10 reset
format:
find . -type f -a \( -iname \*.h -o -iname \*.c \) | xargs clang-format -i
format-check:
@! find . -type f -a \( -iname \*.h -o -iname \*.c \) | xargs clang-format -style=file -output-replacements-xml | grep "<replacement " >/dev/null
githash.h:
printf '#ifndef ULE_VERDATE\n#define ULE_VERDATE "' > $@ && \
git show -s --format=%cd --date=local | tr -d "\n" >> $@ && \
printf '"\n#endif\n' >> $@
printf '#ifndef GIT_HASH\n#define GIT_HASH "' >> $@ && \
git rev-parse --short HEAD | tr -d "\n" >> $@ && \
printf '"\n#endif\n' >> $@
DEV9_irx.c: $(PS2SDK)/iop/irx/ps2dev9.irx
bin2c $< DEV9_irx.c DEV9_irx
NETMAN_irx.c: $(PS2SDK)/iop/irx/netman.irx
bin2c $< NETMAN_irx.c NETMAN_irx
SMAP_irx.c: $(PS2SDK)/iop/irx/smap.irx
bin2c $< SMAP_irx.c SMAP_irx
mcman_irx.s: $(PS2SDK)/iop/irx/mcman.irx
$(BIN2S) $< $@ mcman_irx
mcserv_irx.s: $(PS2SDK)/iop/irx/mcserv.irx
$(BIN2S) $< $@ mcserv_irx
usbd_irx.s: $(PS2SDK)/iop/irx/usbd.irx
$(BIN2S) $< $@ usbd_irx
usbhdfsd_irx.s: $(PS2SDK)/iop/irx/usbhdfsd.irx
$(BIN2S) $< $@ usb_mass_irx
cdfs_irx.s: $(PS2SDK)/iop/irx/cdfs.irx
$(BIN2S) $< $@ cdfs_irx
poweroff_irx.s: $(PS2SDK)/iop/irx/poweroff.irx
$(BIN2S) $< $@ poweroff_irx
iomanx_irx.s: $(PS2SDK)/iop/irx/iomanX.irx
$(BIN2S) $< $@ iomanx_irx
filexio_irx.s: $(PS2SDK)/iop/irx/fileXio.irx
$(BIN2S) $< $@ filexio_irx
ps2atad_irx.s: $(PS2SDK)/iop/irx/ps2atad.irx
$(BIN2S) $< $@ ps2atad_irx
ps2hdd_irx.s: $(PS2SDK)/iop/irx/ps2hdd-xosd.irx
$(BIN2S) $< $@ ps2hdd_irx
ps2fs_irx.s: $(PS2SDK)/iop/irx/ps2fs-xosd.irx
$(BIN2S) $< $@ ps2fs_irx
hdl_info/hdl_info.irx: hdl_info
$(MAKE) -C $<
hdl_info_irx.s: hdl_info/hdl_info.irx
$(BIN2S) $< $@ hdl_info_irx
vmc_fs/vmc_fs.irx: vmc_fs
$(MAKE) -C $<
vmc_fs_irx.s: vmc_fs/vmc_fs.irx
$(BIN2S) $< $@ vmc_fs_irx
loader/loader.elf: loader
$(MAKE) -C $<
loader_elf.s: loader/loader.elf
$(BIN2S) $< $@ loader_elf
ps2kbd_irx.s: $(PS2SDK)/iop/irx/ps2kbd.irx
$(BIN2S) $< $@ ps2kbd_irx
sior_irx.s: $(PS2SDK)/iop/irx/sior.irx
$(BIN2S) $< $@ sior_irx
AllowDVDV/AllowDVDV.irx: AllowDVDV
$(MAKE) -C $<
allowdvdv_irx.s: AllowDVDV/AllowDVDV.irx
$(BIN2S) $< $@ allowdvdv_irx
clean:
$(MAKE) -C hdl_info clean
$(MAKE) -C loader clean
$(MAKE) -C vmc_fs clean
$(MAKE) -C AllowDVDV clean
rm -f githash.h *.s $(EE_OBJS) $(EE_BIN) $(EE_BIN_PKD)
rebuild: clean all
include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal