# $Id$ # Makefile template for the Alice HLT pendolino MODULE = HLTpendolino SUBDIRS = EXTRA_DIST = # library definition lib_LTLIBRARIES = libHLTpendolino.la # version info for the library LIBRARY_VERSION = "5:0:0" # MODDIR is set by the AliRoot build system and denotes the topdir # of the module, we must set it since the package definition libHLTpendolino.pkg # includes another common configuration file MODDIR = $(top_srcdir) PKGDEF = $(MODDIR)/libHLTpendolino.pkg include $(top_srcdir)/libHLTpendolino.pkg # compiler flags AM_CPPFLAGS = -DMODULE=$(MODULE) \ $(PACKCXXFLAGS) \ $(foreach i, $(EINCLUDE), \ $(shell echo $(i) | sed -e "/HLT\//!d" -e "s|HLT/|-I$(top_srcdir)/|")) \ $(foreach i, $(EINCLUDE), \ $(shell echo $(i) | sed -e "/HLT\//d" -e "s|^|-I$(ALICE_ROOT)/|")) # library sources libHLTpendolino_la_SOURCES = $(MODULE_SRCS) # library headers pkginclude_HEADERS = $(MODULE_HDRS) # linker flags libHLTpendolino_la_LDFLAGS = -L@ROOTLIBDIR@ \ @ROOTLIBS@ \ @ALIROOT_LDFLAGS@ \ @ALIROOT_LIBS@ \ -version-info $(LIBRARY_VERSION) # automatic generation of data and time of library build COMPILE_INFO = HLTpendolinoCompileInfo.cxx # files from SHUTTLE to be compiled into the pendolino library # the libSHUTTLE is not in the standard AliRoot build as it requires # external packages. However the two necessary classes can be compiled # independently of the SHUTTLE library. In the HLT build they are # included in the libHLTpendolino by linking to the AliRoot files. SHUTTLE_ADDON = AliDCSClient.h AliDCSMessage.h $(SHUTTLE_ADDON): test -e $@ || ln -s $(ALICE_ROOT)/SHUTTLE/DCSClient/$@ $(SHUTTLE_ADDON:.h=.cxx): $(SHUTTLE_ADDON) test -e $@ || ln -s $(ALICE_ROOT)/SHUTTLE/DCSClient/$@ # set the file name for the generated root dictionary DICTCPP = HLTpendolino-DICT.cxx nodist_libHLTpendolino_la_SOURCES = $(COMPILE_INFO) \ $(SHUTTLE_ADDON:.h=.cxx) \ $(DICTCPP) CLEANFILES = $(COMPILE_INFO) \ $(SHUTTLE_ADDON) \ $(SHUTTLE_ADDON:.h=.cxx) DICTAUTODEF = $(MODULE)-LinkDef.h DICTDEF = $(shell if test "x$(MODULE_DHDR)" = "x"; then echo $(DICTAUTODEF); else echo $(MODULE_DHDR); fi) DICTFILES = $(DICTCPP) $(DICTCPP:.cxx=.h) $(DICTAUTODEF) DICTHEADERS = $(CLASS_HDRS) CLEANFILES += $(DICTFILES) EXTRA_DIST += $(MODULE_DHDR) # the rootcint buffer for macros is limited to 1024 characters # we have to filter out some of the defines # The asterisk at the end is important even for defines which # are not wildcards. But otherwise the case does not pick them. 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* $(DICTCPP:.cxx=.h): $(DICTCPP) if test $@ ; then : ; else rm -f $< ; $(MAKE) $(MAKEFLAGS) $< ; fi $(DICTCPP): $(DICTHEADERS:%=$(srcdir)/%) $(SHUTTLE_ADDON) $(DICTDEF) if [ -x $(ROOTCINT) ]; then $(ROOTCINT) -f $@ -c $(CPPFLAGS) $(AM_CPPFLAGS) \ `for i in $(DEFS);do case $$i in $(foreach def, $(DEFFILTER), $(def) |) -DVERSION*);; *) echo -n " $$i";; esac; done` \ $(foreach i, $(DICTINCLUDE), $(i)) \ $^ ; fi $(DICTAUTODEF): Makefile.am $(PKGDEF) @echo '//automatically generated ROOT DICT definition' > $@ @echo '//!!! DO NOT EDIT THIS FILE !!!' >> $@ @echo '//add further class definitions to the CLASS_HDRS variable in Makefile.am' >> $@ @echo '#ifdef __CINT__' >> $@ @echo '#pragma link off all globals;' >> $@ @echo '#pragma link off all classes;' >> $@ @echo '#pragma link off all functions;' >> $@ @$(foreach i, $(DICTHEADERS:.h=), \ echo "#pragma link C++ class "`echo $(i)| sed -e 's|.*/||'`"+;" >> $@ ;) @$(foreach i, $(SHUTTLE_ADDON:.h=), \ echo "#pragma link C++ class "`echo $(i)| sed -e 's|.*/||'`"+;" >> $@ ;) @echo '#endif' >> $@ $(COMPILE_INFO): $(libHLTpendolino_la_SOURCES) $(pkginclude_HEADERS) $(noinst_HEADERS) Makefile.am @echo '//automatically generated compilation info' > $@ @echo '//!!! DO NOT EDIT THIS FILE !!!' >> $@ @echo '//add changes in Makefile.am' >> $@ @echo 'extern "C" void CompileInfo(const char*& date, const char*& time)' >> $@ @echo '{date=__DATE__; time=__TIME__; return;}' >> $@