Makefile: Allow to override CC

This makes it easier to build iproute2 with a custom compiler.

While at it, make HOSTCC default to the value of CC if not explicitly
set elsewhere.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: David Ahern <dsa@cumulusnetworks.com>
This commit is contained in:
Phil Sutter 2016-07-18 16:48:45 +02:00 committed by Stephen Hemminger
parent 30a8842c49
commit 7ffa2b557a
1 changed files with 2 additions and 2 deletions

View File

@ -34,8 +34,8 @@ ADDLIB+=ipx_ntop.o ipx_pton.o
#options for mpls
ADDLIB+=mpls_ntop.o mpls_pton.o
CC = gcc
HOSTCC = gcc
CC := gcc
HOSTCC ?= $(CC)
DEFINES += -D_GNU_SOURCE
# Turn on transparent support for LFS
DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE