]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - HLT/make.dict
fix for 64bit architectures after last commit
[u/mrichter/AliRoot.git] / HLT / make.dict
... / ...
CommitLineData
1# Makefile template for ROOT dictionary generation
2#
3# This is a common include file which handles generation of the ROOT dictionary
4# files. It creates:
5# - the dict.cxx (variable DICTCPP)
6# - the dict.h (variable DICTCPP:.cxx=.h)
7# - optional: the linkdef.h (variable MODULE postfixed by -LinkDef.h)
8#
9# If the MODULE_DHDR variable is set in the package definition lib<module>.pkg
10# to a custom LinkDef file, the automatic generation of the LinkDef header is
11# disabled. Instead, the specified one is used.
12#
13# usage:
14# 1. set variable CLASS_HDRS to the class header files
15# 2. set DICTCPP variable to dictionary c++ file name
16# e.g. <module>-DICT.cxx (<module> replaced by your module name)
17# 3. add the source file name to the list of generated sources
18# nodist_lib<module>_la_SOURCES = $(DICTCPP)
19# 4. add additional include files which are necessary for the compilation
20# of the dictionary files and which are not part of the CLASS_HDRS to
21# the DICTINCLUDE variable
22# 5. include this file from your Makefile(.am)
23# e.g. include ../make.dict
24#
25# Author: Matthias.Richter@ift.uib.no
26#
27DICTAUTODEF = $(MODULE)-LinkDef.h
28DICTDEF = $(shell if test "x$(MODULE_DHDR)" = "x"; then echo $(DICTAUTODEF); else echo $(MODULE_DHDR); fi)
29DICTFILES = $(DICTCPP) $(DICTCPP:.cxx=.h) $(DICTAUTODEF)
30DICTHEADERS = $(CLASS_HDRS)
31
32CLEANFILES += $(DICTFILES)
33
34EXTRA_DIST += $(MODULE_DHDR)
35
36
37$(DICTCPP:.cxx=.h): $(DICTCPP)
38 if test $@ ; then : ; else rm -f $< ; $(MAKE) $(MAKEFLAGS) $< ; fi
39
40$(DICTCPP): $(DICTHEADERS:%=$(srcdir)/%) $(DICTDEF)
41 if [ -x $(ROOTCINT) ]; then $(ROOTCINT) -f $@ -c $(CPPFLAGS) $(AM_CPPFLAGS) $(DEFS) $(foreach i, $(DICTINCLUDE), $(i)) $^ ; fi
42
43$(DICTAUTODEF): Makefile.am $(PKGDEF)
44 @echo '//automatically generated ROOT DICT definition' > $@
45 @echo '//!!! DO NOT EDIT THIS FILE !!!' >> $@
46 @echo '//add further class definitions to the CLASS_HDRS variable in Makefile.am' >> $@
47 @echo '#ifdef __CINT__' >> $@
48 @echo '#pragma link off all globals;' >> $@
49 @echo '#pragma link off all classes;' >> $@
50 @echo '#pragma link off all functions;' >> $@
51 @$(foreach i, $(DICTHEADERS:.h=), \
52 echo "#pragma link C++ class "`echo $(i)| sed -e 's|.*/||'`"+;" >> $@ ;)
53 @echo '#endif' >> $@