From: Brett Gordon Date: Fri, 22 Apr 2016 05:29:28 +0000 (-0400) Subject: /v7/cmd: add makefile for 6809 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=97914db982c075e63dbc46b892b8fb66382c2191;p=FUZIX.git /v7/cmd: add makefile for 6809 --- diff --git a/Applications/V7/cmd/Makefile.6809 b/Applications/V7/cmd/Makefile.6809 new file mode 100644 index 00000000..bb700944 --- /dev/null +++ b/Applications/V7/cmd/Makefile.6809 @@ -0,0 +1,43 @@ +PLATFORM = 6809 +CC = m6809-unknown-gcc +# 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 + +.SUFFIXES: .c .o + + +SRCS = ac.c col.c dc.c diff.c makekey.c ptx.c sum.c wall.c +SRCS += accton.c comm.c dd.c diffh.c mesg.c rev.c test.c +SRCS += at.c cron.c deroff.c join.c newgrp.c split.c time.c +SRCS += atrun.c crypt.c diff3.c look.c pr.c su.c tsort.c + +OBJS = $(SRCS:.c=.o) + +APPS = $(OBJS:.o=) + +all: $(APPS) sizes + +$(OBJS): $(SRCS) + +$(APPS): $(CRT0) + +%: %.o + $(LINKER) -o $@ $(LINKER_OPT) $(CRT0) $< + +sizes: $(APPS) + ls -l $(APPS) > size.report + +clean: + rm -f $(OBJS) $(APPS) $(SRCS:.c=) core *~ *.asm *.lst *.sym *.map *.noi *.lk *.ihx *.tmp *.bin size.report + +rmbak: + rm -f *~ core