-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
136 lines (112 loc) · 3.27 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
133
134
135
#
# Simple Makefile using the ca65 assembler from CC65.
#
AS := ca65
CC := cl65
LD := ld65
ASFLAGS := --cpu 6502x -t c64 -I inc -I .
SPEEDSCRIPT_SOURCES= \
src/main.s \
src/refresh.s \
src/move.s \
src/vars.s \
src/freemem.s \
src/print.s \
src/search.s \
src/io.s \
src/insert.s \
src/input.s \
src/erase.s \
src/interrupt.s \
src/cursor.s \
src/misc.s \
src/delete.s \
src/control.s
INSTANT80_SOURCES= \
$(SPEEDSCRIPT_SOURCES) \
src/instant80.s
EASYCURSOR_SOURCES= \
$(SPEEDSCRIPT_SOURCES) \
src/easycursor.s
EASYCURSOR80_SOURCES= \
$(INSTANT80_SOURCES) \
src/easycursor.s
SPEEDSCRIPT_OBJS=$(SPEEDSCRIPT_SOURCES:.s=.o)
INSTANT80_OBJS=$(INSTANT80_SOURCES:%.s=build/instant80/%.o)
EASYCURSOR_OBJS=$(EASYCURSOR_SOURCES:%.s=build/easycursor/%.o)
EASYCURSOR80_OBJS=$(EASYCURSOR80_SOURCES:%.s=build/easycursor80/%.o)
all: speedscript31r2.prg speedscript32r1.prg speedscript32r2.prg speedscriptmodular.prg \
speedscript-i80.prg speedscript-ec.prg speedscript-i80-ec.prg cksum
%.prg: original/%.s
@echo Building $@ ...
$(CC) --cpu 6502x -t c64 -C c64-asm.cfg -l [email protected] -m [email protected] -o $@ $<
@echo ""
speedscript31r2.prg: original/speedscript31r2.s
speedscript32r1.prg: original/speedscript32r1.s
speedscript32r2.prg: original/speedscript32r2.s
%.o: %.s
@echo Building $@ ...
@echo DEBUG src/%.o pass.
$(AS) $(ASFLAGS) -l [email protected] -o $@ $<
@echo ""
build/instant80/%.o: %.s
@echo Building $@ ...
@mkdir -p $(@D)
$(AS) $(ASFLAGS) -l [email protected] -o $@ $<
@echo ""
build/easycursor/%.o: %.s
@echo Building $@ ...
@mkdir -p $(@D)
$(AS) $(ASFLAGS) -l [email protected] -o $@ $<
@echo ""
build/easycursor80/%.o: %.s
@echo Building $@ ...
@mkdir -p $(@D)
$(AS) $(ASFLAGS) -l [email protected] -o $@ $<
@echo ""
speedscriptmodular.prg: $(SPEEDSCRIPT_OBJS) speedscript.cfg
@echo Building $@ ...
$(LD) -C speedscript.cfg $(SPEEDSCRIPT_OBJS) c64.lib -Ln [email protected] -m [email protected] -o $@
@echo ""
speedscript-i80.prg: ASFLAGS += -DINSTANT80
speedscript-i80.prg: $(INSTANT80_OBJS) speedscript.cfg
@echo Building $@ ...
$(LD) -C speedscript.cfg $(INSTANT80_OBJS) c64.lib -Ln [email protected] -m [email protected] -o $@
@echo ""
speedscript-ec.prg: ASFLAGS += -DEASYCURSOR
speedscript-ec.prg: $(EASYCURSOR_OBJS) speedscript.cfg
@echo Building $@ ...
$(LD) -C speedscript.cfg $(EASYCURSOR_OBJS) c64.lib -Ln [email protected] -m [email protected] -o $@
@echo ""
speedscript-i80-ec.prg: ASFLAGS += -DEASYCURSOR -DINSTANT80
speedscript-i80-ec.prg: $(EASYCURSOR80_OBJS) speedscript.cfg
@echo Building $@ ...
$(LD) -C speedscript.cfg $(EASYCURSOR80_OBJS) c64.lib -Ln [email protected] -m [email protected] -o $@
@echo ""
cksum:
@echo ""
@echo "Verifying checksums.... (You should make sure each pair below matches)"
@echo ""
@md5sum speedscript31r2.prg
@grep ss31r2.c64 tests/official.md5sum.txt
@echo ""
@md5sum speedscript32r1.prg
@grep ss32r1.c64 tests/official.md5sum.txt
@echo ""
@md5sum speedscript32r2.prg
@grep ss32r2.c64 tests/official.md5sum.txt
@echo ""
@md5sum speedscriptmodular.prg
@grep ss32r2.c64 tests/official.md5sum.txt
@echo ""
@md5sum speedscript-i80.prg
@grep ss32r2-i80.c64 tests/official.md5sum.txt
@echo ""
@md5sum speedscript-ec.prg
@grep ss32r2-ec.c64 tests/official.md5sum.txt
@echo ""
@md5sum speedscript-i80-ec.prg
@grep ss32r2-i80-ec.c64 tests/official.md5sum.txt
@echo ""
clean:
rm -fr *.prg *.lst *.map *.label src/*.o src/*.lst build/