]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/pendolino/Makefile.am
bab39d29a5070b6459aa0713a98e4a34701fe447
[u/mrichter/AliRoot.git] / HLT / pendolino / Makefile.am
1 # $Id$
2 # Makefile template for the Alice HLT pendolino
3
4 MODULE                          = HLTpendolino
5
6 SUBDIRS                         = 
7
8 EXTRA_DIST                      = 
9
10 # library definition
11 lib_LTLIBRARIES                 =  libHLTpendolino.la
12
13 # version info for the library
14 LIBRARY_VERSION                 = "5:0:0"
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
19 MODDIR                          = $(top_srcdir)
20 PKGDEF                          = $(MODDIR)/libHLTpendolino.pkg
21 include $(top_srcdir)/libHLTpendolino.pkg
22
23 # compiler flags
24 AM_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
31 libHLTpendolino_la_SOURCES      = $(MODULE_SRCS)
32
33 # library headers
34 pkginclude_HEADERS              = $(MODULE_HDRS)
35
36 # linker flags
37 libHLTpendolino_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
44 COMPILE_INFO                    =  HLTpendolinoCompileInfo.cxx
45
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
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
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) \
63                                    $(DICTCPP)
64
65 CLEANFILES                      =  $(COMPILE_INFO) \
66                                    $(SHUTTLE_ADDON) \
67                                    $(SHUTTLE_ADDON:.h=.cxx)
68
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)
73
74 CLEANFILES                      += $(DICTFILES)
75
76 EXTRA_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.
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*
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' >> $@
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' >> $@
111         @echo 'extern "C" void CompileInfo(const char*& date, const char*& time)' >> $@
112         @echo '{date=__DATE__; time=__TIME__; return;}' >> $@