Mesa (master): mapi: Fix Android build

Chad Versace chadversary at kemper.freedesktop.org
Wed Apr 11 04:07:54 UTC 2012


Module: Mesa
Branch: master
Commit: 5154b45217695e5daf24110bcff043fa1959d0a5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5154b45217695e5daf24110bcff043fa1959d0a5

Author: Chad Versace <chad.versace at linux.intel.com>
Date:   Tue Apr 10 15:36:07 2012 -0700

mapi: Fix Android build

The Android build was broken by
    commit ca760181b4420696c7e86aa2951d7203522ad1e8
    Author: Kristian Høgsberg <krh at bitplanet.net>
    Date:   Fri Mar 16 12:55:40 2012 -0400

    shared-glapi: Convert to automake

The offending change was that it redefined the filepaths in sources.mak
like this:
    - FOO_FILES := bar.c
    + FOO_FILES := $(TOP)/src/mapi/mapi/bar.c
This broke the build because source filepaths in Android makefiles must be
relative to the makefile.

Ideally, this could be fixed by reverting the change in sources.mak and
making shared-glapi's Makefile.am use $(addprefix $(TOP)/src/mapi/mapi,
$(FOO_FILES)). However, automake doesn't understand builtin GNU make
functions, such as addprefix. So, it seems that automake and Android can
no longer share sources.mak.

Fix the build by duplicating the source lists from sources.mak into
Android.mk.

Signed-off-by: Chad Versace <chad.versace at linux.intel.com>

---

 src/mapi/Android.mk |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/mapi/Android.mk b/src/mapi/Android.mk
index b75361f..d1749a2 100644
--- a/src/mapi/Android.mk
+++ b/src/mapi/Android.mk
@@ -25,9 +25,6 @@
 
 LOCAL_PATH := $(call my-dir)
 
-# get MAPI_GLAPI_FILES
-include $(LOCAL_PATH)/mapi/sources.mak
-
 mapi_abi_headers :=
 
 # ---------------------------------------
@@ -38,7 +35,13 @@ include $(CLEAR_VARS)
 
 abi_header := shared-glapi/glapi_mapi_tmp.h
 
-LOCAL_SRC_FILES := $(MAPI_GLAPI_FILES)
+LOCAL_SRC_FILES := \
+	mapi/entry.c \
+	mapi/mapi_glapi.c \
+	mapi/stub.c \
+	mapi/table.c \
+	mapi/u_current.c \
+	mapi/u_execmem.c
 
 LOCAL_CFLAGS := \
 	-DMAPI_MODE_GLAPI \




More information about the mesa-commit mailing list