aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: d5983c2977ed9c848738fc635a7389af08594c18 (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

SRCFILES=col80_dosini_seg.s col80_header_seg.s col80_main.s \
         col80_runad_seg.s col80_startaddr.s

all: col80.xex check


col80.xex:
	$(MAKE) dasm_build || $(MAKE) ca65_build || $(MAKE) atasm_build

dasm_build: $(SRCFILES) col80.dasm
	dasm col80.dasm -f3 -ocol80.xex

ca65_build: $(SRCFILES) col80.s
	ca65 -t atari col80.s
	ld65 -t atari -o col80.xex col80.o

atasm_build: $(SRCFILES) col80.atasm
	perl dasm2atasm col80_header_seg.s col80_header_seg.atasm
	perl dasm2atasm col80_main.s col80_main.atasm
	atasm -r -ocol80.xex col80.atasm

check: col80.xex
	@if cmp col80.xex col80_orig.xex; then \
		echo "OK: New binary is identical to original" ;\
	else \
		echo "BAD: New binary differs from original" ;\
	fi

clean:
	rm -f *.o col80_header_seg.atasm col80_main.atasm col80.xex