From 3d530160957d3818a4160e433afbbf47e3893a12 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Fri, 1 Jun 2018 19:07:52 +1000 Subject: Initial import --- Makefile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a75f0a1 --- /dev/null +++ b/Makefile @@ -0,0 +1,27 @@ +M68KCROSS ?= /opt/cross/binutils-coldfire/bin/m68k-unknown-elf- +M68KAS=$(M68KCROSS)as +M68KLD=$(M68KCROSS)ld +M68KOC=$(M68KCROSS)objcopy + +CC = $(CROSS_COMPILE)gcc +CFLAGS = -Wall -Os + +all: cf-fsi-test + +cf-code.o : cf-code.s + $(M68KAS) -march=isac $^ -o $@ + +cf-code.elf : cf-code.o + $(M68KLD) -Ttext 0 $^ -o $@ + +cf-code.bin : cf-code.elf + $(M68KOC) -O binary $^ $@ + +cf-wrapper.o : cf-wrapper.S cf-code.bin + $(CC) $(CFLAGS) -c cf-wrapper.S -o $@ + +cf-fsi-test : cf-fsi-test.o cf-wrapper.o + $(CC) $(CFLAGS) $^ -o $@ + +clean: + rm -rf cf-fsi-test *.o *.elf *.bin -- cgit v1.2.1