-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (53 loc) · 1.94 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
TARGET = psx_screen_dumper
TYPE = ps-exe
SRCS = psx_screen_dumper.c \
crc.c \
thirdparty/nugget/common/crt0/crt0.s \
CPPFLAGS += -Ithirdparty/nugget/psyq/include
LDFLAGS += -Lthirdparty/nugget/psyq/lib
LDFLAGS += -Wl,--start-group
LDFLAGS += -lapi
LDFLAGS += -lc
LDFLAGS += -lc2
LDFLAGS += -lcard
LDFLAGS += -lcomb
LDFLAGS += -lds
LDFLAGS += -letc
LDFLAGS += -lgpu
LDFLAGS += -lgs
LDFLAGS += -lgte
LDFLAGS += -lgun
LDFLAGS += -lhmd
LDFLAGS += -lmath
LDFLAGS += -lmcrd
LDFLAGS += -lmcx
LDFLAGS += -lpad
LDFLAGS += -lpress
LDFLAGS += -lsio
LDFLAGS += -lsnd
LDFLAGS += -lspu
LDFLAGS += -ltap
LDFLAGS += -Wl,--end-group
include thirdparty/nugget/common.mk
# extension must be .exe for no$psx
$(BINDIR)$(TARGET).exe: $(BINDIR)$(TARGET).ps-exe
cp $(BINDIR)$(TARGET).ps-exe $(BINDIR)$(TARGET).exe
$(BINDIR)$(TARGET).objdump.txt: $(BINDIR)$(TARGET).elf
mipsel-linux-gnu-objdump -D $(BINDIR)$(TARGET).elf > $(BINDIR)$(TARGET).objdump.txt
nocash: $(BINDIR)$(TARGET).exe $(BINDIR)$(TARGET).objdump.txt
$(BINDIR)$(TARGET).iso: $(BINDIR)$(TARGET).ps-exe psx_screen_dumper.xml
mkpsxiso psx_screen_dumper.xml
iso: $(BINDIR)$(TARGET).iso
actualclean: clean
rm -f $(BINDIR)$(TARGET).iso
rm -f $(BINDIR)$(TARGET).objdump.txt
PSX_SCREEN_DUMPER_VERSION := $(shell perl -ne 'print $$1 if($$_ =~ /PSX_SCREEN_DUMPER_VERSION\s"(v[^"]+)"/)' psx_screen_dumper.c)
release: $(BINDIR)$(TARGET).ps-exe $(BINDIR)$(TARGET).iso README.md CHANGELOG.md LICENSE
mkdir psx_screen_dumper_$(PSX_SCREEN_DUMPER_VERSION)
cp $(BINDIR)$(TARGET).ps-exe psx_screen_dumper_$(PSX_SCREEN_DUMPER_VERSION)/
cp $(BINDIR)$(TARGET).iso psx_screen_dumper_$(PSX_SCREEN_DUMPER_VERSION)/
cp README.md psx_screen_dumper_$(PSX_SCREEN_DUMPER_VERSION)/
cp CHANGELOG.md psx_screen_dumper_$(PSX_SCREEN_DUMPER_VERSION)/
cp LICENSE psx_screen_dumper_$(PSX_SCREEN_DUMPER_VERSION)/
zip -r psx_screen_dumper_$(PSX_SCREEN_DUMPER_VERSION).zip psx_screen_dumper_$(PSX_SCREEN_DUMPER_VERSION)
.PHONY: nocash iso actualclean release