CMake: removing qpythia from the depedencies
[u/mrichter/AliRoot.git] / HLT / make.dict
CommitLineData
b521659f 1# Makefile template for ROOT dictionary generation
2#
85e53837 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#
b521659f 13# usage:
14# 1. set variable CLASS_HDRS to the class header files
15# 2. set DICTCPP variable to dictionary c++ file name
4a6b4894 16# e.g. <module>-DICT.cxx (<module> replaced by your module name)
b521659f 17# 3. add the source file name to the list of generated sources
18# nodist_lib<module>_la_SOURCES = $(DICTCPP)
4a6b4894 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)
b521659f 23# e.g. include ../make.dict
24#
25# Author: Matthias.Richter@ift.uib.no
26#
85e53837 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)
94c65cc8 30DICTHEADERS = $(CLASS_HDRS)
b521659f 31
32CLEANFILES += $(DICTFILES)
33
85e53837 34EXTRA_DIST += $(MODULE_DHDR)
35
4386ebdb 36# the rootcint buffer for macros is limited to 1024 characters
37# we have to filter out some of the defines
53eb3786 38# The asterisk at the end is important even for defines which
39# are not wildcards. But otherwise the case does not pick them.
40DEFFILTER = -DPACKAGE* -DHAVE_STDLIB_H=1* -DHAVE_STRING_H=1* -DHAVE_MEMORY_H=1* -DHAVE_STRINGS_H=1* -DHAVE_INTTYPES_H=1* -DHAVE_STDINT_H=1* -DHAVE_UNISTD_H=1* -DHAVE_DLFCN_H=1* -DHAVE_NOT_ALIMAGF30848* -DHAVE_NOT_ALTRORAWSTREAMV3* -DHAVE_NOT_ALIRUNLOADER30859* -DHAVE_NOT_ESD_COPY* -DHAVE_NOT_MUON_DIGITMAKER_GETRAWSTREAM* -DHAVE_NOT_ALITPCCALIBPULSER* -DHAVE_NOT_ALIRAWREADERMEMORY_ADDBUFFER* -DHAVE_NOT_TPCOFFLINE_REC*
b521659f 41
42$(DICTCPP:.cxx=.h): $(DICTCPP)
43 if test $@ ; then : ; else rm -f $< ; $(MAKE) $(MAKEFLAGS) $< ; fi
44
45$(DICTCPP): $(DICTHEADERS:%=$(srcdir)/%) $(DICTDEF)
4386ebdb 46 if [ -x $(ROOTCINT) ]; then $(ROOTCINT) -f $@ -c $(CPPFLAGS) $(AM_CPPFLAGS) \
47 `for i in $(DEFS);do case $$i in $(foreach def, $(DEFFILTER), $(def) |) -DVERSION*);; *) echo -n " $$i";; esac; done` \
48 $(foreach i, $(DICTINCLUDE), $(i)) \
49 $^ ; fi
85e53837 50
51$(DICTAUTODEF): Makefile.am $(PKGDEF)
b521659f 52 @echo '//automatically generated ROOT DICT definition' > $@
53 @echo '//!!! DO NOT EDIT THIS FILE !!!' >> $@
fa760045 54 @echo '//add further class definitions to the CLASS_HDRS variable in Makefile.am' >> $@
b521659f 55 @echo '#ifdef __CINT__' >> $@
56 @echo '#pragma link off all globals;' >> $@
57 @echo '#pragma link off all classes;' >> $@
58 @echo '#pragma link off all functions;' >> $@
9f733652 59 @$(foreach i, $(DICTHEADERS:.h=), \
4ad8a4e9 60 attribute='+' ;\
61 cat $(srcdir)/$(i).cxx | grep -e $(i)::Streamer | grep TBuffer > /dev/null && attribute='-' ;\
62 echo "#pragma link C++ class "`echo $(i)| sed -e 's|.*/||'`"$$attribute;" >> $@ ;)
b521659f 63 @echo '#endif' >> $@