4 # M. Kirsanov 07.04.2006
6 # 26.03.2008 CLHEP dependency removed
11 ifeq (x$(PYTHIA8LOCATION),x)
14 -include $(PYTHIA8LOCATION)/config.mk
16 # Location of directories.
21 LIBDIRARCH=lib/archive
24 # Libraries to include if GZIP support is enabled
25 ifeq (x$(ENABLEGZIP),xyes)
26 LIBGZIP=-L$(BOOSTLIBLOCATION) -lboost_iostreams -L$(ZLIBLOCATION) -lz
29 # There is no default behaviour, so remind user.
31 @echo "Usage: for NN = example number: make mainNN"
33 # Create an executable for one of the normal test programs
34 main00 main01 main02 main03 main04 main05 main06 main07 main08 main09 main10 \
35 main11 main12 main13 main14 main15 main16 main17 main18 main19 main20 \
36 main21 main22 main23 main24 main25 main26 main27 main28 main29 main30 \
37 main31 main32 main33 main34 main35 main36 main37 main38 main39 main40: \
38 $(PYTHIA8LOCATION)/$(LIBDIRARCH)/libpythia8.a
40 $(CXX) $(CXXFLAGS) -I$(PYTHIA8LOCATION)/$(INCDIR) $@.cc -o $(BINDIR)/$@.exe \
41 -L$(PYTHIA8LOCATION)/$(LIBDIRARCH) -lpythia8 -llhapdfdummy $(LIBGZIP)
42 @ln -fs $(BINDIR)/$@.exe $@.exe
44 # Create an executable linked to HepMC (if all goes well).
45 # Owing to excessive warning output -Wshadow is not used for HepMC.
46 ifneq (x$(HEPMCLOCATION),x)
48 $(PYTHIA8LOCATION)/$(LIBDIRARCH)/libpythia8.a $(PYTHIA8LOCATION)/$(LIBDIRARCH)/libhepmcinterface.a
50 $(CXX) $(CXXFLAGS) -Wno-shadow -I$(PYTHIA8LOCATION)/$(INCDIR) -I$(HEPMCLOCATION)/include \
51 $@.cc -o $(BINDIR)/$@.exe \
52 -L$(PYTHIA8LOCATION)/$(LIBDIRARCH) -lpythia8 -llhapdfdummy $(LIBGZIP) \
54 -L$(HEPMCLOCATION)/lib -lHepMC
55 @ln -fs $(BINDIR)/$@.exe $@.exe
58 @echo ERROR, this target needs HepMC, variable HEPMCLOCATION
61 # Create an executable that links to LHAPDF
62 main51 main52 main53: $(PYTHIA8LOCATION)/$(LIBDIRARCH)/libpythia8.a
64 $(CXX) $(CXXFLAGS) -I$(PYTHIA8LOCATION)/$(INCDIR) $@.cc -o $(BINDIR)/$@.exe \
65 -L$(PYTHIA8LOCATION)/$(LIBDIRARCH) -lpythia8 $(LIBGZIP) \
66 -L$(LHAPDFLOCATION) $(LHAPDFLIBNAME) \
68 @ln -fs $(BINDIR)/$@.exe $@.exe
70 # Create an executable that links to LHAPDF and HepMC
72 $(PYTHIA8LOCATION)/$(LIBDIRARCH)/libpythia8.a $(PYTHIA8LOCATION)/$(LIBDIRARCH)/libhepmcinterface.a
74 $(CXX) $(CXXFLAGS) -Wno-shadow -I$(PYTHIA8LOCATION)/$(INCDIR) -I$(HEPMCLOCATION)/include \
75 $@.cc -o $(BINDIR)/$@.exe \
76 -L$(PYTHIA8LOCATION)/$(LIBDIRARCH) -lpythia8 -lhepmcinterface $(LIBGZIP) \
77 -L$(LHAPDFLOCATION) $(LHAPDFLIBNAME) \
78 -L$(HEPMCLOCATION)/lib -lHepMC \
80 @ln -fs $(BINDIR)/$@.exe $@.exe
82 # Create an executable that links to Fastjet
83 # Owing to excessive warning output -Wshadow is not used for Fastjet.
84 # (Fixed as of Fastjet 3.0.1, so will be modified eventually.)
85 ifneq (x$(FASTJETLOCATION),x)
86 main71 main72: $(PYTHIA8LOCATION)/$(LIBDIRARCH)/libpythia8.a
88 # Note: $(CXXFLAGS) is after Fastjet flags as Fastjet includes
89 # optimisation/debug flags which may be unwanted (e.g. -g -O2)
90 $(CXX) -I$(PYTHIA8LOCATION)/$(INCDIR) $@.cc \
91 `$(FASTJETLOCATION)/bin/fastjet-config --cxxflags --plugins` \
92 $(CXXFLAGS) -Wno-shadow \
94 -L$(PYTHIA8LOCATION)/$(LIBDIRARCH) -lpythia8 -llhapdfdummy $(LIBGZIP) \
95 -L$(FASTJETLOCATION)/lib \
96 `$(FASTJETLOCATION)/bin/fastjet-config --libs --plugins`
97 @ln -fs $(BINDIR)/$@.exe $@.exe
101 @echo ERROR, this target needs Fastjet, variable FASTJETLOCATION
104 # Create an executable that links to Fastjet, HepMC and LHApdf
105 # Owing to excessive warning output -Wshadow is not used for Fastjet.
106 # (Fixed as of Fastjet 3.0.1, so will be modified eventually.)
107 ifneq (x$(FASTJETLOCATION),x)
108 main81 main82 main83 main84: \
109 $(PYTHIA8LOCATION)/$(LIBDIRARCH)/libpythia8.a $(PYTHIA8LOCATION)/$(LIBDIRARCH)/libhepmcinterface.a
111 # Note: $(CXXFLAGS) is after Fastjet flags as Fastjet includes
112 # optimisation/debug flags which may be unwanted (e.g. -g -O2)
113 $(CXX) -I$(PYTHIA8LOCATION)/$(INCDIR) $@.cc \
114 `$(FASTJETLOCATION)/bin/fastjet-config --cxxflags --plugins` \
115 $(CXXFLAGS) -Wno-shadow \
116 -I$(PYTHIA8LOCATION)/$(INCDIR) -I$(HEPMCLOCATION)/include \
117 -o $(BINDIR)/$@.exe \
118 -L$(PYTHIA8LOCATION)/$(LIBDIRARCH) -lpythia8 \
119 -L$(LHAPDFLOCATION) $(LHAPDFLIBNAME) \
121 -L$(HEPMCLOCATION)/lib -lHepMC \
122 -L$(FASTJETLOCATION)/lib \
123 -L$(LHAPDFLOCATION)/lib \
124 `$(FASTJETLOCATION)/bin/fastjet-config --libs --plugins`
125 @ln -fs $(BINDIR)/$@.exe $@.exe
128 main81 main82 main83 main84:
129 @echo ERROR, this target needs Fastjet, variable FASTJETLOCATION
132 # Create an executable that links to Pythia6. This part is obsolete and
133 # only retained, in a watered-down version, for debug purposes.
134 # Library created with "gfortran -c pythia64xx.f" (xx = current subversion),
135 # followed by "ar cru libpythia6.a pythia64xx.o" (on Linux).
136 # You would need to uncomment below and correct pythia6 library path.
137 #main91: $(PYTHIA8LOCATION)/$(LIBDIRARCH)/libpythia8.a
138 # @mkdir -p $(BINDIR)
139 # $(CXX) $(CXXFLAGS) -I$(PYTHIA8LOCATION)/$(INCDIR) $@.cc -o $(BINDIR)/$@.exe \
140 # -L$(PYTHIA8LOCATION)/$(LIBDIRARCH) -lpythia8 -llhapdfdummy $(LIBGZIP) \
141 # -L/directoryoflibpythia6.a -lpythia6 \
143 # @ln -fs $(BINDIR)/$@.exe $@.exe
145 # Clean up: remove executables and outdated files.
150 rm -f *~; rm -f \#*; rm -f core*