2 # Makefile template for the Alice HLT pendolino
11 lib_LTLIBRARIES = libHLTpendolino.la
13 # version info for the library
14 LIBRARY_VERSION = "5:0:0"
16 # MODDIR is set by the AliRoot build system and denotes the topdir
17 # of the module, we must set it since the package definition libHLTpendolino.pkg
18 # includes another common configuration file
19 MODDIR = $(top_srcdir)
20 PKGDEF = $(MODDIR)/libHLTpendolino.pkg
21 include $(top_srcdir)/libHLTpendolino.pkg
24 AM_CPPFLAGS = -DMODULE=$(MODULE) \
26 $(foreach i, $(EINCLUDE), \
27 $(shell echo $(i) | sed -e "/HLT\//!d" -e "s|HLT/|-I$(top_srcdir)/|")) \
28 $(foreach i, $(EINCLUDE), \
29 $(shell echo $(i) | sed -e "/HLT\//d" -e "s|^|-I$(ALICE_ROOT)/|"))
31 libHLTpendolino_la_SOURCES = $(MODULE_SRCS)
34 pkginclude_HEADERS = $(MODULE_HDRS)
37 libHLTpendolino_la_LDFLAGS = -L@ROOTLIBDIR@ \
41 -version-info $(LIBRARY_VERSION)
43 # automatic generation of data and time of library build
44 COMPILE_INFO = HLTpendolinoCompileInfo.cxx
46 # files from SHUTTLE to be compiled into the pendolino library
47 # the libSHUTTLE is not in the standard AliRoot build as it requires
48 # external packages. However the two necessary classes can be compiled
49 # independently of the SHUTTLE library. In the HLT build they are
50 # included in the libHLTpendolino by linking to the AliRoot files.
51 SHUTTLE_ADDON = AliDCSClient.h AliDCSMessage.h
54 ln -s $(ALICE_ROOT)/SHUTTLE/DCSClient/$@
56 $(SHUTTLE_ADDON:.h=.cxx): $($@:.cxx=.h)
57 ln -s $(ALICE_ROOT)/SHUTTLE/DCSClient/$@
59 # set the file name for the generated root dictionary
60 DICTCPP = HLTpendolino-DICT.cxx
61 nodist_libHLTpendolino_la_SOURCES = $(COMPILE_INFO) \
62 $(SHUTTLE_ADDON:.h=.cxx) \
65 CLEANFILES = $(COMPILE_INFO) \
67 $(SHUTTLE_ADDON:.h=.cxx)
69 DICTAUTODEF = $(MODULE)-LinkDef.h
70 DICTDEF = $(shell if test "x$(MODULE_DHDR)" = "x"; then echo $(DICTAUTODEF); else echo $(MODULE_DHDR); fi)
71 DICTFILES = $(DICTCPP) $(DICTCPP:.cxx=.h) $(DICTAUTODEF)
72 DICTHEADERS = $(CLASS_HDRS)
74 CLEANFILES += $(DICTFILES)
76 EXTRA_DIST += $(MODULE_DHDR)
78 # the rootcint buffer for macros is limited to 1024 characters
79 # we have to filter out some of the defines
80 # The asterisk at the end is important even for defines which
81 # are not wildcards. But otherwise the case does not pick them.
82 DEFFILTER = -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*
84 $(DICTCPP:.cxx=.h): $(DICTCPP)
85 if test $@ ; then : ; else rm -f $< ; $(MAKE) $(MAKEFLAGS) $< ; fi
87 $(DICTCPP): $(DICTHEADERS:%=$(srcdir)/%) $(SHUTTLE_ADDON) $(DICTDEF)
88 if [ -x $(ROOTCINT) ]; then $(ROOTCINT) -f $@ -c $(CPPFLAGS) $(AM_CPPFLAGS) \
89 `for i in $(DEFS);do case $$i in $(foreach def, $(DEFFILTER), $(def) |) -DVERSION*);; *) echo -n " $$i";; esac; done` \
90 $(foreach i, $(DICTINCLUDE), $(i)) \
93 $(DICTAUTODEF): Makefile.am $(PKGDEF)
94 @echo '//automatically generated ROOT DICT definition' > $@
95 @echo '//!!! DO NOT EDIT THIS FILE !!!' >> $@
96 @echo '//add further class definitions to the CLASS_HDRS variable in Makefile.am' >> $@
97 @echo '#ifdef __CINT__' >> $@
98 @echo '#pragma link off all globals;' >> $@
99 @echo '#pragma link off all classes;' >> $@
100 @echo '#pragma link off all functions;' >> $@
101 @$(foreach i, $(DICTHEADERS:.h=), \
102 echo "#pragma link C++ class "`echo $(i)| sed -e 's|.*/||'`"+;" >> $@ ;)
103 @$(foreach i, $(SHUTTLE_ADDON:.h=), \
104 echo "#pragma link C++ class "`echo $(i)| sed -e 's|.*/||'`"+;" >> $@ ;)
107 $(COMPILE_INFO): $(libHLTpendolino_la_SOURCES) $(pkginclude_HEADERS) $(noinst_HEADERS) Makefile.am
108 @echo '//automatically generated compilation info' > $@
109 @echo '//!!! DO NOT EDIT THIS FILE !!!' >> $@
110 @echo '//add changes in Makefile.am' >> $@
111 @echo 'extern "C" void CompileInfo(const char*& date, const char*& time)' >> $@
112 @echo '{date=__DATE__; time=__TIME__; return;}' >> $@