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