# Makefile for Lena Ge Simulation # # Project Started: 7/15/05 #----------------------------------------------------- name := CALIOPE G4TARGET := $(name) G4EXLIB := true LOCALDIR := ${PWD} #CHOST="i686-pc-linux-gnu" CHOST="x86_64-apple-darwin10" ifndef G4INSTALL G4INSTALL = ../../.. endif include $(G4INSTALL)/config/architecture.gmk #....make sure geant uses static (not shared) libraries for CRY to work -- unless you built CRY libraries as shared (dyld on macs) export G4LIB_BUILD_STATIC=1 export G4LIB_BUILD_SHARED= #include ROOT libraries CPPFLAGS += -I$(ROOTSYS)/include #EXTRALIBS := -L$(ROOTSYS)/lib -lCore -lTree -lCint -lReflex -lCintex -ldl -lRIO -lNet -lHist -lRint -lMatrix -lPhysics -lThread -lMathCore -lz -pthread -lm EXTRALIBS := -L$(ROOTSYS)/lib -lCore -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -lpthread -Wl,-rpath,/Users/cbartram/root/lib -stdlib=libc++ -lm -ldl DICTIONARYPATH := ${G4WORKDIR}/dictionary CPPFLAGS += -g -O2 -pipe -Wall -W -Woverloaded-virtual LDFLAGS += -L${G4WORKDIR}/dictionary -l${name}DICT CPPFLAGS += $(shell $(ROOTSYS)/bin/root-config --cflags) LDFLAGS += $(shell $(ROOTSYS)/bin/root-config --glibs) .PHONY: all all: check dictionary lib bin dictionary: ifndef ROOTSYS @echo ROOTSYS not defined! endif mkdir -p ${DICTIONARYPATH} rootcint -f ${DICTIONARYPATH}/RootOutputData${name}DICT.cxx -c -p ${LOCALDIR}/include/RootOutputData.hh echo "Made Dictionary" g++ -o ${DICTIONARYPATH}/lib${name}DICT.so \ -fPIC -shared \ ${DICTIONARYPATH}/RootOutputData${name}DICT.cxx \ ${LOCALDIR}/src/RootOutputData.cc \ -I${LOCALDIR} -I${ROOTSYS}/include ${EXTRALIBS} ${CPPFLAGS} echo "Done root stuff" clean_all: clean #include CRY libraries (this must be include last -- just before binmake.gmk) CPPFLAGS += -I$(CRYHOME)/src EXTRALIBS += -L$(CRYHOME)/lib -lCRY include $(G4INSTALL)/config/binmake.gmk check: ifndef G4INSTALL @echo G4INSTALL not defined, please setup GEANT4 environment.; false endif ifndef CRYHOME @echo CRYHOME not defined, please setup CRY using: source ../setup; false endif