# Makefile template for ROOT dictionary generation # # usage: # 1. set variable CLASS_HDRS to the class header files # 2. set DICTCPP variable to dictionary c++ file name # e.g. -DICT.cxx ( replaced by your module name) # 3. add the source file name to the list of generated sources # nodist_lib_la_SOURCES = $(DICTCPP) # 4. add additional include files which are necessary for the compilation # of the dictionary files and which are not part of the CLASS_HDRS to # the DICTINCLUDE variable # 5. include this file from your Makefile(.am) # e.g. include ../make.dict # # Author: Matthias.Richter@ift.uib.no # DICTDEF = $(MODULE)-LinkDef.h DICTFILES = $(DICTCPP) $(DICTCPP:.cxx=.h) $(DICTDEF) DICTHEADERS = $(CLASS_HDRS) CLEANFILES += $(DICTFILES) $(DICTCPP:.cxx=.h): $(DICTCPP) if test $@ ; then : ; else rm -f $< ; $(MAKE) $(MAKEFLAGS) $< ; fi $(DICTCPP): $(DICTHEADERS:%=$(srcdir)/%) $(DICTDEF) if [ -x $(ROOTCINT) ]; then $(ROOTCINT) -f $@ -c $(CPPFLAGS) $(AM_CPPFLAGS) $(DEFS) $(foreach i, $(DICTINCLUDE), $(i)) $^ ; fi $(DICTDEF): Makefile.am $(PKGDEF) @echo '//automatically generated ROOT DICT definition' > $@ @echo '//!!! DO NOT EDIT THIS FILE !!!' >> $@ @echo '//add further class definitions to the CLASS_HDRS variable in Makefile.am' >> $@ @echo '#ifdef __CINT__' >> $@ @echo '#pragma link off all globals;' >> $@ @echo '#pragma link off all classes;' >> $@ @echo '#pragma link off all functions;' >> $@ $(foreach i, $(DICTHEADERS:.h=), \ echo "#pragma link C++ class "`echo $(i)| sed -e 's|.*/||'`";" >> $@ ;) @echo '#endif' >> $@