diff --git a/Makefile.vars b/Makefile.vars index d9de961a43..edb8af6a0c 100644 --- a/Makefile.vars +++ b/Makefile.vars @@ -22,8 +22,8 @@ export BINDIRBASE # This is the folder where the application should b export BINDIR # This is the folder where the application should be built in. export APPDIR # The base folder containing the application -export TARGET_TRIPLE # The target platform name, in GCC triple notation, e.g. "arm-none-eabi", "i686-elf", "avr" -export PREFIX # The prefix of the toolchain commands, usually "$(TARGET_TRIPLE)-", e.g. "arm-none-eabi-" or "msp430-". +export TARGET_ARCH # The target platform name, in GCC triple notation, e.g. "arm-none-eabi", "i686-elf", "avr" +export PREFIX # The prefix of the toolchain commands, usually "$(TARGET_ARCH)-", e.g. "arm-none-eabi-" or "msp430-". export CC # The C compiler to use. export CXX # The CXX compiler to use. export CFLAGS # The compiler flags. Must only ever be used with `+=`. diff --git a/boards/msba2-common/Makefile.include b/boards/msba2-common/Makefile.include index 7a00897f00..087f664bf4 100644 --- a/boards/msba2-common/Makefile.include +++ b/boards/msba2-common/Makefile.include @@ -2,10 +2,10 @@ export CPU = lpc2387 # Target triple for the build. Use arm-none-eabi if you are unsure. -export TARGET_TRIPLE ?= arm-none-eabi +export TARGET_ARCH ?= arm-none-eabi # toolchain config -export PREFIX = $(if $(TARGET_TRIPLE),$(TARGET_TRIPLE)-) +export PREFIX = $(if $(TARGET_ARCH),$(TARGET_ARCH)-) export CC = $(PREFIX)gcc export CXX = $(PREFIX)g++ diff --git a/cpu/Makefile.include.cortexm_common b/cpu/Makefile.include.cortexm_common index e3f66b31a0..1c3fcc4ea1 100644 --- a/cpu/Makefile.include.cortexm_common +++ b/cpu/Makefile.include.cortexm_common @@ -1,9 +1,9 @@ # Target triple for the build. Use arm-none-eabi if you are unsure. -export TARGET_TRIPLE ?= arm-none-eabi +export TARGET_ARCH ?= arm-none-eabi # default toolchain prefix, defaults to target triple followed by a dash, you # will most likely not need to touch this. -export PREFIX ?= $(if $(TARGET_TRIPLE),$(TARGET_TRIPLE)-) +export PREFIX ?= $(if $(TARGET_ARCH),$(TARGET_ARCH)-) # define build specific options export CFLAGS_CPU = -mcpu=$(MCPU) -mlittle-endian -mthumb $(CFLAGS_FPU) diff --git a/cpu/Makefile.include.llvm b/cpu/Makefile.include.llvm index 387b07dd47..f796ec1b29 100644 --- a/cpu/Makefile.include.llvm +++ b/cpu/Makefile.include.llvm @@ -18,6 +18,6 @@ export DBG = $(GDBPREFIX)gdb #export STRIP = $(LLVMPREFIX)strip # Tell clang to cross compile -export CFLAGS += -target $(TARGET_TRIPLE) -export CXXFLAGS += -target $(TARGET_TRIPLE) -export LINKFLAGS += -target $(TARGET_TRIPLE) +export CFLAGS += -target $(TARGET_ARCH) +export CXXFLAGS += -target $(TARGET_ARCH) +export LINKFLAGS += -target $(TARGET_ARCH) diff --git a/sys/newlib/Makefile.include b/sys/newlib/Makefile.include index f7f24f6247..7db4d395bd 100644 --- a/sys/newlib/Makefile.include +++ b/sys/newlib/Makefile.include @@ -17,9 +17,9 @@ UNDEF := $(BINDIR)newlib_syscalls_default/syscalls.o $(UNDEF) # On OSX, newlib includes are possibly located in # /usr/local/opt/arm-none-eabi*/arm-none-eabi/include NEWLIB_INCLUDE_PATTERNS ?= \ - /etc/alternatives/gcc-$(TARGET_TRIPLE)-include \ - /usr/$(TARGET_TRIPLE)/include \ - /usr/local/opt/$(TARGET_TRIPLE)*/$(TARGET_TRIPLE)/include \ + /etc/alternatives/gcc-$(TARGET_ARCH)-include \ + /usr/$(TARGET_ARCH)/include \ + /usr/local/opt/$(TARGET_ARCH)*/$(TARGET_ARCH)/include \ # # Use the wildcard Makefile function to search for existing directories matching # the patterns above. We use the -isystem gcc/clang argument to add the include @@ -33,7 +33,7 @@ NEWLIB_INCLUDES ?= \ # If nothing was found we will try to fall back to searching for a cross-gcc in # the current PATH and use a relative path for the includes ifeq (,$(NEWLIB_INCLUDES)) - NEWLIB_INCLUDES := $(addprefix -isystem ,$(wildcard $(dir $(shell which $(PREFIX)gcc))../$(TARGET_TRIPLE)/include)) + NEWLIB_INCLUDES := $(addprefix -isystem ,$(wildcard $(dir $(shell which $(PREFIX)gcc))../$(TARGET_ARCH)/include)) endif # Newlib includes should go before GCC includes.