added framework for libAliHLTComp
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 29 Oct 2007 20:49:26 +0000 (20:49 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 29 Oct 2007 20:49:26 +0000 (20:49 +0000)
HLT/Makefile.am
HLT/comp/Makefile.am [new file with mode: 0644]
HLT/configure.ac
HLT/libAliHLTComp.pkg

index 31d9e26..0da7dfc 100644 (file)
@@ -22,6 +22,10 @@ if EN_HLT_MUON
 MUON_DIR=MUON
 endif
 
+if EN_HLT_COMP
+COMP_DIR=comp
+endif
+
 SUBDIRS                = BASE \
                          sim \
                          rec \
@@ -30,6 +34,7 @@ SUBDIRS               = BASE \
                          $(PHOS_DIR) \
                          $(TRD_DIR) \
                          $(MUON_DIR) \
+                         $(COMP_DIR) \
                          doc
 
 EXTRA_DIST             = libHLTbase.pkg \
@@ -43,6 +48,7 @@ EXTRA_DIST            = libHLTbase.pkg \
                          libAliHLTTPC.pkg \
                          libAliHLTTRD.pkg \
                          libAliHLTMUON.pkg \
+                         libAliHLTComp.pkg \
                          hlt.conf
 
 DIST_SUBDIRS           = $(SUBDIRS)
diff --git a/HLT/comp/Makefile.am b/HLT/comp/Makefile.am
new file mode 100644 (file)
index 0000000..b5df500
--- /dev/null
@@ -0,0 +1,61 @@
+# $Id$
+# Makefile template for the Alice HLT reconstruction framework
+
+MODULE                         = AliHLTComp
+
+SUBDIRS                        = 
+
+EXTRA_DIST                     = 
+
+# library definition
+lib_LTLIBRARIES                        = libAliHLTComp.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 libAliHLTComp.pkg
+# includes another common configuration file
+MODDIR                         = $(top_srcdir)
+PKGDEF                         = $(MODDIR)/libAliHLTComp.pkg
+include $(top_srcdir)/libAliHLTComp.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
+libAliHLTComp_la_SOURCES       = $(MODULE_SRCS)
+
+# library headers
+pkginclude_HEADERS             = $(MODULE_HDRS)
+
+# linker flags
+libAliHLTComp_la_LDFLAGS       = -L@ROOTLIBDIR@ \
+                                 @ROOTLIBS@ \
+                                 @ALIROOT_LDFLAGS@ \
+                                 @ALIROOT_LIBS@ \
+                                 @ALICOMP_LIBS@ \
+                                 -version-info $(LIBRARY_VERSION)
+
+# automatic generation of data and time of library build
+COMPILE_INFO                   =  AliHLTCompCompileInfo.cxx
+
+# set the file name for the generated root dictionary
+DICTCPP                                =  AliHLTComp-DICT.cxx
+nodist_libAliHLTComp_la_SOURCES        =  $(COMPILE_INFO) \
+                                  $(DICTCPP)
+
+CLEANFILES                     =  $(COMPILE_INFO)
+
+include $(top_srcdir)/make.dict
+
+$(COMPILE_INFO): $(libAliHLTComp_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( char*& date, char*& time)' >> $@
+       @echo '{date=__DATE__; time=__TIME__; return;}' >> $@
index d0fa92a..7326115 100644 (file)
@@ -616,7 +616,7 @@ dnl ------------------------------------------------------------------
 AH_TEMPLATE([HLT_MUON],[hlt dimuon library])
 
 ALIMUON_LIBS=
-CHECK_HLTMODULE([muon],
+CHECK_HLTMODULE([dimuon],
                [AliMUONVCluster.h], [$ALIROOT_CPPFLAGS -I$ALICE_ROOT/MUON],
                [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
                [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], 
@@ -638,6 +638,31 @@ AC_MSG_RESULT([$enable_muon])
 AC_SUBST([ALIMUON_LIBS])
 
 dnl ------------------------------------------------------------------
+AH_TEMPLATE([HLT_COMP],[hlt comp library])
+
+ALICOMP_LIBS=
+CHECK_HLTMODULE([comp],
+               [], [$ALIROOT_CPPFLAGS],
+               [], [-L$ROOTLIBDIR], [$ROOTLIBS $ADD_ROOTLIBS],
+               [], [-L$ROOTLIBDIR $ALIROOT_LDFLAGS], 
+               [$ROOTLIBS $ADD_ROOTLIBS $ALIROOT_LIBS])
+
+if test "x$enable_module" = "xmissheader"; then
+  enable_comp="no...header.missing"
+else
+  enable_comp=$enable_module
+fi
+
+if test "x$enable_comp" = "xyes" ; then 
+  AC_DEFINE(HLT_COMP)
+  ALICOMP_LIBS=$ALIHLTMODULE_LIBS
+fi
+AM_CONDITIONAL(EN_HLT_COMP, test x$enable_comp = xyes)
+AC_MSG_CHECKING([whether to compile comp library])
+AC_MSG_RESULT([$enable_comp])
+AC_SUBST([ALICOMP_LIBS])
+
+dnl ------------------------------------------------------------------
 AC_MSG_CHECKING([whether to disable AliRoot logging])
 AH_TEMPLATE([NOALIROOT_LOGGING],[disable AliRoot logging])
 AC_ARG_ENABLE(aliroot-logging,
@@ -743,6 +768,7 @@ AC_CONFIG_FILES([Makefile
                 PHOS/Makefile
                 TRD/Makefile
                 MUON/Makefile
+                comp/Makefile
                 doc/Makefile
                 doc/doxygen.conf])
 
index a8917fb..7e0d3ba 100644 (file)
@@ -1,22 +1,26 @@
 #-*- Mode: Makefile -*-
 # $Id$
 
-include HLT/hlt.conf
+include $(MODDIR)/hlt.conf
 
-MODULE_SRCS:=
+CLASS_HDRS:=   
 
-CLASS_HDRS:=   $(MODULE_SRCS:.cxx=.h)
+MODULE_SRCS:=  $(CLASS_HDRS:.h=.cxx)
 
 MODULE_HDRS:=  $(CLASS_HDRS)
 
 MODULE_DHDR:=          
 
-SRCS:=$(patsubst %,rec/%,$(MODULE_SRCS))
-CINTHDRS:=$(patsubst %,rec/%,$(CLASS_HDRS))
-HDRS:=$(patsubst %,rec/%,$(MODULE_HDRS))
-#DHDR:=
-DHDR:=$(patsubst %,rec/%,$(MODULE_DHDR))
-#CINTAUTOLINK:= 1
+EINCLUDE := HLT/BASE
+
+###############################################################################
+#
+# do not change anything below this line
+#
+SRCS:=$(patsubst %,comp/%,$(MODULE_SRCS))
+CINTHDRS:=$(patsubst %,comp/%,$(CLASS_HDRS))
+HDRS:=$(patsubst %,comp/%,$(MODULE_HDRS))
+DHDR:=$(patsubst %,comp/%,$(MODULE_DHDR))
 CINTAUTOLINK:= $(shell test "x$(MODULE_DHDR)" = "x" &&! echo 1)
 
 EDEFINE      := ${HLTDEFS}
@@ -24,4 +28,3 @@ PACKCXXFLAGS := ${HLTCXXFLAGS}
 PACKCFLAGS   := ${HLTCLFAGS}
 PACKDCXXFLAGS:= ${HLTDCXXFLAGS}
 
-EINCLUDE = HLT/BASE