From dba91eaa096d85992bf37a6c19dbead8104d9088 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 24 Jul 2015 13:17:41 -0700 Subject: [PATCH] Apply same Linux compiler-picker logic to Mac. --- make-mac.mk | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/make-mac.mk b/make-mac.mk index 1bc842cee..02d42252e 100644 --- a/make-mac.mk +++ b/make-mac.mk @@ -1,5 +1,9 @@ -CC?=clang -CXX?=clang++ +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=-I/usr/local/include DEFS=