Browse Source

make: Rename TARGET_TRIPLE -> TARGET_ARCH

pr/gpio
Joakim Nohlgård 7 years ago
parent
commit
7e3c67b654
  1. 4
      Makefile.vars
  2. 4
      boards/msba2-common/Makefile.include
  3. 4
      cpu/Makefile.include.cortexm_common
  4. 6
      cpu/Makefile.include.llvm
  5. 8
      sys/newlib/Makefile.include

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

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

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

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

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

Loading…
Cancel
Save