From c5247983e7bba1d57aba3b9f92d83e59cb268ffb Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Fri, 16 Sep 2016 21:55:42 +0000 Subject: [PATCH] Makefile: Allow an invocation like `make CC=clang-3.8` to work properly. git-svn-id: https://svn.eduke32.com/eduke32@5869 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/Makefile.common | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/polymer/eduke32/Makefile.common b/polymer/eduke32/Makefile.common index 05ab50d23..dda414ba9 100644 --- a/polymer/eduke32/Makefile.common +++ b/polymer/eduke32/Makefile.common @@ -67,6 +67,9 @@ CLANG_POTENTIAL_VERSION := $(shell $(CCFULLPATH) --version) ifeq ($(findstring clang,$(CC)),clang) override CLANG=1 + CLANGNAME:=$(CC) +else + CLANGNAME:=clang endif # detect clang symlinked as gcc, as in OS X ifeq ($(findstring clang,$(CLANG_POTENTIAL_VERSION)),clang) @@ -74,12 +77,12 @@ ifeq ($(findstring clang,$(CLANG_POTENTIAL_VERSION)),clang) endif ifneq (0,$(CLANG)) - override CC=clang -x c - override CXX=clang -x c++ - override COBJC=clang -x objective-c - override COBJCXX=clang -x objective-c++ - override L_CC=clang - override L_CXX=clang + override CC=$(CLANGNAME) -x c + override CXX=$(CLANGNAME) -x c++ + override COBJC=$(CLANGNAME) -x objective-c + override COBJCXX=$(CLANGNAME) -x objective-c++ + override L_CC=$(CLANGNAME) + override L_CXX=$(CLANGNAME) endif # GCC version, for conditional selection of flags.