From 11727f56c97fb3d007e0d08e59294b6791067bd1 Mon Sep 17 00:00:00 2001 From: Piotr Esden-Tempski Date: Sat, 25 Aug 2012 19:53:15 -0700 Subject: [PATCH] Minor build system fixes. --- examples/stm32/f2/Makefile.include | 2 +- examples/stm32/f4/Makefile.include | 2 +- lib/Makefile.include | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/stm32/f2/Makefile.include b/examples/stm32/f2/Makefile.include index 33130bee..3e338af5 100644 --- a/examples/stm32/f2/Makefile.include +++ b/examples/stm32/f2/Makefile.include @@ -86,7 +86,7 @@ flash: $(BINARY).flash @#printf " OBJDUMP $(*).list\n" $(Q)$(OBJDUMP) -S $(*).elf > $(*).list -%.elf: $(OBJS) $(LDSCRIPT) $(TOOLCHAIN_DIR)/lib/stm32/f2/libopencm3_stm32f2.a +%.elf: $(OBJS) $(LDSCRIPT) $(TOOLCHAIN_DIR)/lib/libopencm3_stm32f2.a @#printf " LD $(subst $(shell pwd)/,,$(@))\n" $(Q)$(LD) -o $(*).elf $(OBJS) -lopencm3_stm32f2 $(LDFLAGS) diff --git a/examples/stm32/f4/Makefile.include b/examples/stm32/f4/Makefile.include index 31ede743..b5f0fac7 100644 --- a/examples/stm32/f4/Makefile.include +++ b/examples/stm32/f4/Makefile.include @@ -86,7 +86,7 @@ flash: $(BINARY).flash @#printf " OBJDUMP $(*).list\n" $(Q)$(OBJDUMP) -S $(*).elf > $(*).list -%.elf: $(OBJS) $(LDSCRIPT) $(TOOLCHAIN_DIR)/lib/stm32/f4/libopencm3_stm32f4.a +%.elf: $(OBJS) $(LDSCRIPT) $(TOOLCHAIN_DIR)/lib/libopencm3_stm32f4.a @#printf " LD $(subst $(shell pwd)/,,$(@))\n" $(Q)$(LD) -o $(*).elf $(OBJS) -lopencm3_stm32f4 $(LDFLAGS) diff --git a/lib/Makefile.include b/lib/Makefile.include index 1f071e04..f2f1f7b2 100644 --- a/lib/Makefile.include +++ b/lib/Makefile.include @@ -32,6 +32,7 @@ $(SRCLIBDIR)/$(LIBNAME).a: $(SRCLIBDIR)/$(LIBNAME).ld $(OBJS) $(SRCLIBDIR)/$(LIBNAME).ld: $(LIBNAME).ld @printf " CP $(LIBNAME).ld\n" $(Q)cp $^ $@ + $(Q)if [ -f $(LIBNAME)_rom_to_ram.ld ]; then cp $(LIBNAME)_rom_to_ram.ld $(SRCLIBDIR); fi %.o: %.c @printf " CC $(subst $(shell pwd)/,,$(@))\n" @@ -42,6 +43,7 @@ clean: $(Q)rm -f *.o *.d $(Q)rm -f $(SRCLIBDIR)/$(LIBNAME).a $(Q)rm -f $(SRCLIBDIR)/$(LIBNAME).ld + $(Q)rm -f $(SRCLIBDIR)/$(LIBNAME)_rom_to_ram.ld .PHONY: clean