SHELL=/bin/bash WORKDIR=$(shell pwd) CC = g++ CXX = g++ CFLAGS = -g -fno-common -pthread LIBS = -L /usr/lib `root-config --glibs` -lTMVA ROOTINCS = `root-config --incdir` INCS = -I${ROOTINCS} -I${WORKDIR}/inc/ ROOTCINT = rootcint ${WORKDIR}/src/%.o : ${WORKDIR}/src/%.cpp @(echo "Compiling $(@F)") $(CC) $(CFLAGS) $(INCS) -c $< -o $@ NOBJS = ${WORKDIR}/src/RanGen.o ${WORKDIR}/src/PamUnfold.o ${WORKDIR}/src/PamUnfoldDict.o all: objects link link: $(NOBJS) $(CXX) -dynamiclib $(INCS) -o ${WORKDIR}/lib/libPamUnfold.dylib $^ ${LIBS} objects : dict $(NOBJS) dict : ${WORKDIR}/inc/PamUnfoldLinkDef.h ${ROOTCINT} -f ${WORKDIR}/src/PamUnfoldDict.cpp -c -I${ROOTINCS} ${WORKDIR}/inc/RanGen.h ${WORKDIR}/inc/PamUnfold.h ${WORKDIR}/inc/PamUnfoldLinkDef.h .PHONY : clean install clean: rm -f ${WORKDIR}/src/*.o ${WORKDIR}/lib/*.dylib ${WORKDIR}/src/PamUnfoldDict* install: cp ${WORKDIR}/inc/RanGen.h ${LOC_INC} cp ${WORKDIR}/inc/PamUnfold.h ${LOC_INC} cp ${WORKDIR}/lib/libPamUnfold.dylib ${LOC_LIB}