From 7faea389e8ba002e1c3c7604eaaa916fad583179 Mon Sep 17 00:00:00 2001 From: Gareth McMullin Date: Mon, 14 Mar 2011 16:45:17 +1300 Subject: Added dependency generation. Abort loops on error. --- examples/lpc13xx/Makefile.include | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'examples/lpc13xx/Makefile.include') diff --git a/examples/lpc13xx/Makefile.include b/examples/lpc13xx/Makefile.include index 6e80fd5..1f2deba 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 @@ -119,3 +119,5 @@ endif .PHONY: images clean +-include $(OBJS:.o=.d) + -- cgit v1.2.3 From cd88855d133c9286fd20caac2b562729258d6f7c Mon Sep 17 00:00:00 2001 From: Gareth McMullin Date: Sun, 24 Apr 2011 14:05:37 +1200 Subject: Delete example dependencies on 'make clean' --- examples/lm3s/Makefile.include | 1 + examples/lpc13xx/Makefile.include | 1 + examples/stm32/Makefile.include | 1 + 3 files changed, 3 insertions(+) (limited to 'examples/lpc13xx/Makefile.include') diff --git a/examples/lm3s/Makefile.include b/examples/lm3s/Makefile.include index 89c1279..764a145 100644 --- a/examples/lm3s/Makefile.include +++ b/examples/lm3s/Makefile.include @@ -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 diff --git a/examples/lpc13xx/Makefile.include b/examples/lpc13xx/Makefile.include index 1f2deba..c9ae180 100644 --- a/examples/lpc13xx/Makefile.include +++ b/examples/lpc13xx/Makefile.include @@ -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 diff --git a/examples/stm32/Makefile.include b/examples/stm32/Makefile.include index cdaff1d..acb78e8 100644 --- a/examples/stm32/Makefile.include +++ b/examples/stm32/Makefile.include @@ -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 -- cgit v1.2.3