aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: eb342aeb3110552366fa2cc7f9fd1c5c994405b0 (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
all: clean jumpmanjr.dasm jmjtest.dasm

clean:
	rm -f jumpmanjr.dasm

distclean: clean
	rm -f jumpmanjr.info leveldesc.info jmjtest.* tmp.lbl 1 2 1.* 2.* atari???.png strace.out

jumpmanjr.dasm: jumpmanjr.info jumpmanjr.inc
	da65 -i jumpmanjr.info

jumpmanjr.info: main.info leveldesc.info
	( echo '### GENERATED FILE, do not edit, edit main.info and mklevelinfo.pl instead' ;\
	  echo ;\
	  cat main.info leveldesc.info ) > jumpmanjr.info

leveldesc.info: mklevelinfo.pl
	perl mklevelinfo.pl > leveldesc.info

html: jumpmanjr.html

jumpmanjr.html: jumpmanjr.dasm
	vim +TOhtml '+w!jumpmanjr.html' '+qall!' jumpmanjr.dasm

jmjtest.dasm: jumpmanjr.dasm
	mv jmjtest.dasm jmjtest.dasm.bak 2>/dev/null || true
	cp jumpmanjr.dasm jmjtest.dasm

push: all html
	git push

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