aboutsummaryrefslogtreecommitdiff
path: root/lib/lm3s/Makefile
diff options
context:
space:
mode:
authorGareth McMullin2011-02-04 22:47:51 +1300
committerGareth McMullin2011-02-04 22:47:51 +1300
commit769a932f3ec147bddbf488a88214dfb12a4eed78 (patch)
tree52cb7feea948e40f2ee2ab4da3bbd26d730b3390 /lib/lm3s/Makefile
parent729a48c6557ec4ef4b0ec87f2de47010f8066ee8 (diff)
Added initial support for the LuminaryMicro LM3S family.
Diffstat (limited to 'lib/lm3s/Makefile')
-rw-r--r--lib/lm3s/Makefile57
1 files changed, 57 insertions, 0 deletions
diff --git a/lib/lm3s/Makefile b/lib/lm3s/Makefile
new file mode 100644
index 0000000..7197ec3
--- /dev/null
+++ b/lib/lm3s/Makefile
@@ -0,0 +1,57 @@
+##
+## This file is part of the libopencm3 project.
+##
+## Copyright (C) 2009 Uwe Hermann <uwe@hermann-uwe.de>
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+##
+
+LIBNAME = libopencm3_lm3s
+
+# PREFIX ?= arm-none-eabi
+PREFIX ?= arm-elf
+CC = $(PREFIX)-gcc
+AR = $(PREFIX)-ar
+CFLAGS = -Os -g -Wall -Wextra -I../../include -fno-common \
+ -mcpu=cortex-m3 -mthumb -Wstrict-prototypes \
+ -ffunction-sections -fdata-sections
+# ARFLAGS = rcsv
+ARFLAGS = rcs
+OBJS = gpio.o \
+ vector.o
+
+# VPATH += ../usb
+
+# Be silent per default, but 'make V=1' will show all compiler calls.
+ifneq ($(V),1)
+Q := @
+endif
+
+all: $(LIBNAME).a
+
+$(LIBNAME).a: $(OBJS)
+ @printf " AR $(subst $(shell pwd)/,,$(@))\n"
+ $(Q)$(AR) $(ARFLAGS) $@ $^
+
+%.o: %.c
+ @printf " CC $(subst $(shell pwd)/,,$(@))\n"
+ $(Q)$(CC) $(CFLAGS) -o $@ -c $<
+
+clean:
+ @printf " CLEAN lib/lpc13xx\n"
+ $(Q)rm -f *.o
+ $(Q)rm -f $(LIBNAME).a
+
+.PHONY: clean
+