forked from doctorxyz/gsm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
68 lines (48 loc) · 1.78 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
.SILENT:
PACKAGE = GSM
EE_BIN = $(PACKAGE).ELF
EE_OBJS := gsm_engine.o gsm_api.o elf.o loader.o
EE_OBJS += iomanx.o filexio.o ps2fs.o fakehost.o
EE_OBJS += timer.o pad.o
EE_INCS += -I$(PS2SDK)/ee/include -I$(PS2SDK)/ports/include -I$(GSKIT)/include -I$(GSKIT)/ee/dma/include -I$(GSKIT)/ee/gs/include -I$(GSKIT)/ee/toolkit/include
EE_LIBS = -lmc -lpad -lfileXio -lpatches -ldebug -lc -lkernel -L$(GSKIT)/lib -lgskit -ldmakit
EE_LDFLAGS = -nostartfiles -Tlinkfile -L$(PS2SDK)/ee/lib -L$(PS2SDK)/sbv/lib -s
#EE_LDFLAGS += -Xlinker -Map -Xlinker 'uncompressed $(PACKAGE).map'
all: $(EE_BIN)
rm -f 'uncompressed $(PACKAGE).ELF'
mv $(PACKAGE).ELF 'uncompressed $(PACKAGE).ELF'
ee-strip 'uncompressed $(PACKAGE).ELF'
ps2-packer 'uncompressed $(PACKAGE).ELF' $(PACKAGE).ELF > /dev/null
dump:
ee-objdump -D 'uncompressed $(PACKAGE).ELF' > $(PACKAGE).dump
ps2client netdump
test:
ps2client -h $(PS2_IP) reset
ps2client -h $(PS2_IP) execee host:'uncompressed $(PACKAGE).ELF'
run:
ps2client -h $(PS2_IP) reset
ps2client -h $(PS2_IP) execee host:$(PACKAGE).ELF
line:
ee-addr2line -e 'uncompressed $(PACKAGE).ELF' $(ADDR)
reset:
ps2client -h $(PS2_IP) reset
clean:
rm -f *.ELF *.o *.a *.s *.i *.map
$(MAKE) -C loader clean
rebuild:clean all
release:rebuild
rm -f 'uncompressed $(PACKAGE).ELF' *.o *.a *.s *.i *.map
$(MAKE) -C loader clean
iomanx.s:
bin2s $(PS2SDK)/iop/irx/iomanX.irx iomanx.s iomanx_irx
filexio.s:
bin2s $(PS2SDK)/iop/irx/fileXio.irx filexio.s filexio_irx
ps2fs.s:
bin2s $(PS2SDK)/iop/irx/ps2fs.irx ps2fs.s ps2fs_irx
fakehost.s:
bin2s $(PS2SDK)/iop/irx/fakehost.irx fakehost.s fakehost_irx
loader.s:
$(MAKE) -C loader
bin2s loader/loader.elf loader.s loader_elf
include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal