1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

make: Rename TARGET_TRIPLE -> TARGET_ARCH

This commit is contained in:
Joakim Nohlgård 2016-03-17 21:55:17 +01:00
parent e7cfee8950
commit 7e3c67b654
5 changed files with 13 additions and 13 deletions

View File

@ -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 `+=`.

View File

@ -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++

View File

@ -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)

View File

@ -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)

View File

@ -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.