]>
Commit | Line | Data |
---|---|---|
b521659f | 1 | # Makefile template for ROOT dictionary generation |
2 | # | |
3 | # usage: | |
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 | |
11 | # | |
12 | # Author: Matthias.Richter@ift.uib.no | |
13 | # | |
14 | DICTDEF = $(MODULE)-LinkDef.h | |
15 | DICTFILES = $(DICTCPP) $(DICTCPP:.cxx=.h) $(DICTDEF) | |
16 | DICTHEADERS = $(CLASS_HDRS) | |
17 | ||
18 | CLEANFILES += $(DICTFILES) | |
19 | ||
20 | ||
21 | $(DICTCPP:.cxx=.h): $(DICTCPP) | |
22 | if test $@ ; then : ; else rm -f $< ; $(MAKE) $(MAKEFLAGS) $< ; fi | |
23 | ||
24 | $(DICTCPP): $(DICTHEADERS:%=$(srcdir)/%) $(DICTDEF) | |
74c73e5a | 25 | if [ -x $(ROOTCINT) ]; then $(ROOTCINT) -f $@ -c $(CPPFLAGS) $(AM_CPPFLAGS) $(DEFS) $^ ; fi |
b521659f | 26 | $(DICTDEF): Makefile.am |
27 | @echo '//automatically generated ROOT DICT definition' > $@ | |
28 | @echo '//!!! DO NOT EDIT THIS FILE !!!' >> $@ | |
fa760045 | 29 | @echo '//add further class definitions to the CLASS_HDRS variable in Makefile.am' >> $@ |
b521659f | 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);" >> $@ ;) | |
36 | @echo '#endif' >> $@ |