1 # Makefile template for ROOT dictionary generation
4 # 1. set variable CLASS_HDRS to the class header files
5 # 2. set DICTCPP variable to dictionary c++ file name
6 # e.g. <module>-DICT.cxx (<module> replaced by your module name)
7 # 3. add the source file name to the list of generated sources
8 # nodist_lib<module>_la_SOURCES = $(DICTCPP)
9 # 4. add additional include files which are necessary for the compilation
10 # of the dictionary files and which are not part of the CLASS_HDRS to
11 # the DICTINCLUDE variable
12 # 5. include this file from your Makefile(.am)
13 # e.g. include ../make.dict
15 # Author: Matthias.Richter@ift.uib.no
17 DICTDEF = $(MODULE)-LinkDef.h
18 DICTFILES = $(DICTCPP) $(DICTCPP:.cxx=.h) $(DICTDEF)
19 DICTHEADERS = $(CLASS_HDRS)
21 CLEANFILES += $(DICTFILES)
24 $(DICTCPP:.cxx=.h): $(DICTCPP)
25 if test $@ ; then : ; else rm -f $< ; $(MAKE) $(MAKEFLAGS) $< ; fi
27 $(DICTCPP): $(DICTHEADERS:%=$(srcdir)/%) $(DICTDEF)
28 if [ -x $(ROOTCINT) ]; then $(ROOTCINT) -f $@ -c $(CPPFLAGS) $(AM_CPPFLAGS) $(DEFS) $(foreach i, $(DICTINCLUDE), $(i)) $^ ; fi
29 $(DICTDEF): Makefile.am $(PKGDEF)
30 @echo '//automatically generated ROOT DICT definition' > $@
31 @echo '//!!! DO NOT EDIT THIS FILE !!!' >> $@
32 @echo '//add further class definitions to the CLASS_HDRS variable in Makefile.am' >> $@
33 @echo '#ifdef __CINT__' >> $@
34 @echo '#pragma link off all globals;' >> $@
35 @echo '#pragma link off all classes;' >> $@
36 @echo '#pragma link off all functions;' >> $@
37 @$(foreach i, $(DICTHEADERS:.h=), \
38 echo "#pragma link C++ class $(i);" >> $@ ;)