enhanced HLT build system: EINCLUDE from pkg definition determines include paths
[u/mrichter/AliRoot.git] / HLT / BASE / Makefile.am
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)