diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 31 |
1 files changed, 25 insertions, 6 deletions
@@ -1,13 +1,29 @@ CC=cl65 SYS=atari -# COPT=-Oirs -COPT=-O -l -T -CFLAGS=-t $(SYS) -C custom.cfg -I. -L. $(COPT) + +# the meaning of the -l flag is different between cc65-2.13.3 +# and the later github cc65, so it's commented out here. +#COPT=-O -l -T +COPT=-O -T + +# for older cc65: +#CFLAGS=-t $(SYS) -C custom.cfg -I. -L. $(COPT) + +# for recent git cc65. +# -D__RESERVED_MEMORY__=1056 because cc65's default end of memory +# is $BC20, and we want it to end just below our font, which starts +# at $B800. +# -D__SYSTEM_CHECK__=1 stops cl65 from prepending a bit of code that +# checks to make sure there's enough memory. Older cc65 didn't do this, +# and I never missed it. +CFLAGS=-t $(SYS) -I. -L. -Wl -D__SYSTEM_CHECK__=1 -Wl -D__RESERVED_MEMORY__=1056 $(COPT) AS=ca65 -ASFLAGS=-l +ASFLAGS= AR=ar65 +VERSION="v0.99alpha-$(shell date +%Y%m%d)-$(shell git rev-parse --short HEAD 2>/dev/null || echo UNKNOWN)" + # A few files have no make rules here. LORCHA.DAT is generated as a # side-effect of generating taifont.xex. It's a 49-byte (7x7) blob of # Atari "internal" screen codes. @@ -28,6 +44,9 @@ XEX=taipan.xex all: $(XEX) +ver: + @echo $(VERSION) + $(XEX): taimain.xex taifont.xex title.xex cat taifont.xex title.xex taimain.xex > $(XEX) @@ -35,7 +54,7 @@ title.xex: TITLE.DAT perl title.pl TITLE.DAT > title.xex taimain.xex: taipan.c rand.s draw_lorcha.s taifont.xex - cl65 --mapfile taipan.map -t atari -O -l -T -o taimain.xex taipan.c rand.s draw_lorcha.s timed_getch.s jsleep.s + cl65 -DVERSION=\"$(VERSION)\" --mapfile taipan.map $(CFLAGS) -o taimain.xex taipan.c rand.s draw_lorcha.s timed_getch.s jsleep.s portstat.s taifont.xex: convfont romfont font cat romfont font | ./convfont -x > taifont.xex @@ -66,6 +85,6 @@ distclean: clean $(CC) --mapfile map $(CFLAGS) -o $@ $< lorchatest: lorchatest.c draw_lorcha.s taifont.xex - cl65 -t atari -O -l -T -o lorchatest1.xex lorchatest.c draw_lorcha.s + cl65 -t atari -O -T -o lorchatest1.xex lorchatest.c draw_lorcha.s cat taifont.xex lorchatest1.xex > lorchatest.xex atari800 -nobasic lorchatest.xex |