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