including the two classes AliDCSClient and AliDCSMessage from the SHUTTLE module...
[u/mrichter/AliRoot.git] / HLT / pendolino / Makefile.am
CommitLineData
ff4edcee 1# $Id$
2# Makefile template for the Alice HLT pendolino
3
4MODULE = HLTpendolino
5
6SUBDIRS =
7
8EXTRA_DIST =
9
10# library definition
11lib_LTLIBRARIES = libHLTpendolino.la
12
13# version info for the library
4014a91f 14LIBRARY_VERSION = "5:0:0"
ff4edcee 15
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
19MODDIR = $(top_srcdir)
20PKGDEF = $(MODDIR)/libHLTpendolino.pkg
21include $(top_srcdir)/libHLTpendolino.pkg
22
23# compiler flags
24AM_CPPFLAGS = -DMODULE=$(MODULE) \
25 $(PACKCXXFLAGS) \
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)/|"))
30# library sources
31libHLTpendolino_la_SOURCES = $(MODULE_SRCS)
32
33# library headers
34pkginclude_HEADERS = $(MODULE_HDRS)
35
36# linker flags
37libHLTpendolino_la_LDFLAGS = -L@ROOTLIBDIR@ \
38 @ROOTLIBS@ \
39 @ALIROOT_LDFLAGS@ \
40 @ALIROOT_LIBS@ \
41 -version-info $(LIBRARY_VERSION)
42
43# automatic generation of data and time of library build
44COMPILE_INFO = HLTpendolinoCompileInfo.cxx
45
4014a91f 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.
51SHUTTLE_ADDON = AliDCSClient.h AliDCSMessage.h
52
53$(SHUTTLE_ADDON):
54 ln -s $(ALICE_ROOT)/SHUTTLE/DCSClient/$@
55
56$(SHUTTLE_ADDON:.h=.cxx): $($@:.cxx=.h)
57 ln -s $(ALICE_ROOT)/SHUTTLE/DCSClient/$@
58
ff4edcee 59# set the file name for the generated root dictionary
60DICTCPP = HLTpendolino-DICT.cxx
61nodist_libHLTpendolino_la_SOURCES = $(COMPILE_INFO) \
4014a91f 62 $(SHUTTLE_ADDON:.h=.cxx) \
ff4edcee 63 $(DICTCPP)
64
4014a91f 65CLEANFILES = $(COMPILE_INFO) \
66 $(SHUTTLE_ADDON) \
67 $(SHUTTLE_ADDON:.h=.cxx)
68
69DICTAUTODEF = $(MODULE)-LinkDef.h
70DICTDEF = $(shell if test "x$(MODULE_DHDR)" = "x"; then echo $(DICTAUTODEF); else echo $(MODULE_DHDR); fi)
71DICTFILES = $(DICTCPP) $(DICTCPP:.cxx=.h) $(DICTAUTODEF)
72DICTHEADERS = $(CLASS_HDRS)
73
74CLEANFILES += $(DICTFILES)
ff4edcee 75
4014a91f 76EXTRA_DIST += $(MODULE_DHDR)
77
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.
82DEFFILTER = -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*
83
84$(DICTCPP:.cxx=.h): $(DICTCPP)
85 if test $@ ; then : ; else rm -f $< ; $(MAKE) $(MAKEFLAGS) $< ; fi
86
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)) \
91 $^ ; fi
92
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|.*/||'`"+;" >> $@ ;)
105 @echo '#endif' >> $@
ff4edcee 106
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' >> $@
179be78e 111 @echo 'extern "C" void CompileInfo(const char*& date, const char*& time)' >> $@
ff4edcee 112 @echo '{date=__DATE__; time=__TIME__; return;}' >> $@