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
7 # 3. add the source file name to the list of generated sources
8 # nodist_lib<module>_la_SOURCES = $(DICTCPP)
9 # 4. include this file from your Makefile(.am)
10 # e.g. include ../make.dict
12 # Author: Matthias.Richter@ift.uib.no
14 DICTDEF = $(MODULE)-LinkDef.h
15 DICTFILES = $(DICTCPP) $(DICTCPP:.cxx=.h) $(DICTDEF)
16 DICTHEADERS = $(CLASS_HDRS)
18 CLEANFILES += $(DICTFILES)
21 $(DICTCPP:.cxx=.h): $(DICTCPP)
22 if test $@ ; then : ; else rm -f $< ; $(MAKE) $(MAKEFLAGS) $< ; fi
24 $(DICTCPP): $(DICTHEADERS:%=$(srcdir)/%) $(DICTDEF)
25 if [ -x $(ROOTCINT) ]; then $(ROOTCINT) -f $@ -c $(CPPFLAGS) $(AM_CPPFLAGS) $(DEFS) $^ ; fi
26 $(DICTDEF): Makefile.am
27 @echo '//automatically generated ROOT DICT definition' > $@
28 @echo '//!!! DO NOT EDIT THIS FILE !!!' >> $@
29 @echo '//add further class definitions to the CLASS_HDRS variable in Makefile.am' >> $@
30 @echo '#ifdef __CINT__' >> $@
31 @echo '#pragma link off all globals;' >> $@
32 @echo '#pragma link off all classes;' >> $@
33 @echo '#pragma link off all functions;' >> $@
34 @$(foreach i, $(DICTHEADERS:.h=), \
35 echo "#pragma link C++ class $(i);" >> $@ ;)