# # Modified PYTHIA Makefile to include ROOT libraries # by Peter Christiansen (peter.christiansen@hep.lu.se) # # Variables you need to define # # example # setenv MYPYTHIA ${HOME}/pythia/pythia8108 # setenv PYTHIA8DATA ${MYPYTHIA}/share/Pythia8/xmldoc # setenv LD_LIBRARY_PATH ${MYPYTHIA}/lib:${LD_LIBRARY_PATH} # # Strategy: # # Recompile PYTHIA: # ./configure --enable-shared # make # # Currently you have by hand to remove the pedantic options in: # $(MYPYTHIA)/config.mk # to make it compile SHELL = /bin/sh -include $(MYPYTHIA)/Makefile.inc # PYTHIA variables PYTHIA_INCDIR=$(MYPYTHIA)/include PYTHIA_LIBDIR=$(MYPYTHIA)/lib # ROOT variables (ROOTCFLAGS also includes include path) ROOTCFLAGS = $(shell root-config --cflags) ROOTLIBS = $(shell root-config --glibs) # There is no default behaviour, so remind user. all: @echo "Usage: make XXX, where XXX.cc is your program" # Create an executable for one of the normal test programs %: %.cc $(PYTHIA_LIBDIR)/libpythia8.so #dependencies $(CXX) $(CXXFLAGS) $(ROOTCFLAGS) -I$(PYTHIA_INCDIR) \ $@.cc -o $@.exe \ -L$(PYTHIA_LIBDIR) -lpythia8 \ $(ROOTLIBS) -lEG # Clean up: remove executables and outdated files. .PHONY: clean clean: rm -f *.exe rm -f *~; rm -f \#*; rm -f core*