diff --git a/examples/efm32/tinygecko/Makefile.include b/examples/efm32/tinygecko/Makefile.include index 76691ce4..2426e988 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 e707b652..32e6cfc3 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