aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile32
1 files changed, 27 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 2c28fc8..802a2bd 100644
--- a/Makefile
+++ b/Makefile
@@ -1,20 +1,42 @@
-CL65 = cl65
-CL65FLAGS =
-PERL = perl
+# Makefile for dla-asm.
+# See https://slackware.uk/~urchlay/repos/dla-asm
-all: dla.xex
+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
$(CL65) $(CL65FLAGS) -l dla.list -Ln dla.labels -t none -o dla.xex dla.s
+dla2csv.xex: dla2csv.c
+
dlatbl.s: mkdlatbl.pl
$(PERL) mkdlatbl.pl > dlatbl.s
+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"
+
clean:
- rm -f dla.xex dlatbl.s dla.list dla.labels *.o
+ rm -f dla.xex dla2csv dla2csv.xex dla.list dla.labels *.o
+
+distclean: clean
+ rm -f dlatbl.s
test: all
atari800 dla.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 $@ $<