From 07470fecd3e6589696e483d00724f320b055b254 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Thu, 20 Oct 2016 17:45:09 +0100 Subject: [PATCH] 68000: add MWC makefile --- Applications/MWC/cmd/Makefile.68000 | 45 +++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Applications/MWC/cmd/Makefile.68000 diff --git a/Applications/MWC/cmd/Makefile.68000 b/Applications/MWC/cmd/Makefile.68000 new file mode 100644 index 00000000..812977b6 --- /dev/null +++ b/Applications/MWC/cmd/Makefile.68000 @@ -0,0 +1,45 @@ +PLATFORM = 68000 +CC = m68k-linux-gnu-gcc +ASM = m68k-linux-gnu-as +AR = m68k-linux-gnu-ar +LINKER = m68k-linux-gnu-ld +CFLAGS = -fno-strict-aliasing -fomit-frame-pointer -fno-builtin -Wall -m68000 -I../../../Library/include -I../../../Library/include/68000 +LINKER_OPT = -L../../../Library/libs -lc68000 +LIBGCCDIR = $(dir $(shell $(CC) -print-libgcc-file-name)) +LINKER_OPT += --emit-relocs -L$(LIBGCCDIR) -lgcc -T ../../../Library/elf2flt.ld +CRT0 = ../../../Library/libs/crt0_68000.o +CRT0NS = ../../../Library/libs/crt0nostdio_68000.o +# For now while we get going. Really we want to use some kind of elf2zmagic +# with relocs. +ELF2FUZIX = elf2flt +.SUFFIXES: .c .o + +SRCS = ac.c almanac.c at.c calendar.c col.c deroff.c expr.c find.c m4.c moo.c pr.c tar.c test.c ttt.c units.c + +OBJS = $(SRCS:.c=.o) + +APPS = $(OBJS:.o=) + +all: $(APPS) size.report + +$(APPS): $(CRT0) + +$(APPS): %: %.o + $(LINKER) $^ -o $@.bin $(LINKER_OPT) + $(ELF2FUZIX) -o $@ $@.bin + +expr.c: expr.y + byacc -o expr.c expr.y + +find.c: find.y + byacc -o find.c find.y + +size.report: $(APPS) + ls -l $^ > $@ + +clean: + rm -f $(OBJS) $(APPS) $(SRCS:.c=) core *~ *.asm *.lst *.sym *.map *.noi *.lk *.ihx *.tmp *.bin size.report *.o + +rmbak: + rm -f *~ core + -- 2.34.1