Include paths for Android cannot be prefixed with -I.  So define
INCLUDE_DIRS without the -I's, and add them only if doing a non-Android
build.

Also, define TOP for Android builds.

Note: This is in preparation for porting i965 to Android.
CC: Chia-I Wu <o...@lunarg.com>,
CC: Chih-Wei Huang <cwhu...@android-x86.org>
Signed-off-by: Chad Versace <c...@chad-versace.us>
---
 src/mesa/sources.mak |   20 ++++++++++++++------
 1 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/src/mesa/sources.mak b/src/mesa/sources.mak
index e45c99f..6800c47 100644
--- a/src/mesa/sources.mak
+++ b/src/mesa/sources.mak
@@ -1,5 +1,9 @@
 ### Lists of source files, included by Makefiles
 
+ifeq ($(MESA_PLATFORM), android)
+       TOP := $(MESA_TOP)
+endif
+
 # this is part of MAIN_SOURCES
 MAIN_ES_SOURCES := \
        main/api_exec_es1.c \
@@ -371,9 +375,13 @@ GLSL_LIBS := \
 ### Include directories
 
 INCLUDE_DIRS := \
-       -I$(TOP)/include \
-       -I$(TOP)/src/glsl \
-       -I$(TOP)/src/mesa \
-       -I$(TOP)/src/mapi \
-       -I$(TOP)/src/gallium/include \
-       -I$(TOP)/src/gallium/auxiliary
+       $(TOP)/include \
+       $(TOP)/src/glsl \
+       $(TOP)/src/mesa \
+       $(TOP)/src/mapi \
+       $(TOP)/src/gallium/include \
+       $(TOP)/src/gallium/auxiliary
+
+ifneq ($(MESA_PLATFORM), android)
+   INCLUDE_DIRS := $(addprefix -I, $(INCLUDE_DIRS))
+endif
-- 
1.7.6

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to