Merge pull request #5100 from gebart/pr/target-triple-rename
make: Rename TARGET_TRIPLE -> TARGET_ARCH
This commit is contained in:
commit
84eb6e9f8f
@ -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 BINDIR # This is the folder where the application should be built in.
|
||||||
export APPDIR # The base folder containing the application
|
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 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_TRIPLE)-", e.g. "arm-none-eabi-" or "msp430-".
|
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 CC # The C compiler to use.
|
||||||
export CXX # The CXX compiler to use.
|
export CXX # The CXX compiler to use.
|
||||||
export CFLAGS # The compiler flags. Must only ever be used with `+=`.
|
export CFLAGS # The compiler flags. Must only ever be used with `+=`.
|
||||||
|
|||||||
@ -2,10 +2,10 @@
|
|||||||
export CPU = lpc2387
|
export CPU = lpc2387
|
||||||
|
|
||||||
# Target triple for the build. Use arm-none-eabi if you are unsure.
|
# 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
|
# toolchain config
|
||||||
export PREFIX = $(if $(TARGET_TRIPLE),$(TARGET_TRIPLE)-)
|
export PREFIX = $(if $(TARGET_ARCH),$(TARGET_ARCH)-)
|
||||||
|
|
||||||
export CC = $(PREFIX)gcc
|
export CC = $(PREFIX)gcc
|
||||||
export CXX = $(PREFIX)g++
|
export CXX = $(PREFIX)g++
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
# Target triple for the build. Use arm-none-eabi if you are unsure.
|
# 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
|
# default toolchain prefix, defaults to target triple followed by a dash, you
|
||||||
# will most likely not need to touch this.
|
# 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
|
# define build specific options
|
||||||
export CFLAGS_CPU = -mcpu=$(MCPU) -mlittle-endian -mthumb $(CFLAGS_FPU)
|
export CFLAGS_CPU = -mcpu=$(MCPU) -mlittle-endian -mthumb $(CFLAGS_FPU)
|
||||||
|
|||||||
@ -18,6 +18,6 @@ export DBG = $(GDBPREFIX)gdb
|
|||||||
#export STRIP = $(LLVMPREFIX)strip
|
#export STRIP = $(LLVMPREFIX)strip
|
||||||
|
|
||||||
# Tell clang to cross compile
|
# Tell clang to cross compile
|
||||||
export CFLAGS += -target $(TARGET_TRIPLE)
|
export CFLAGS += -target $(TARGET_ARCH)
|
||||||
export CXXFLAGS += -target $(TARGET_TRIPLE)
|
export CXXFLAGS += -target $(TARGET_ARCH)
|
||||||
export LINKFLAGS += -target $(TARGET_TRIPLE)
|
export LINKFLAGS += -target $(TARGET_ARCH)
|
||||||
|
|||||||
@ -17,9 +17,9 @@ UNDEF := $(BINDIR)newlib_syscalls_default/syscalls.o $(UNDEF)
|
|||||||
# On OSX, newlib includes are possibly located in
|
# On OSX, newlib includes are possibly located in
|
||||||
# /usr/local/opt/arm-none-eabi*/arm-none-eabi/include
|
# /usr/local/opt/arm-none-eabi*/arm-none-eabi/include
|
||||||
NEWLIB_INCLUDE_PATTERNS ?= \
|
NEWLIB_INCLUDE_PATTERNS ?= \
|
||||||
/etc/alternatives/gcc-$(TARGET_TRIPLE)-include \
|
/etc/alternatives/gcc-$(TARGET_ARCH)-include \
|
||||||
/usr/$(TARGET_TRIPLE)/include \
|
/usr/$(TARGET_ARCH)/include \
|
||||||
/usr/local/opt/$(TARGET_TRIPLE)*/$(TARGET_TRIPLE)/include \
|
/usr/local/opt/$(TARGET_ARCH)*/$(TARGET_ARCH)/include \
|
||||||
#
|
#
|
||||||
# Use the wildcard Makefile function to search for existing directories matching
|
# 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
|
# 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
|
# 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
|
# the current PATH and use a relative path for the includes
|
||||||
ifeq (,$(NEWLIB_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
|
endif
|
||||||
|
|
||||||
# Newlib includes should go before GCC includes.
|
# Newlib includes should go before GCC includes.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user