# -*- mode: makefile -*- # # Makefile containing platform dependencies for ROOT based projects. # # Copyright (c) 2000 Rene Brun and Fons Rademakers # # Author: Fons Rademakers, 29/2/2000 ARCH := $(shell root-config --arch) PLATFORM := $(shell root-config --platform) CXX = ObjSuf = o SrcSuf = cxx ExeSuf = DllSuf = so OutPutOpt = -o # keep whitespace after "-o" ROOTCFLAGS := $(shell root-config --cflags) ROOTLDFLAGS := $(shell root-config --ldflags) ROOTLIBS := $(shell root-config --libs) ROOTGLIBS := $(shell root-config --glibs) HASTHREAD := $(shell root-config --has-thread) # Linux with egcs, gcc 2.9x, gcc 3.x (>= RedHat 5.2) CXX = g++ CXXFLAGS = -O -Wall -fPIC LD = g++ LDFLAGS = -O SOFLAGS = -shared CXXFLAGS += $(ROOTCFLAGS) LDFLAGS += $(ROOTLDFLAGS) LIBS = $(ROOTLIBS) $(SYSLIBS) GLIBS = $(ROOTGLIBS) $(SYSLIBS) LISTBOXS := $(wildcard *.$(SrcSuf)) ListBoxDict.$(SrcSuf) LISTBOXO := $(LISTBOXS:.$(SrcSuf)=.$(ObjSuf)) LISTBOX = ListBox(ExeSuf) OBJS = $(LISTBOXO) PROGRAMS = $(LISTBOX) .SUFFIXES: .$(SrcSuf) .$(ObjSuf) .$(DllSuf) all: $(PROGRAMS) $(LISTBOX): $(LISTBOXO) $(LD) $(LDFLAGS) $^ $(GLIBS) $(OutPutOpt)$@ @echo "$@ done" .$(SrcSuf).$(ObjSuf): $(CXX) $(CXXFLAGS) -c $< ListBoxDict.$(SrcSuf): ListBox.h LinkDef.h @echo "Generating dictionary $@..." @rootcint -f $@ -c $^ clean: rm -f *.o *Dict.* distclean: clean rm -f ListBox