aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Hermann2010-12-30 14:12:32 +0100
committerUwe Hermann2010-12-30 14:12:32 +0100
commit8c946de4d432f575452688217ba0eeccaa0d351f (patch)
tree14aac5d2fb8df56a455c7353460e35bc69bafec6
parentd37a786c63a748027879e610a314b8f229c8325e (diff)
Some more LD paths fixes.
-rw-r--r--Makefile8
-rw-r--r--examples/lpc13xx/Makefile.include5
-rw-r--r--examples/stm32/Makefile.include8
3 files changed, 12 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 9bd2416..401f3a0 100644
--- a/Makefile
+++ b/Makefile
@@ -49,13 +49,13 @@ examples: lib
install: build
@printf " INSTALL headers\n"
- $(Q)$(INSTALL) -d $(INCDIR)/libopencm3/
- $(Q)$(INSTALL) -d $(LIBDIR)
+ $(Q)$(INSTALL) -d $(INCDIR)/libopencm3
+ $(Q)$(INSTALL) -d $(LIBDIR)/libopencm3
$(Q)cp -r include/* $(INCDIR)/libopencm3
@printf " INSTALL libs\n"
- $(Q)$(INSTALL) -m 0644 lib/*/*.a $(LIBDIR)
+ $(Q)$(INSTALL) -m 0644 lib/*/*.a $(LIBDIR)/libopencm3
@printf " INSTALL ldscripts\n"
- $(Q)$(INSTALL) -m 0644 lib/*/*.ld $(LIBDIR)
+ $(Q)$(INSTALL) -m 0644 lib/*/*.ld $(LIBDIR)/libopencm3
clean:
$(Q)$(MAKE) -C examples/stm32 clean
diff --git a/examples/lpc13xx/Makefile.include b/examples/lpc13xx/Makefile.include
index ed2b51e..58d2925 100644
--- a/examples/lpc13xx/Makefile.include
+++ b/examples/lpc13xx/Makefile.include
@@ -30,8 +30,9 @@ TOOLCHAIN_DIR = ../../../..
CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include -fno-common \
-mcpu=cortex-m3 -mthumb
LDSCRIPT = $(BINARY).ld
-LDFLAGS += -L$(TOOLCHAIN_DIR)/lib/lpc13xx -T$(LDSCRIPT) -nostartfiles \
- -Wl,--gc-sections
+LDFLAGS += -L$(TOOLCHAIN_DIR)/lib -L$(TOOLCHAIN_DIR)/lib/libopencm3 \
+ -L$(TOOLCHAIN_DIR)/lib/lpc13xx \
+ -T$(LDSCRIPT) -nostartfiles -Wl,--gc-sections
OBJS += $(BINARY).o
OOCD ?= openocd
diff --git a/examples/stm32/Makefile.include b/examples/stm32/Makefile.include
index d603d39..6594fb9 100644
--- a/examples/stm32/Makefile.include
+++ b/examples/stm32/Makefile.include
@@ -27,11 +27,13 @@ OBJDUMP = $(PREFIX)-objdump
# Uncomment this line if you want to use the installed (not local) library.
# TOOLCHAIN_DIR = `dirname \`which $(CC)\``/../$(PREFIX)
TOOLCHAIN_DIR = ../../../..
-CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include -fno-common \
+CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include \
+ -I$(TOOLCHAIN_DIR)/include/libopencm3 -fno-common \
-mcpu=cortex-m3 -mthumb
LDSCRIPT = $(BINARY).ld
-LDFLAGS += -L$(TOOLCHAIN_DIR)/lib/stm32 -T$(LDSCRIPT) -nostartfiles \
- -Wl,--gc-sections
+LDFLAGS += -L$(TOOLCHAIN_DIR)/lib -L$(TOOLCHAIN_DIR)/lib/libopencm3 \
+ -L$(TOOLCHAIN_DIR)/lib/stm32 \
+ -T$(LDSCRIPT) -nostartfiles -Wl,--gc-sections
OBJS += $(BINARY).o
OOCD ?= openocd