aboutsummaryrefslogtreecommitdiffstats
path: root/support/make
diff options
context:
space:
mode:
Diffstat (limited to 'support/make')
-rw-r--r--support/make/build-rules.mk13
1 files changed, 13 insertions, 0 deletions
diff --git a/support/make/build-rules.mk b/support/make/build-rules.mk
index 3d541ba..d180c89 100644
--- a/support/make/build-rules.mk
+++ b/support/make/build-rules.mk
@@ -22,6 +22,8 @@ ifndef V
SILENT_OBJDUMP = @echo ' [OBJDUMP] ' $(OBJDUMP);
endif
+# Extra build configuration
+
BUILDDIRS :=
TGT_BIN :=
@@ -29,6 +31,17 @@ CFLAGS = $(GLOBAL_CFLAGS) $(TGT_CFLAGS)
CXXFLAGS = $(GLOBAL_CXXFLAGS) $(TGT_CXXFLAGS)
ASFLAGS = $(GLOBAL_ASFLAGS) $(TGT_ASFLAGS)
+# Hacks to determine extra libraries we need to link against based on
+# the toolchain. The default specifies no extra libraries, but it can
+# be overridden.
+LD_TOOLCHAIN_PATH := $(LDDIR)/toolchains/generic
+ifneq ($(findstring ARM/embedded,$(shell $(CC) --version)),)
+# GCC ARM Embedded, https://launchpad.net/gcc-arm-embedded/
+LD_TOOLCHAIN_PATH := $(LDDIR)/toolchains/gcc-arm-embedded
+endif
+# Add toolchain directory to LD search path
+TOOLCHAIN_LDFLAGS := -L $(LD_TOOLCHAIN_PATH)
+
# General directory independent build rules, generate dependency information
$(BUILD_PATH)/%.o: %.c
$(SILENT_CC) $(CC) $(CFLAGS) -MMD -MP -MF $(@:%.o=%.d) -MT $@ -o $@ -c $<