Add Makefile.
authorMatt Mullins <mmullins@mmlx.us>
Sun, 23 Dec 2012 01:26:56 +0000 (17:26 -0800)
committerMatt Mullins <mmullins@mmlx.us>
Sun, 23 Dec 2012 01:26:56 +0000 (17:26 -0800)
Makefile [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..c08c72a
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,20 @@
+ARCH=arm-linux-gnueabi
+CC=$(ARCH)-gcc
+LD=$(ARCH)-ld
+OBJCOPY=$(ARCH)-objcopy
+
+CFLAGS=-mcpu=cortex-m4 -nostdinc -I $(STELLARISWARE)/inc
+LDFLAGS=-Tstellaris.t
+
+STELLARISWARE=/home/mmullins/projects/stellaris/StellarisWare
+
+all: led_blink.bin
+
+%.o: %.c
+       $(CC) $(CFLAGS) -c -o $@ $^
+
+led_blink: isr_table.o
+       $(LD) $(LDFLAGS) -o $@ $^
+
+led_blink.bin: led_blink
+       $(OBJCOPY) -O binary $< $@