aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 15a4ac9096ba23e845085166db83f2c3557d997f (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
# Makefile for dla-asm.
# See https://slackware.uk/~urchlay/repos/dla-asm

CL65=cl65
CL65FLAGS=

PERL=perl

CC=cc
CFLAGS=-O2 -Wall

all: dla.xex dla2csv dla2csv.xex

dla.xex: dla.s io.s dlatbl.s xex.inc printint.s render.s drunkwalk.s dlaver.h
	$(CL65) $(CL65FLAGS) -l dla.list -Ln dla.labels -t none -o dla.xex dla.s

dla2csv.xex: dla2csv.c dlaver.h

dlatbl.s: mkdlatbl.pl
	$(PERL) mkdlatbl.pl > dlatbl.s

#dlaver.inc: dlaver.h

dlaver.h: mkver.pl VERSION
	$(PERL) mkver.pl

dla2csv: dla2csv.c
	@echo $(CC) $(CFLAGS) -o dla2csv dla2csv.c ; \
	$(CC) $(CFLAGS) -o dla2csv dla2csv.c \
	|| echo "Couldn't build host dla2csv; continuing without it"

disk: drive1.atr

drive1.atr: all
	axe -w dla.xex drive1.atr
	axe -w dla2csv.xex drive1.atr

clean:
	rm -f dla.xex dla2csv dla2csv.xex dla.list dla.labels *.o

distclean: clean
	rm -f dlatbl.s dlaver.inc dlaver.h

test: all
	atari800 dla.xex

disktest: disk
	atari800 drive1.atr

tnfs: all
	sh tnfs.sh dla.xex dla2csv.xex

%.xex: %.s
	$(CL65) $(CL65FLAGS) -t none -o $@ $<

# turn off unused parameter warnings because cc65 insists on complaining
# that argc and argv are unused.
%.xex: %.c
	$(CL65) $(CL65FLAGS) -t atari -W -unused-param -o $@ $<