blob: 4471d45adc8cef059d2b542f103b1e677efc442f (
plain)
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
|
# Makefile for tmu45tools
# Only seems to work with GNU make (not BSD, sorry).
PROJECT=tmu45tools
VERSION=0.0.2
CL65=cl65
CL65FLAGS=-g -t none
# comment this out if you need to see start/run addresses
CL65FLAGS+= --asm-define xex_verbose=0
C=$(CL65) $(CL65FLAGS)
MVAL0=--asm-define magic_value=0
MVAL1=--asm-define magic_value=1
MVAL2=--asm-define magic_value=2
RLOGIC=--asm-define reverse_logic=1
COLD=--asm-define coldstart=1
UTOOLS=u256.xex u512.xex uoff.xex u256r.xex u512r.xex uoffx.xex u256x.xex u512x.xex u256rx.xex u512rx.xex
SETMEMS=setmem.xex setmemr.xex setmemx.xex setmemrx.xex
UDEPS=u.s ver.s xex.inc
SMDEPS=setmem.s xex.inc inv.inc
ZIP=zip
ZIPFILE=$(PROJECT)-$(VERSION).zip
AXE=axe
ATRFILE=$(PROJECT)-$(VERSION).atr
all: setmems utools
utools: $(UTOOLS)
setmems: $(SETMEMS)
setmem.da65.s: setmem.xex setmem.info
da65 -i setmem.info
setmem.xex: $(SMDEPS)
$(C) -l $@.list -o $@ $<
@if cmp setmem.xex setmem.orig.xex; then \
echo "OK: setmem.xex identical to setmem.orig.xex"; \
else \
echo "*** setmem.s is broken (setmem.xex not identical to setmem.orig.xex)"; \
exit 1; \
fi
setmemr.xex: $(SMDEPS)
$(C) $(RLOGIC) -l $@.list -o $@ $<
setmemx.xex: $(SMDEPS)
$(C) $(COLD) -l $@.list -o $@ $<
setmemrx.xex: $(SMDEPS)
$(C) $(RLOGIC) $(COLD) -l $@.list -o $@ $<
uoff.xex: $(UDEPS)
$(C) $(MVAL1) -l $@.list -o $@ $<
u256.xex: $(UDEPS)
$(C) $(MVAL2) -l $@.list -o $@ $<
u512.xex: $(UDEPS)
$(C) $(MVAL0) -l $@.list -o $@ $<
u256r.xex: $(UDEPS)
$(C) $(MVAL0) $(RLOGIC) -l $@.list -o $@ $<
u512r.xex: $(UDEPS)
$(C) $(MVAL2) $(RLOGIC) -l $@.list -o $@ $<
uoffx.xex: $(UDEPS)
$(C) $(COLD) $(MVAL1) -l $@.list -o $@ $<
u256x.xex: $(UDEPS)
$(C) $(COLD) $(MVAL2) -l $@.list -o $@ $<
u512x.xex: $(UDEPS)
$(C) $(COLD) $(MVAL0) -l $@.list -o $@ $<
u256rx.xex: $(UDEPS)
$(C) $(COLD) $(MVAL0) $(RLOGIC) -l $@.list -o $@ $<
u512rx.xex: $(UDEPS)
$(C) $(COLD) $(MVAL2) $(RLOGIC) -l $@.list -o $@ $<
ver.s:
echo " .define VERSION \"$(VERSION)\"" > ver.s
clean:
rm -f *.o setmem.da65.s *.list $(UTOOLS) $(SETMEMS) README.1ST
zip: $(ZIPFILE)
atr: $(ATRFILE)
$(ZIPFILE): atr
rm -f $(PROJECT)-$(VERSION).zip
$(ZIP) $(ZIPFILE) README.txt $(UTOOLS) $(SETMEMS) $(ATRFILE)
$(ATRFILE): utools setmems README.1ST
rm -f $(ATRFILE)
cp mydos450.atr $(ATRFILE)
$(AXE) -w README.1ST $(ATRFILE)
for i in $(UTOOLS) $(SETMEMS); do $(AXE) -w $$i $(ATRFILE); done
README.1ST: README.txt
perl -000 -ne 'print unless /https?:/' README.txt | fmt -w 40 | tr '\n' '\233' > README.1ST
.PHONY: all setmems utools clean zip atr
|