mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-30 01:38:53 +00:00
Fix for make-linux: detect whether CC/CXX were explicitly overridden, and if not then use the gcc/clang selection logic. Otherwise ?= breaks this.
This commit is contained in:
parent
b3516c599b
commit
a493fc23f4
@ -18,8 +18,14 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
# Automagically pick clang or gcc, with preference for clang
|
# Automagically pick clang or gcc, with preference for clang
|
||||||
CC?=$(shell if [ -e /usr/bin/clang ]; then echo clang; else echo gcc; fi)
|
# This is only done if we have not overridden these with an environment or CLI variable
|
||||||
CXX?=$(shell if [ -e /usr/bin/clang++ ]; then echo clang++; else echo g++; fi)
|
ifeq ($(origin CC),default)
|
||||||
|
CC=$(shell if [ -e /usr/bin/clang ]; then echo clang; else echo gcc; fi)
|
||||||
|
endif
|
||||||
|
ifeq ($(origin CXX),default)
|
||||||
|
CXX=$(shell if [ -e /usr/bin/clang++ ]; then echo clang++; else echo g++; fi)
|
||||||
|
endif
|
||||||
|
|
||||||
INCLUDES=
|
INCLUDES=
|
||||||
DEFS=
|
DEFS=
|
||||||
LDLIBS?=
|
LDLIBS?=
|
||||||
|
Loading…
Reference in New Issue
Block a user