From: Brett Gordon Date: Thu, 17 Mar 2016 15:22:09 +0000 (-0400) Subject: advent: add makefile for 6809 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=f64556435e7b5bc84df8db453e235564a6d27419;p=FUZIX.git advent: add makefile for 6809 --- diff --git a/Applications/cave/Makefile.6809 b/Applications/cave/Makefile.6809 new file mode 100644 index 00000000..62c708f0 --- /dev/null +++ b/Applications/cave/Makefile.6809 @@ -0,0 +1,43 @@ +# +# For Z80 at least this should work. We will need to hack advgen to +# do endian swapping if building on PC for 6809 +# + +PLATFORM = 6809 +CC = m6809-unknown-gcc +CCOPTS = -O2 +# These are wrappers for lwasm and lwar +ASM = m6809-unknown-as +AR = m6809-unknown-ar +LINKER = lwlink +CFLAGS = -I../../Library/include -I../../Library/include/6502 +LINKER_OPT = --format=raw -L../../Library/libs -lc6809 +LIBGCCDIR = $(dir $(shell $(CC) -print-libgcc-file-name)) +LINKER_OPT += -L$(LIBGCCDIR) -lgcc +LINKER_OPT += --script=../util/$(TARGET).link +ASM_OPT = -o +CRT0 = ../../Library/libs/crt0_6809.o + + +SRC = advent.c adventdb.c database.c english.c itverb.c lib.c saveadv.c \ + turn.c verb.c +OBJ = $(SRC:.c=.o) + +.SUFFIXES: .c .o + +all: advent advent.db + +advent.db: advgen + ./advgen -x > advent.db + +advgen: advgen.c + cc advgen.c -o ./advgen + +.c.o: + $(CC) $(CFLAGS) $(CCOPTS) -c $< + +advent: $(OBJ) + $(LINKER) -o $@ $(LINKER_OPT) $(CRT0) $(OBJ) + +clean: + rm -f advent advent.db advgen *.rel *.asm *.lst core *.sym *.map *.noi *.lk *.ihx *.tmp *.bin *.o