aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 33a80e088f48196ee976adfcf0222c0872b6c35f (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
all: defender.ca65

html: defender.html

test: deftest.rom

clean:
	rm -f *.o tmp.lbl 1 2 3 foo bar .*.swp deftest.rom dumptxt dumpgttxt

push:
	touch defender.info
	$(MAKE) clean all # html
	git push

tools: dumpgttxt dumptxt

defender.ca65: defender.info
	da65 -i defender.info

defender.html: defender.ca65
	vim +TOhtml '+w!defender.html' '+qall' defender.ca65

deftest.rom: defender.ca65
	ca65 -t none -o deftest.o -g defender.ca65
	ld65 -t none -o deftest.rom -Ln tmp.lbl --start-addr 0x8000 deftest.o
	@grep -v '\.__' tmp.lbl | sed 's, \., ,' > deftest.lbl
	@rm -f tmp.lbl *.o
	@echo
	@cmp defender.rom deftest.rom && echo "=== Binary reassembles correctly" || echo "*** Binary FAILS to reassemble correctly ***"
	@echo ; echo "-----------------------"
	@echo labels add deftest.lbl
	@echo "-----------------------" ; echo
	@atari800 -nobasic -cart-type 2 -cart deftest.rom

.PHONY: all clean push html