vm: optionally set CC and CXX on macosx.

db4
John Benediktsson 2014-06-06 15:13:48 -07:00
parent 56a3a3cd62
commit 7ff81f620b
2 changed files with 6 additions and 6 deletions

View File

@ -5,6 +5,6 @@ LIBS = -ldl -lm -lrt -lpthread $(X11_UI_LIBS) -Wl,--export-dynamic
# clang spams warnings if we use -Wl,--no-as-needed with -c
# -Wl,--no-as-needed is a gcc optimization, not required
ifneq ($(CPP),clang++)
ifneq ($(CXX),clang++)
SITE_CFLAGS += -Wl,--no-as-needed
endif

View File

@ -16,7 +16,7 @@ else
LIBS = -lm -framework Cocoa -framework AppKit
endif
LINKER = $(CPP) $(CFLAGS) -dynamiclib -single_module \
LINKER = $(CXX) $(CFLAGS) -dynamiclib -single_module \
-current_version $(VERSION) \
-compatibility_version $(VERSION) \
-fvisibility=hidden \
@ -28,12 +28,12 @@ LEOPARD_P := $(shell [[ `uname -r | sed -E -e 's/^([0-9]+).*/\1/'` -le 9 ]]; ech
XCODE_4_P := $(shell [[ `xcodebuild -version | sed -E -ne 's/^Xcode ([0-9]+).([0-9]).*/\1\2/p'` -ge 43 ]]; echo $$?)
ifeq ($(LEOPARD_P),0)
CC = gcc-4.2
CPP = g++-4.2
CC ?= gcc-4.2
CXX ?= g++-4.2
endif
ifeq ($(XCODE_4_P),0)
CC = clang
CPP = clang++
CC ?= clang
CXX ?= clang++
endif