]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
adding EMCAL library to HLT build system
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 26 Oct 2008 14:48:59 +0000 (14:48 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 26 Oct 2008 14:48:59 +0000 (14:48 +0000)
HLT/EMCAL/Makefile.am [new file with mode: 0644]
HLT/Makefile.am
HLT/configure.ac

diff --git a/HLT/EMCAL/Makefile.am b/HLT/EMCAL/Makefile.am
new file mode 100644 (file)
index 0000000..bb6d6e2
--- /dev/null
@@ -0,0 +1,66 @@
+# $Id$
+# Makefile template for the AliHLTEMCAL library.
+
+# be aware of the two different meanings of 'MODULE'
+# 1. AliRoot classifies each detector and main sub-package as a module
+#    so for all HLT library packages MODULE is equal HLT
+# 2. The HLT stand-alone build system knows about sub-modules
+#    e.g. for libAliHLTEMCAL, MODULE=AliHLTEMCAL
+MODULE                         = AliHLTEMCAL
+
+SUBDIRS                        = .
+
+EXTRA_DIST                     =
+
+# library definition
+lib_LTLIBRARIES                        =  libAliHLTEMCAL.la
+
+# version info for the library
+LIBRARY_VERSION                        = '0: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 libAliHLTEMCAL.pkg
+# includes another common configuration file
+MODDIR                         = $(top_srcdir)
+PKGDEF                         = $(MODDIR)/libAliHLTEMCAL.pkg
+include $(top_srcdir)/libAliHLTEMCAL.pkg
+
+# compiler flags
+AM_CPPFLAGS                    = -DMODULE=$(MODULE)         \
+                                 $(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
+libAliHLTEMCAL_la_SOURCES      = $(MODULE_SRCS)
+
+# library headers
+pkginclude_HEADERS             = $(MODULE_HDRS)
+
+# linker flags
+libAliHLTEMCAL_la_LDFLAGS      = -L@ROOTLIBDIR@ \
+                                 @ROOTLIBS@ \
+                                 @ALIROOT_LDFLAGS@ \
+                                 @ALIROOT_LIBS@ \
+                                 @ALIEMCAL_LIBS@ \
+                                 -version-info $(LIBRARY_VERSION)
+
+# automatic generation of data and time of library build
+COMPILE_INFO                   =  AliHLTEMCALCompileInfo.cxx
+
+# set the file name for the generated root dictionary
+DICTCPP                                =  AliHLTEMCAL-DICT.cxx
+nodist_libAliHLTEMCAL_la_SOURCES =  $(COMPILE_INFO) \
+                                  $(DICTCPP)
+
+CLEANFILES                     =  $(COMPILE_INFO)
+
+include $(top_srcdir)/make.dict
+
+$(COMPILE_INFO): $(libAliHLTEMCAL_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;}' >> $@
index 09c903debf81318c2e354c2bf0a86493e972a94a..870f4b5cda870d74f1856632ad5e61a0d0211777 100644 (file)
@@ -49,6 +49,10 @@ if EN_HLT_ITS
 ITS_DIR=ITS
 endif
 
+if EN_HLT_EMCAL
+EMCAL_DIR=EMCAL
+endif
+
 SUBDIRS                = BASE \
                          $(ALIROOT_DEP) \
                          $(RCU_DIR) \
@@ -61,6 +65,7 @@ SUBDIRS               = BASE \
                          $(COMP_DIR) \
                           $(TRIGGER_DIR) \
                           $(ITS_DIR) \
+                          $(EMCAL_DIR) \
                          doc
 
 EXTRA_DIST             = libHLTbase.pkg \
@@ -75,11 +80,13 @@ EXTRA_DIST          = libHLTbase.pkg \
                          libAliHLTPHOS.pkg \
                          libAliHLTTPC.pkg \
                          libAliHLTTRD.pkg \
+                         libAliHLTFMD.pkg \
                          libAliHLTMUON.pkg \
                          libAliHLTComp.pkg \
                          libAliHLTTrigger.pkg \
                          libAliHLTRCU.pkg \
                          libAliHLTITS.pkg \
+                         libAliHLTEMCAL.pkg \
                          exa/sample-component1.C \
                          exa/monitoring.C \
                          hlt.conf \
index 6cdd1ee9bc49062956cc9cbcefe076968b19e60b..40f54873dbfd068c15e782dedc44b68d94ba1515 100644 (file)
@@ -929,6 +929,36 @@ AC_MSG_CHECKING([whether to compile ITS library])
 AC_MSG_RESULT([$enable_module])
 AC_SUBST([ALIITS_LIBS])
 
+dnl ------------------------------------------------------------------
+AH_TEMPLATE([HLT_EMCAL],[hlt emcal library])
+
+ALIEMCAL_LIBS=
+CHECK_HLTMODULE([emcal],
+               [], [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/EMCAL],
+               [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
+               [-lEMCALrec -lEMCALsim -lEMCALbase], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], 
+               [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
+
+if test "x$enable_module" = "xmissheader"; then
+  enable_module="no...header.missing"
+  enable_emcal=$enable_module
+elif test "x$enable_module" = "xforce"; then
+  enable_emcal="yes"
+else
+  enable_emcal=$enable_module
+fi
+
+if test "x$enable_emcal" = "xyes" ; then 
+  AC_DEFINE(HLT_EMCAL)
+  ALIEMCAL_LIBS=$ALIHLTMODULE_LIBS
+else
+  enable_module=$enable_emcal
+fi
+AM_CONDITIONAL(EN_HLT_EMCAL, test x$enable_emcal = xyes)
+AC_MSG_CHECKING([whether to compile EMCAL library])
+AC_MSG_RESULT([$enable_module])
+AC_SUBST([ALIEMCAL_LIBS])
+
 dnl ------------------------------------------------------------------
 AH_TEMPLATE([HLT_COMP],[hlt comp library])
 
@@ -1146,6 +1176,11 @@ if test "x$enable_its" = "xyes"; then
   AC_CONFIG_FILES([ITS/Makefile])
 fi
 
+AC_MSG_NOTICE([compile EMCAL library: $enable_emcal])
+if test "x$enable_emcal" = "xyes"; then 
+  AC_CONFIG_FILES([EMCAL/Makefile])
+fi
+
 AC_MSG_NOTICE([compile trigger library: $enable_trigger])
 if test "x$enable_trigger" = "xyes"; then 
   AC_CONFIG_FILES([trigger/Makefile])