Index: /trunk/Makefile
===================================================================
--- /trunk/Makefile	(revision 1176)
+++ /trunk/Makefile	(revision 1177)
@@ -41,10 +41,10 @@
 ifneq ($(PYTHIA8),)
 HAS_PYTHIA8 = true
-CXXFLAGS += -DHAS_PYTHIA8 -I$(PYTHIA8)/include
+CXXFLAGS += -I$(PYTHIA8)/include
 DELPHES_LIBS += -L$(PYTHIA8)/lib -lpythia8 -llhapdfdummy
 else
 ifneq ($(PYTHIA8DATA),)
 HAS_PYTHIA8 = true
-CXXFLAGS += -DHAS_PYTHIA8 -I$(PYTHIA8DATA)/../include
+CXXFLAGS += -I$(PYTHIA8DATA)/../include
 DELPHES_LIBS += -L$(PYTHIA8DATA)/../lib -lpythia8 -llhapdfdummy
 endif
@@ -288,4 +288,13 @@
 EXECUTABLE_OBJ +=  \
 	tmp/readers/DelphesPythia8.$(ObjSuf)
+
+tmp/modules/Pythia8Dict.$(SrcSuf): \
+	modules/Pythia8LinkDef.h \
+	modules/PileUpMergerPythia8.h
+DELPHES_DICT +=  \
+	tmp/modules/Pythia8Dict.$(SrcSuf)
+
+DELPHES_DICT_OBJ +=  \
+	tmp/modules/Pythia8Dict.$(ObjSuf)
 
 endif
@@ -321,6 +330,5 @@
 	modules/Cloner.h \
 	modules/Weighter.h \
-	modules/ExampleModule.h \
-	modules/PileUpMergerPythia8.h
+	modules/ExampleModule.h
 tmp/external/ExRootAnalysis/ExRootAnalysisDict.$(SrcSuf): \
 	external/ExRootAnalysis/ExRootAnalysisLinkDef.h \
@@ -335,10 +343,10 @@
 	external/ExRootAnalysis/ExRootConfReader.h \
 	external/ExRootAnalysis/ExRootTask.h
-DELPHES_DICT =  \
+DELPHES_DICT +=  \
 	tmp/classes/ClassesDict.$(SrcSuf) \
 	tmp/modules/ModulesDict.$(SrcSuf) \
 	tmp/external/ExRootAnalysis/ExRootAnalysisDict.$(SrcSuf)
 
-DELPHES_DICT_OBJ =  \
+DELPHES_DICT_OBJ +=  \
 	tmp/classes/ClassesDict.$(ObjSuf) \
 	tmp/modules/ModulesDict.$(ObjSuf) \
@@ -349,8 +357,8 @@
 	display/DelphesDisplay.h \
 	display/DelphesCaloData.h
-DISPLAY_DICT =  \
+DISPLAY_DICT +=  \
 	tmp/display/DisplayDict.$(SrcSuf)
 
-DISPLAY_DICT_OBJ =  \
+DISPLAY_DICT_OBJ +=  \
 	tmp/display/DisplayDict.$(ObjSuf)
 
@@ -1094,5 +1102,5 @@
 tmp/external/tcl/tclCmdMZ.$(ObjSuf): \
 	external/tcl/tclCmdMZ.c
-TCL_OBJ =  \
+TCL_OBJ +=  \
 	tmp/external/tcl/tclObj.$(ObjSuf) \
 	tmp/external/tcl/tclUtil.$(ObjSuf) \
@@ -1497,5 +1505,5 @@
 	@mkdir -p $(@D)
 	@echo ">> Generating $@"
-	@rootcint -f $@ -c $(CXXFLAGS) $<
+	@rootcint -f $@ -c -Iexternal $<
 	@echo "#define private public" > $@.arch
 	@echo "#define protected public" >> $@.arch
Index: /trunk/doc/genMakefile.tcl
===================================================================
--- /trunk/doc/genMakefile.tcl	(revision 1176)
+++ /trunk/doc/genMakefile.tcl	(revision 1177)
@@ -71,9 +71,9 @@
   }
 
-  puts -nonewline "${dictVar} = $suffix"
+  puts -nonewline "${dictVar} += $suffix"
   puts [join $dictSrcFiles $suffix]
   puts {}
 
-  puts -nonewline "${dictVar}_OBJ = $suffix"
+  puts -nonewline "${dictVar}_OBJ += $suffix"
   puts [join $dictObjFiles $suffix]
   puts {}
@@ -133,5 +133,5 @@
   }
 
-  puts -nonewline "TCL_OBJ = $suffix"
+  puts -nonewline "TCL_OBJ += $suffix"
   puts [join $srcObjFiles $suffix]
   puts {}
@@ -147,6 +147,4 @@
 
   foreach fileName $executable {
-    if {$fileName == "examples/DelphesProMC.cpp"} continue
-
     regsub {\.cpp} $fileName {} exeObjName
     set exeObjName $prefix$exeObjName
@@ -224,10 +222,10 @@
 ifneq ($(PYTHIA8),)
 HAS_PYTHIA8 = true
-CXXFLAGS += -DHAS_PYTHIA8 -I$(PYTHIA8)/include
+CXXFLAGS += -I$(PYTHIA8)/include
 DELPHES_LIBS += -L$(PYTHIA8)/lib -lpythia8 -llhapdfdummy
 else
 ifneq ($(PYTHIA8DATA),)
 HAS_PYTHIA8 = true
-CXXFLAGS += -DHAS_PYTHIA8 -I$(PYTHIA8DATA)/../include
+CXXFLAGS += -I$(PYTHIA8DATA)/../include
 DELPHES_LIBS += -L$(PYTHIA8DATA)/../lib -lpythia8 -llhapdfdummy
 endif
@@ -267,10 +265,11 @@
 puts {ifeq ($(HAS_PYTHIA8),true)}
 executableDeps {readers/DelphesPythia8.cpp}
+dictDeps {DELPHES_DICT} {modules/Pythia8LinkDef.h}
 puts {endif}
 puts {}
 
-dictDeps {DELPHES_DICT} {classes/*LinkDef.h} {modules/*LinkDef.h} {external/ExRootAnalysis/*LinkDef.h}
-
-dictDeps {DISPLAY_DICT} {display/*LinkDef.h}
+dictDeps {DELPHES_DICT} {classes/ClassesLinkDef.h} {modules/ModulesLinkDef.h} {external/ExRootAnalysis/ExRootAnalysisLinkDef.h}
+
+dictDeps {DISPLAY_DICT} {display/DisplayLinkDef.h}
 
 sourceDeps {DELPHES} {classes/*.cc} {modules/*.cc} {external/ExRootAnalysis/*.cc} {external/fastjet/*.cc} {external/fastjet/tools/*.cc} {external/fastjet/plugins/*/*.cc}
@@ -366,5 +365,5 @@
 	@mkdir -p $(@D)
 	@echo ">> Generating $@"
-	@rootcint -f $@ -c $(CXXFLAGS) $<
+	@rootcint -f $@ -c -Iexternal $<
 	@echo "#define private public" > $@.arch
 	@echo "#define protected public" >> $@.arch
Index: /trunk/modules/ModulesLinkDef.h
===================================================================
--- /trunk/modules/ModulesLinkDef.h	(revision 1176)
+++ /trunk/modules/ModulesLinkDef.h	(revision 1177)
@@ -37,8 +37,4 @@
 #include "modules/ExampleModule.h"
 
-#ifdef HAS_PYTHIA8
-#include "modules/PileUpMergerPythia8.h"
-#endif
-
 #ifdef __CINT__
 
@@ -72,7 +68,3 @@
 #pragma link C++ class ExampleModule+;
 
-#ifdef HAS_PYTHIA8
-#pragma link C++ class PileUpMergerPythia8+;
 #endif
-
-#endif
Index: /trunk/modules/Pythia8LinkDef.h
===================================================================
--- /trunk/modules/Pythia8LinkDef.h	(revision 1177)
+++ /trunk/modules/Pythia8LinkDef.h	(revision 1177)
@@ -0,0 +1,24 @@
+
+/** \class
+ *
+ *  Lists classes to be included in cint dicitonary
+ *
+ *  $Date$
+ *  $Revision$
+ *
+ *
+ *  \author P. Demin - UCL, Louvain-la-Neuve
+ *
+ */
+
+#include "modules/PileUpMergerPythia8.h"
+
+#ifdef __CINT__
+
+#pragma link off all globals;
+#pragma link off all classes;
+#pragma link off all functions;
+
+#pragma link C++ class PileUpMergerPythia8+;
+
+#endif
