]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
Makefile: Allow to override CC
authorPhil Sutter <phil@nwl.cc>
Mon, 18 Jul 2016 14:48:45 +0000 (16:48 +0200)
committerStephen Hemminger <shemming@brocade.com>
Wed, 20 Jul 2016 19:05:24 +0000 (12:05 -0700)
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>
Makefile

index 15c81ecfdca3a527be93c36a1e8618991259cbbe..fa200ddb76679f0db53890e6f7843b85542afa0a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -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