]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
enhanced HLT build system: EINCLUDE from pkg definition determines include paths
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 19 Oct 2007 13:07:11 +0000 (13:07 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 19 Oct 2007 13:07:11 +0000 (13:07 +0000)
HLT/BASE/Makefile.am
HLT/BASE/util/Makefile.am
HLT/MUON/Makefile.am
HLT/SampleLib/Makefile.am
HLT/TPCLib/Makefile.am
HLT/libAliHLTTPC.pkg

index e7b1d853903b5918f9d66a1b8eaa33df14986961..2a560c1cd5d12933931ece0224430a516874e3bf 100644 (file)
@@ -16,8 +16,6 @@ SUBDIRS                       = . $(UTIL_DIR) interface HOMER
 
 EXTRA_DIST                     = 
 
-AM_CPPFLAGS                    = -DMODULE=$(MODULE)
-
 bin_SCRIPTS                    = setenv.sh setenv.csh
 
 # library definition
@@ -33,6 +31,13 @@ MODDIR                               = $(top_srcdir)
 PKGDEF                         = $(MODDIR)/libHLTbase.pkg
 include $(top_srcdir)/libHLTbase.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
 libHLTbase_la_SOURCES          = $(MODULE_SRCS)
 
index 733b671c9166d5ae8edb54270f77e30ae20f6d6c..10a4130b191ce1b23d2defcb8d831d441f70dd0e 100644 (file)
@@ -10,10 +10,6 @@ MODULE                               = AliHLTUtil
 
 EXTRA_DIST                     =
 
-AM_CPPFLAGS                    = @ALIROOT_CPPFLAGS@         \
-                                 -DMODULE=$(MODULE)         \
-                                 -I$(top_srcdir)/BASE
-
 # library definition
 lib_LTLIBRARIES                        =  libAliHLTUtil.la
 
@@ -27,6 +23,13 @@ MODDIR                               = $(top_srcdir)
 PKGDEF                         = $(MODDIR)/libAliHLTUtil.pkg
 include $(top_srcdir)/libAliHLTUtil.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
 libAliHLTUtil_la_SOURCES       = $(MODULE_SRCS)
 
index 4463a47dab59e49b7b5829156ee44ea624137822..a44d7a386f2baa6b4bbfd0b0dbe86d8a184502e8 100644 (file)
@@ -22,16 +22,12 @@ libAliHLTMUON_la_SOURCES    =  $(MODULE_SRCS)
 noinst_HEADERS                 =  $(MODULE_HDRS)
 
 # compilation flags of the library
-AM_CPPFLAGS                    = @HLTBASE_CPPFLAGS@ \
-                                 @ALIROOT_CPPFLAGS@ \
+AM_CPPFLAGS                    = -DMODULE=$(MODULE) \
                                  @ROOTCFLAGS@ \
-                                 -I$(top_srcdir)/BASE \
-                                 -I$(top_srcdir)/MUON \
-                                 -I$(top_srcdir)/MUON/OnlineAnalysis \
-                                 -I$(top_srcdir)/MUON/OfflineInterface \
-                                 -I$(ALICE_ROOT)/MUON \
-                                 -I$(ALICE_ROOT)/STEER \
-                                 -I$(ALICE_ROOT)/RAW
+                                 $(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)/|"))
 
 # linking flags of the library
 libAliHLTMUON_la_LDFLAGS       = -L@ROOTLIBDIR@ \
index f297e5de4f674a87701fb4502700bbc6a1a23bed..7851e35d26af3c0fa15275badb62ca723b5e2148 100644 (file)
@@ -16,6 +16,7 @@ MODDIR                                = $(top_srcdir)
 PKGDEF                         = $(MODDIR)/libAliHLTSample.pkg
 include $(top_srcdir)/libAliHLTSample.pkg
 
+
 # library definition
 # The lib_LTLIBRARIES variable is a fixed variable of the autotools build
 # system. All libraries defined by the Makefile template have to be added
@@ -55,11 +56,19 @@ noinst_HEADERS                      =  $(MODULE_HDRS)
 
 # compilation flags of the library
 # This is the place to add further include directories if you are
-# using external modules. The AliRoot, ROOT and HLT base directories
+# using external modules. The AliRoot/STEER and ROOT directories
 # are the default include directories.
-AM_CPPFLAGS                    = @HLTBASE_CPPFLAGS@ \
+# Include paths within the HLT modules are automatically taken from the
+# EINCLUDE variable of the pkg definition
+# other AliRoot dependencies might need to added
+AM_CPPFLAGS                    = -DMODULE=$(MODULE) \
+                                 @HLTBASE_CPPFLAGS@ \
                                  @ALIROOT_CPPFLAGS@ \
-                                 @ROOTCFLAGS@
+                                 @ROOTCFLAGS@ \
+                                 $(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)/|"))
 
 # linking flags of the library
 # This is the place to add further libraries if you are
index cbc8cb64e7409e58b533ca316f109f80ddce1d1c..1f523787cff09d7442da33b29811dbf000b70aa8 100644 (file)
@@ -5,12 +5,6 @@ MODULE                                 = AliHLTTPC
 
 EXTRA_DIST                     = 
 
-AM_CPPFLAGS                    = @ALIROOT_CPPFLAGS@         \
-                                 -I$(srcdir)                \
-                                 -I$(srcdir)/tracking       \
-                                 -I$(top_srcdir)/BASE       \
-                                 -I$(top_srcdir)/BASE/util
-
 # generation of the TPC Pad mapping tables for the 
 # AliHLTTPCDigitReaderRaw reader
 if USE_TPC_MAPPING
@@ -38,6 +32,13 @@ MODDIR                               = $(top_srcdir)
 PKGDEF                         = $(MODDIR)/libAliHLTTPC.pkg
 include $(top_srcdir)/libAliHLTTPC.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
 libAliHLTTPC_la_SOURCES                = $(MODULE_SRCS)
 
index 656a2cf1eab130721f8671b91206becf1072ce24..98a4dac0e990704a946ea06b1a19ce9f9e72dcab 100644 (file)
@@ -137,4 +137,4 @@ PACKCXXFLAGS := ${HLTCXXFLAGS}
 PACKCFLAGS   := ${HLTCLFAGS}
 PACKDCXXFLAGS:= ${HLTDCXXFLAGS}
 
-EINCLUDE := HLT/TPCLib HLT/TPCLib/tracking HLT/BASE HLT/BASE/util TPC RAW
+EINCLUDE := HLT/TPCLib HLT/TPCLib/tracking HLT/BASE HLT/BASE/util TPC RAW STEER