RED='\E[1;31;40m'
GREEN='\E[1;32;40m'
YELLOW='\E[1;33;40m'
BLUE='\E[1;34;40m'
WHITE='\E[1;37;40m'
VIOLET='\E[1;35;40m'
CYAN='\E[1;36;40m'
EGREEN=echo -e ${GREEN}
RESET=tput sgr0
CC=gcc
LD=g++
CXX=g++
CXXFLAGS= -Wall -fPIC  `root-config --cflags` -I. -I${PAM_INC} \
				        -I${PAM_YODA}/include/yoda \
					-I${ROOTSYS}/include \
                                        -I${PAM_VMC}/include \
                                        -I${PAM_VMC}/ac/include \
                                        -I${PAM_VMC}/cal/include \
                                        -I${PAM_VMC}/nd/include \
                                        -I${PAM_VMC}/s4/include \
                                        -I${PAM_VMC}/tof/include \
                                        -I${PAM_VMC}/trk/include
CXXLIBS= `root-config --glibs` -L${PAM_LIB}\
                               ${PAM_LIB}/libPamLevel2.so \
                               ${PAM_LIB}/libTrkLevel2.so \
                               ${PAM_LIB}/libTrkLevel1.so \
                               ${PAM_LIB}/libS4Level2.so \
                               ${PAM_LIB}/libCaloLevel1.so \
                               ${PAM_LIB}/libCaloLevel2.so \
                               ${PAM_LIB}/libNDLevel2.so \
                               ${PAM_LIB}/libToFLevel2.so \
                               ${PAM_LIB}/libGLTables.so \
                               ${PAM_LIB}/libAcLevel2.so \
                               ${PAM_LIB}/libOrbitalInfo.so \
                               ${PAM_LIB}/libTrigLevel2.so \
                               ${PAM_LIB}/libyoda.so \
                               ${PAM_LIB}/libDarthVader.so\
                               ${PAM_LIB}/libsgp4.so \
                               ${PAM_LIB}/libTrkHough.so  \
                               ${PAM_LIB}/libRunInfo.so   \
                               ${ROOTSYS}/lib/libVMC.so \
                               ${ROOTSYS}/lib/libGeom.so \
                               ${ROOTSYS}/lib/libPhysics.so \
                               ${ROOTSYS}/lib/libTree.so \
                               ${ROOTSYS}/lib/libEG.so \
                               ${ROOTSYS}/lib/libSQL.so \
                               ${PAM_VMC}/lib/tgt_linux/libPamVMC_fc.so 
CXXSRC=vmc_dig.cpp
CXXOBJS=vmc_dig.o 

all:  vmc_dig

vmc_dig: ${CXXOBJS} ${MYLIBS}
	@(${EGREEN} "Creating executable: "${WHITE} "$@"; ${RESET})
	@${LD} ${CXXLIBS} -o $@ $^
	@rm -f ${CXXOBJS}

vmc_dig.o: ${CXXSRC}
	@rm -f ${CXXOBJS}
	@(${EGREEN} "Creating object file: "${WHITE} "$@"; ${RESET})
	@${CXX} ${CXXFLAGS}  -c -o $@ $<
clean:
	rm vmc_dig  *.d *.o 