aboutsummaryrefslogtreecommitdiff
path: root/examples/efm32
diff options
context:
space:
mode:
authorchrysn2012-02-27 16:07:24 +0100
committerchrysn2012-02-27 16:07:24 +0100
commit09523e854dbb2993d427b9a25ff464bb355d06f1 (patch)
tree65f7bd1e33d4ad229f16523b21fc42c3d206bf0d /examples/efm32
parentf52b1a56b076853cec95e848260d3ea83bae91ff (diff)
efm32 example: enhanced makefiles
Diffstat (limited to 'examples/efm32')
-rw-r--r--examples/efm32/tinygecko/Makefile.include3
-rw-r--r--examples/efm32/tinygecko/efm32-tg-stk3300/Makefile.include6
2 files changed, 4 insertions, 5 deletions
diff --git a/examples/efm32/tinygecko/Makefile.include b/examples/efm32/tinygecko/Makefile.include
index 76691ce..2426e98 100644
--- a/examples/efm32/tinygecko/Makefile.include
+++ b/examples/efm32/tinygecko/Makefile.include
@@ -30,7 +30,8 @@ GDB = $(PREFIX)-gdb
#TOOLCHAIN_DIR := $(shell dirname `which $(CC)`)/../$(PREFIX)
TOOLCHAIN_DIR = ../../../../..
CFLAGS += -Os -g -Wall -Wextra -I$(TOOLCHAIN_DIR)/include \
- -fno-common -mcpu=cortex-m3 -mthumb -msoft-float -MD
+ -fno-common -mcpu=cortex-m3 -mthumb -msoft-float -MD\
+ -D$(FAMILY)
LDSCRIPT ?= ${TOOLCHAIN_DIR}/lib/efm32/tinygecko/$(MCU).ld
LDFLAGS += -lc -lnosys -L$(TOOLCHAIN_DIR)/lib/efm32/tinygecko \
-T$(LDSCRIPT) -nostartfiles -Wl,--gc-sections \
diff --git a/examples/efm32/tinygecko/efm32-tg-stk3300/Makefile.include b/examples/efm32/tinygecko/efm32-tg-stk3300/Makefile.include
index e707b65..32e6cfc 100644
--- a/examples/efm32/tinygecko/efm32-tg-stk3300/Makefile.include
+++ b/examples/efm32/tinygecko/efm32-tg-stk3300/Makefile.include
@@ -18,8 +18,6 @@
##
MCU = EFM32TG840F32
+FAMILY = TINYGECKO
-# Linker scripts are always relative to the current directory. This file is
-# intended for inclusion from example subdirectories, so the Makefile.include
-# meant here would be called ../Makefile.include relative to here.
-include ../../Makefile.include
+include $(dir $(lastword $(MAKEFILE_LIST)))../Makefile.include