Here is my MakeFile, but I want to stress the point that this flag is not produced in OSX 10.8 with the same MakeFile.
The error I get is
[quote]michaelkunkel:KINEFITTER$ make
g++ -O -Wall -fPIC -pthread -stdlib=libc++ -m64 -I/usr/local/Cellar/root/5.34.26/include/root -Wno-deprecated -c MergePlot.cc
g++: error: unrecognized command line option '-stdlib=libc++'
make: *** [MergePlot.o] Error 1[/quote]
Maybe it is easier to answer why this error is happening.
[code]# Makefile for the ROOT test programs.
This Makefile shows nicely how to compile and link applications
using the ROOT libraries on all supported platforms.
ARCH = linux
CXX =
ObjSuf = o
SrcSuf = cc
ExeSuf =
DllSuf = so
OutPutOpt = -o
DictSuf = Dict.o
WNO = -Wno-deprecated
ROOTCFLAGS := $(shell root-config --cflags)
ROOTLIBS := $(shell root-config --libs)
ROOTGLIBS := $(shell root-config --glibs)
ifeq ($(ARCH),linux)
Linux with gcc 2.7.2.x
CXX = g++
CXXFLAGS = -O -Wall -fPIC
LD = g++
LDFLAGS = -O
SOFLAGS = -shared
endif
ifeq ($(ARCH),linuxrh42)
Linux with gcc 2.7.2.x (RedHat 4.2)
CXX = g++
CXXFLAGS = -O -Wall -fPIC
LD = g++
LDFLAGS = -O
SOFLAGS = -shared
endif
ifeq ($(ARCH),linuxdeb)
Linux with gcc 2.7.2.x
CXX = g++
CXXFLAGS = -O -Wall -fPIC
LD = g++
LDFLAGS = -O
SOFLAGS = -shared
endif
ifeq ($(ARCH),linuxdeb2)
Linux with gcc 2.7.2.x
CXX = g++
CXXFLAGS = -O -Wall -fPIC
LD = g++
LDFLAGS = -O
SOFLAGS = -shared
endif
ifeq ($(ARCH),linuxsuse6)
Linux with gcc 2.7.2.x
CXX = g++
CXXFLAGS = -O -Wall -fPIC
LD = g++
LDFLAGS = -O
SOFLAGS = -shared
endif
ifeq ($(ARCH),linuxegcs)
Linux with egcs (>= RedHat 5.2)
CXX = g++
CXXFLAGS = -O -Wall -fPIC
LD = g++
LDFLAGS = -O
SOFLAGS = -shared
endif
ifeq ($(ARCH),linuxkcc)
Linux with the KAI compiler
CXX = KCC
CXXFLAGS = -fPIC +K0
LD = KCC
LDFLAGS = -O
SOFLAGS =
endif
ifeq ($(ARCH),linuxppcegcs)
MkLinux with egcs/glibc
CXX = g++
CXXFLAGS = -O -Wall -fPIC
LD = g++
LDFLAGS = -O
SOFLAGS = -shared -Wl,-soname,
endif
ifeq ($(ARCH),linuxia64gcc)
Itanium Linux with gcc 2.9x
CXX = g++
CXXFLAGS = -O -Wall -fPIC
LD = g++
LDFLAGS = -O
SOFLAGS = -shared
endif
ifeq ($(ARCH),linuxia64sgi)
Itanium Linux with sgiCC
CXX = sgiCC
CXXFLAGS = -O -Wall -fPIC
LD = gsgiCC
LDFLAGS = -O
SOFLAGS = -shared
endif
ifeq ($(ARCH),linuxalphaegcs)
Alpha Linux with egcs
CXX = g++
CXXFLAGS = -O -Wall -fPIC
LD = g++
LDFLAGS = -O
SOFLAGS = -shared
endif
ifeq ($(ARCH),linuxarm)
ARM Linux with egcs
CXX = g++
CXXFLAGS = -O -Wall -fPIC
LD = g++
LDFLAGS = -O
SOFLAGS = -shared
endif
ifeq ($(CXX),)
$(error $(ARCH) invalid architecture)
endif
TSpectrum = -lSpectrum
CXXFLAGS += $(ROOTCFLAGS)
CXXFLAGS += $(WNO)
LIBS = $(ROOTLIBS) $(SYSLIBS)
#GLIBS = $(ROOTGLIBS) -lrfstream -L/usr/local/lib/ -lshift $(SYSLIBS) -LKFitUtils.o -LKinFit.o
GLIBS = $(ROOTGLIBS) -L/usr/local/lib/ $(SYSLIBS) ccylinder.o intersept.o targcell.o stcounter.o -lgfortran
#GLIBS += $(TSpectrum)
#------------------------------------------------------------------------------
#MAINO = All_Fits_MergePlot_Pi0.$(ObjSuf)
#MAINS = All_Fits_MergePlot_Pi0.$(SrcSuf)
#MAIN = All_Fits_MergePlot_Pi0$(ExeSuf)
#PROGRAMS = $(MAIN)
MAINO = MergePlot.$(ObjSuf)
MAINS = MergePlot.$(SrcSuf)
MAIN = MergePlot$(ExeSuf)
PROGRAMS = $(MAIN)
#MAINO = TestFit.$(ObjSuf)
#MAINS = TestFit.$(SrcSuf)
#MAIN = TestFit$(ExeSuf)
#PROGRAMS = $(MAIN)
#MAINO = mpcal_tdc1.$(ObjSuf)
#MAINS = mpcal_tdc1.$(SrcSuf)
#MAIN = mpcal_tdc1$(ExeSuf)
#PROGRAMS = $(MAIN)
#MAINO = sphe.$(ObjSuf)
#MAINS = sphe.$(SrcSuf)
#MAIN = sphe$(ExeSuf)
#PROGRAMS = $(MAIN)
#MAINO = mpcal_vs.$(ObjSuf)
#MAINS = mpcal_vs.$(SrcSuf)
#MAIN = mpcal_vs$(ExeSuf)
#PROGRAMS = $(MAIN)
#------------------------------------------------------------------------------
.SUFFIXES: .$(SrcSuf) .$(ObjSuf) .$(DllSuf)
all: $(PROGRAMS)
doc:
root.exe -b -q make_html.C
%.$(ObjSuf):%.$(SrcSuf)
$(CXX) $(CXXFLAGS) -c $<
%Dict.$(SrcSuf):%.h
rootcint -f $@ -c $<
lib%.$(DllSuf): %Dict.$(ObjSuf) %.$(ObjSuf)
$(LD) $(SOFLAGS) $(CXXFLAGS) $^ -o $@
$(MAIN): $(MAINO) $(SLIB)
$(LD) $(CXXFLAGS) $(GLIBS) $^ -o $@
clean:
rm -f $(MAINO)
distclean:
make clean
@rm -f $(SLIB) Dict. *.def
[/code]