-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
132 lines (103 loc) · 2.07 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
DEMO=jag_ball
OS:=$(shell uname -s)
TJASS= lyxass
RMAC= rmac
RLN= rln
_68KFLAGS=-4 ~oall -i$(BJL_ROOT)
TJFLAGS= -w -s
ifdef NODRAW
TJFLAGS+= -D NO_DRAW
endif
ifeq ($(BPE),1)
_68KFLAGS+= -DBPE
endif
ifdef DEBUG
_68KFLAGS+= -DDEBUG
endif
ifdef SKUNK
_68KFLAGS+= -DSKUNK
endif
jaggd vj upload: _68KFLAGS+= -DSKUNK
#vjd vjd_rom vj_rom vj: _68KFLAGS+= -DDEBUG
%.o : %.js
$(TJASS) $(TJFLAGS) $<
ALL: $(DEMO).cof $(DEMO).j64
$(DEMO).o : $(DEMO).js
$(DEMO)_68k.o : $(DEMO)_68k.S rotatez5.o rot5z_mm.o
$(RMAC) $(_68KFLAGS) $(DEMO)_68k.S
$(DEMO).cof: $(DEMO)_68k.o
@$(RLN) -z -e -a 4000 x x -o $@ $<
$(DEMO).rom: $(DEMO)_68k.o
@$(RLN) -rw -z -n -a 802000 x x -o $@ $<
.ONESHELL:
$(DEMO).j64: $(DEMO).rom
@cat $(BJL_ROOT)/bin/Univ.bin $< >$@
cat $< >> $@
bzcat $(BJL_ROOT)/bin/allff.bin.bz2 >> $@
truncate -s 1M $@
.PHONY: vjd
vjd: $(DEMO).cof
virtualjaguar -D $< &
.PHONY: vj
vj: $(DEMO).cof
virtualjaguar $< &
.PHONY: vj_rom
vjd_rom: $(DEMO).j64
ifdef BIOS
virtualjaguar -b -D $< &
else
virtualjaguar -D $< &
endif
.PHONY: vj_rom
vj_rom: $(DEMO).j64
ifdef BIOS
virtualjaguar -b $< &
else
virtualjaguar $< &
endif
.PHONY: reset
reset:
@jcp -q -r
sleep 0.8
.PHONY: flash
flash: $(DEMO).j64
jcp -ef $<
.PHONY: upload
.ONESHELL:
upload: $(DEMO).cof
@jcp -q $< 0x4000
.PHONY: jaggd
jaggd: $(DEMO).cof
ifneq ($(findstring $(MACHTYPE),aarch64),aarch64)
@open ~/bin/jaggd_cof.app --args Z:$(PWD)/$<
else
jaggd.exe -rd -stub -ux $<,a:0x4000,x:0x4000
endif
.PHONY: jaggd_rom
jaggd_rom: $(DEMO).rom
ifneq ($(findstring $(MACHTYPE),aarch64),aarch64)
@open ~/bin/jaggd_rom.app --args Z:$(PWD)/$<
else
jaggd.exe -rd -stub -ux $<,a:0x802000,x:0x802000
endif
bpe: $(DEMO).cof
ifneq ($(findstring $(MACHTYPE),aarch64),aarch64)
@open ~/bin/BigPEmu.exe.app --args Z:$(PWD)/$<
else
/fun/jaguar/BigPEmu/BigPEmu.exe $< &
endif
true
bpe_rom: $(DEMO).j64
ifneq ($(findstring $(MACHTYPE),aarch64),aarch64)
@open ~/bin/BigPEmu.exe.app --args Z:$(PWD)/$<
else
/fun/jaguar/BigPEmu/BigPEmu.exe $< &
true
endif
.ONESHELL:
.PHONY: clean
clean:
rm -f *.o
rm -f *.equ
rm -f *~
rm -f *.rom *.abs