summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2018-06-01 19:07:52 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2018-06-02 10:04:06 +1000
commit3d530160957d3818a4160e433afbbf47e3893a12 (patch)
tree0929eaefdccb062eb9a193a9f74bde4ebbeb2eec /Makefile
downloadcf-fsi-3d530160957d3818a4160e433afbbf47e3893a12.tar.gz
cf-fsi-3d530160957d3818a4160e433afbbf47e3893a12.zip
Initial import
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 27 insertions, 0 deletions
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
OpenPOWER on IntegriCloud