[Mesa-dev] [PATCH 1/4] mapi: use a path prefix for sources variable
nobled
nobled at dreamwidth.org
Thu Jul 19 15:40:06 PDT 2012
This makes it possible to share sources.mak with the
Android build again.
v2: Keep $(TOP) variable that is actually used by an
included Makefile.
---
src/mapi/glapi/Makefile.am | 5 +++--
src/mapi/mapi/sources.mak | 25 ++++++++++++++-----------
src/mapi/shared-glapi/Makefile.am | 7 +++++--
3 files changed, 22 insertions(+), 15 deletions(-)
diff --git a/src/mapi/glapi/Makefile.am b/src/mapi/glapi/Makefile.am
index 668d7fa..b6c4345 100644
--- a/src/mapi/glapi/Makefile.am
+++ b/src/mapi/glapi/Makefile.am
@@ -19,9 +19,10 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
-TOP = $(top_srcdir)
include sources.mak
-include ../mapi/sources.mak
+
+MAPI = $(srcdir)/../mapi
+include $(MAPI)/sources.mak
AM_CPPFLAGS = \
$(DEFINES) \
diff --git a/src/mapi/mapi/sources.mak b/src/mapi/mapi/sources.mak
index 56f4afd..6c15170 100644
--- a/src/mapi/mapi/sources.mak
+++ b/src/mapi/mapi/sources.mak
@@ -13,24 +13,27 @@
#
# - In bridge mode, mapi provides entry points calling into glapi. To use
# this mode, compile MAPI_BRIDGE_FILES with MAPI_MODE_BRIDGE defined.
+#
+# The variable $(MAPI) must be defined to point to this source directory
+# before the following variables can be used.
MAPI_UTIL_FILES = \
- $(TOP)/src/mapi/mapi/u_current.c \
- $(TOP)/src/mapi/mapi/u_execmem.c
+ $(MAPI)/u_current.c \
+ $(MAPI)/u_execmem.c
MAPI_FILES = \
- $(TOP)/src/mapi/mapi/entry.c \
- $(TOP)/src/mapi/mapi/mapi.c \
- $(TOP)/src/mapi/mapi/stub.c \
- $(TOP)/src/mapi/mapi/table.c \
+ $(MAPI)/entry.c \
+ $(MAPI)/mapi.c \
+ $(MAPI)/stub.c \
+ $(MAPI)/table.c \
$(MAPI_UTIL_FILES)
MAPI_GLAPI_FILES = \
- $(TOP)/src/mapi/mapi/entry.c \
- $(TOP)/src/mapi/mapi/mapi_glapi.c \
- $(TOP)/src/mapi/mapi/stub.c \
- $(TOP)/src/mapi/mapi/table.c \
+ $(MAPI)/entry.c \
+ $(MAPI)/mapi_glapi.c \
+ $(MAPI)/stub.c \
+ $(MAPI)/table.c \
$(MAPI_UTIL_FILES)
MAPI_BRIDGE_FILES = \
- $(TOP)/src/mapi/mapi/entry.c
+ $(MAPI)/entry.c
diff --git a/src/mapi/shared-glapi/Makefile.am
b/src/mapi/shared-glapi/Makefile.am
index 9485683..de958f6 100644
--- a/src/mapi/shared-glapi/Makefile.am
+++ b/src/mapi/shared-glapi/Makefile.am
@@ -1,13 +1,16 @@
# Used by OpenGL ES or when --enable-shared-glapi is specified
-TOP = $(top_srcdir)
GLAPI = $(top_srcdir)/src/mapi/glapi
-include $(top_srcdir)/src/mapi/mapi/sources.mak
+MAPI = $(top_srcdir)/src/mapi/mapi
+
+include $(MAPI)/sources.mak
lib_LTLIBRARIES = libglapi.la
libglapi_la_SOURCES = $(MAPI_GLAPI_FILES)
libglapi_la_LDFLAGS = -no-undefined
+# FIXME: eliminate the use of $(TOP)
+TOP = $(top_srcdir)
include $(GLAPI)/gen/glapi_gen.mk
glapi_mapi_tmp.h : $(GLAPI)/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
$(call glapi_gen_mapi,$<,shared-glapi)
--
1.7.9.5
More information about the mesa-dev
mailing list