aboutsummaryrefslogtreecommitdiff
path: root/examples/lpc13xx
diff options
context:
space:
mode:
authorUwe Hermann2011-04-28 19:42:35 +0200
committerUwe Hermann2011-04-28 19:42:35 +0200
commit089bb73018517701284b47d3801bf8bc6ad03cdd (patch)
tree1fe3c6fdbbd8a75c7748b59d64a2d073a3d46cd1 /examples/lpc13xx
parent149c0c7dc0aeeda92b83c0c0e7c1a169d45e3d0b (diff)
parent3ac0ae839d710de6552f617934bed2f5f9629bec (diff)
Merge remote-tracking branch 'gsmcmullin/master'.
Diffstat (limited to 'examples/lpc13xx')
-rw-r--r--examples/lpc13xx/Makefile38
-rw-r--r--examples/lpc13xx/Makefile.include7
-rw-r--r--examples/lpc13xx/lpc-p1343/Makefile38
3 files changed, 5 insertions, 78 deletions
diff --git a/examples/lpc13xx/Makefile b/examples/lpc13xx/Makefile
deleted file mode 100644
index 486b4ba..0000000
--- a/examples/lpc13xx/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-##
-## This file is part of the libopencm3 project.
-##
-## Copyright (C) 2010 Piotr Esden-Tempski <piotr@esden.net>
-##
-## 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/>.
-##
-
-# Be silent per default, but 'make V=1' will show all compiler calls.
-ifneq ($(V),1)
-Q := @
-# Do not print "Entering directory ...".
-MAKEFLAGS += --no-print-directory
-endif
-
-all: lpc-p1343
-
-lpc-p1343:
- @printf " BUILD examples/lpc13xx/lpc-p1343\n"
- $(Q)$(MAKE) -C lpc-p1343
-
-clean:
- @printf " CLEAN examples/lpc13xx/lpc-p1343\n"
- $(Q)$(MAKE) -C lpc-p1343 clean
-
-.PHONY: lpc-p1343 clean
-
diff --git a/examples/lpc13xx/Makefile.include b/examples/lpc13xx/Makefile.include
index 6e80fd5..c9ae180 100644
--- a/examples/lpc13xx/Makefile.include
+++ b/examples/lpc13xx/Makefile.include
@@ -28,7 +28,7 @@ OBJDUMP = $(PREFIX)-objdump
# TOOLCHAIN_DIR = `dirname \`which $(CC)\``/../$(PREFIX)
TOOLCHAIN_DIR = ../../../..
CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include -fno-common \
- -mcpu=cortex-m3 -mthumb
+ -mcpu=cortex-m3 -mthumb -MD
LDSCRIPT = $(BINARY).ld
LDFLAGS += -L$(TOOLCHAIN_DIR)/lib -L$(TOOLCHAIN_DIR)/lib/lpc13xx \
-T$(LDSCRIPT) -nostartfiles -Wl,--gc-sections
@@ -75,7 +75,7 @@ flash: $(BINARY).flash
@#printf " OBJDUMP $(*).list\n"
$(Q)$(OBJDUMP) -S $(*).elf > $(*).list
-%.elf: $(OBJS) $(LDSCRIPT)
+%.elf: $(OBJS) $(LDSCRIPT) $(TOOLCHAIN_DIR)/lib/lpc13xx/libopencm3_lpc13xx.a
@#printf " LD $(subst $(shell pwd)/,,$(@))\n"
$(Q)$(LD) $(LDFLAGS) -o $(*).elf $(OBJS) -lopencm3_lpc13xx
@@ -85,6 +85,7 @@ flash: $(BINARY).flash
clean:
$(Q)rm -f *.o
+ $(Q)rm -f *.d
$(Q)rm -f *.elf
$(Q)rm -f *.bin
$(Q)rm -f *.hex
@@ -119,3 +120,5 @@ endif
.PHONY: images clean
+-include $(OBJS:.o=.d)
+
diff --git a/examples/lpc13xx/lpc-p1343/Makefile b/examples/lpc13xx/lpc-p1343/Makefile
deleted file mode 100644
index e1745ac..0000000
--- a/examples/lpc13xx/lpc-p1343/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-##
-## 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/>.
-##
-
-# Be silent per default, but 'make V=1' will show all compiler calls.
-ifneq ($(V),1)
-Q := @
-# Do not print "Entering directory ...".
-MAKEFLAGS += --no-print-directory
-endif
-
-all: miniblink
-
-miniblink:
- @printf " BUILD examples/lpc13xx/lpc-p1343/miniblink\n"
- $(Q)$(MAKE) -C miniblink
-
-clean:
- @printf " CLEAN examples/lpc13xx/lpc-p1343/miniblink\n"
- $(Q)$(MAKE) -C miniblink clean
-
-.PHONY: miniblink clean
-