Skip to content
Snippets Groups Projects
Commit 23db9118 authored by Fons Rademakers's avatar Fons Rademakers
Browse files

add clang build support.

git-svn-id: http://root.cern.ch/svn/root/trunk@32568 27541ba8-7e3a-0410-8455-c3a389f83636
parent 84172117
No related branches found
No related tags found
No related merge requests found
......@@ -373,8 +373,12 @@ endif
CXXOUT ?= -o # keep whitespace after "-o"
##### gcc version #####
##### clang or gcc version #####
ifneq ($(findstring clang,$(CXX)),)
CLANG_MAJOR := $(shell $(CXX) -v 2>&1 | awk '{if (NR==1) print $$3}' | cut -d'.' -f1)
CLANG_MINOR := $(shell $(CXX) -v 2>&1 | awk '{if (NR==1) print $$3}' | cut -d'.' -f2)
else
ifneq ($(findstring gnu,$(COMPILER)),)
GCC_MAJOR := $(shell $(CXX) -dumpversion 2>&1 | cut -d'.' -f1)
GCC_MINOR := $(shell $(CXX) -dumpversion 2>&1 | cut -d'.' -f2)
......@@ -382,6 +386,7 @@ GCC_PATCH := $(shell $(CXX) -dumpversion 2>&1 | cut -d'.' -f3)
GCC_VERS := gcc-$(GCC_MAJOR).$(GCC_MINOR)
GCC_VERS_FULL := gcc-$(GCC_MAJOR).$(GCC_MINOR).$(GCC_PATCH)
endif
endif
##### f77 options #####
......
......@@ -164,6 +164,12 @@ CINTS2 := $(filter-out $(MODDIRSD)/longif.%,$(CINTS2))
CINTS2 += $(MODDIRSD)/gcc4strm.cxx
CINTS2 += $(MODDIRSD)/longif3.cxx
endif
ifeq ($(CLANG_MAJOR),1)
CINTS2 := $(filter-out $(MODDIRSD)/libstrm.%,$(CINTS2))
CINTS2 := $(filter-out $(MODDIRSD)/longif.%,$(CINTS2))
CINTS2 += $(MODDIRSD)/gcc4strm.cxx
CINTS2 += $(MODDIRSD)/longif3.cxx
endif
ifeq ($(CXXCMD),xlC)
ifeq ($(PLATFORM),macosx)
CINTS2 := $(filter-out $(MODDIRSD)/libstrm.%,$(CINTS2))
......@@ -198,6 +204,9 @@ MAKECINT := bin/makecint$(EXEEXT)
##### iosenum.h #####
IOSENUM := $(MODDIR)/include/iosenum.h
IOSENUMC := $(CINTDIRIOSEN)/iosenum.cxx
ifeq ($(CLANG_MAJOR),1)
IOSENUMA := $(CINTDIRIOSEN)/iosenum.$(ARCH)3
else
ifeq ($(GCC_MAJOR),4)
IOSENUMA := $(CINTDIRIOSEN)/iosenum.$(ARCH)3
else
......@@ -207,6 +216,7 @@ else
IOSENUMA := $(CINTDIRIOSEN)/iosenum.$(ARCH)
endif
endif
endif
# used in the main Makefile
ALLHDRS += $(CINTHT)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment