make: accept preset toolchain variables

Use the preset values of CC, CXX, LD, AR if already defined in the
environment.

This is typically required for building libevl with the Yocto SDK,
with the settings sourced from the environment-setup script.

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
This commit is contained in:
Philippe Gerum 2021-09-05 15:52:08 +02:00
parent 41dc88ab52
commit 1489e7dddd
1 changed files with 4 additions and 4 deletions

View File

@ -5,10 +5,10 @@ ARCH ?= $(shell uname -m | sed \
-e s/aarch64.*/arm64/ \ -e s/aarch64.*/arm64/ \
-e s/x86_64/x86/ ) -e s/x86_64/x86/ )
CROSS_COMPILE ?= CROSS_COMPILE ?=
CC = $(CROSS_COMPILE)gcc CC ?= $(CROSS_COMPILE)gcc
CXX = $(CROSS_COMPILE)g++ CXX ?= $(CROSS_COMPILE)g++
LD = $(CROSS_COMPILE)ld LD ?= $(CROSS_COMPILE)ld
AR = $(CROSS_COMPILE)ar AR ?= $(CROSS_COMPILE)ar
UAPI ?= /usr/include UAPI ?= /usr/include
DESTDIR ?= /usr/evl DESTDIR ?= /usr/evl