mapi: Inline glapi/Makefile.
authorMatt Turner <mattst88@gmail.com>
Thu, 14 Aug 2014 20:58:04 +0000 (13:58 -0700)
committerMatt Turner <mattst88@gmail.com>
Tue, 19 Aug 2014 01:25:52 +0000 (18:25 -0700)
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
configure.ac
src/mapi/Makefile.am
src/mapi/glapi/Makefile.am [deleted file]
src/mapi/glapi/Makefile.sources

index d94cc6f89394037b3c3a1c39664e57327d136cf9..4635dffd0dfd0e97049735001925d239b5ba911d 100644 (file)
@@ -2238,7 +2238,6 @@ AC_CONFIG_FILES([Makefile
                src/mapi/Makefile
                src/mapi/es1api/glesv1_cm.pc
                src/mapi/es2api/glesv2.pc
-               src/mapi/glapi/Makefile
                src/mapi/glapi/gen/Makefile
                src/mapi/glapi/tests/Makefile
                src/mapi/shared-glapi/tests/Makefile
index d1f525abda5ee923ab43e88973fac8f1fcb69a88..4f1e2264f929b47d1a17f9a3bed9a20ae1799678 100644 (file)
@@ -41,6 +41,7 @@ AM_CPPFLAGS =                                                 \
 
 GLAPI = $(top_srcdir)/src/mapi/glapi
 include Makefile.sources
+include glapi/Makefile.sources
 include glapi/gen/glapi_gen.mk
 
 if HAVE_SHARED_GLAPI
@@ -67,7 +68,40 @@ shared-glapi/glapi_mapi_tmp.h : $(GLAPI)/gen/gl_and_es_API.xml $(glapi_gen_mapi_
 endif
 
 if HAVE_OPENGL
-SUBDIRS += glapi
+SUBDIRS += glapi/tests
+
+noinst_LTLIBRARIES = glapi/libglapi.la
+
+if HAVE_X86_ASM
+if HAVE_X86_64_ASM
+GLAPI_ASM_SOURCES = $(X86_64_API)
+else
+GLAPI_ASM_SOURCES = $(X86_API)
+endif
+endif
+if HAVE_SPARC_ASM
+GLAPI_ASM_SOURCES = $(SPARC_API)
+endif
+
+glapi_libglapi_la_SOURCES = $(GLAPI_UTIL_SOURCES)
+glapi_libglapi_la_CPPFLAGS = \
+       $(AM_CPPFLAGS) \
+       -I$(top_srcdir)/src/mapi/glapi \
+       -I$(top_srcdir)/src/mesa
+
+if HAVE_SHARED_GLAPI
+glapi_libglapi_la_SOURCES += $(MAPI_BRIDGE_FILES)
+glapi_libglapi_la_CPPFLAGS += \
+       -DMAPI_MODE_BRIDGE \
+       -DMAPI_ABI_HEADER=\"glapi/glapi_mapi_tmp.h\"
+else
+glapi_libglapi_la_CPPFLAGS += \
+       -DMAPI_MODE_UTIL
+glapi_libglapi_la_SOURCES += \
+       $(GLAPI_SOURCES) \
+       $(GLAPI_ASM_SOURCES) \
+       $(MAPI_UTIL_FILES)
+endif
 endif
 
 if HAVE_OPENGL_ES1
diff --git a/src/mapi/glapi/Makefile.am b/src/mapi/glapi/Makefile.am
deleted file mode 100644 (file)
index cadcd69..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-# Copyright © 2012 Jon TURNEY
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-# IN THE SOFTWARE.
-
-SUBDIRS = . tests
-
-TOP = $(top_srcdir)
-include Makefile.sources
-include ../Makefile.sources
-
-AM_CPPFLAGS = \
-        $(DEFINES) \
-        $(SELINUX_CFLAGS) \
-       -I$(top_srcdir)/include \
-       -I$(top_srcdir)/src/mapi \
-        -I$(top_builddir)/src/mapi \
-       -I$(top_srcdir)/src/mesa
-
-if HAVE_X86_ASM
-if HAVE_X86_64_ASM
-GLAPI_ASM_SOURCES = $(X86_64_API)
-else
-GLAPI_ASM_SOURCES = $(X86_API)
-endif
-endif
-if HAVE_SPARC_ASM
-GLAPI_ASM_SOURCES = $(SPARC_API)
-endif
-
-if HAVE_SHARED_GLAPI
-AM_CPPFLAGS += \
-       -DMAPI_MODE_BRIDGE \
-       -DMAPI_ABI_HEADER=\"glapi/glapi_mapi_tmp.h\"
-glapi_GLAPI_sources = $(GLAPI_UTIL_SOURCES)
-glapi_ASM_sources =
-glapi_MAPI_sources = $(MAPI_BRIDGE_FILES)
-else
-AM_CPPFLAGS += \
-       -DMAPI_MODE_UTIL
-glapi_GLAPI_sources = $(GLAPI_SOURCES) $(GLAPI_UTIL_SOURCES)
-glapi_ASM_sources = $(GLAPI_ASM_SOURCES)
-glapi_MAPI_sources = $(MAPI_UTIL_FILES)
-endif
-
-noinst_LTLIBRARIES = libglapi.la
-
-libglapi_la_SOURCES = $(glapi_GLAPI_sources) $(glapi_ASM_sources) $(glapi_MAPI_sources)
index aae41a88d9bbc81ed7e7914d203b60e6ddc514d8..df149a7d82bf64fde34586c3251090f708b8ab8a 100644 (file)
@@ -1,22 +1,22 @@
 # src/mapi/glapi/Makefile.sources
 
 GLAPI_UTIL_SOURCES = \
-       glapi_gentable.c
+       $(top_builddir)/src/mapi/glapi/glapi_gentable.c
 
 GLAPI_SOURCES = \
-       glapi_dispatch.c \
-       glapi_entrypoint.c \
-       glapi_getproc.c \
-       glapi_nop.c \
-       glapi.c \
-       glapi.h \
-       glapi_priv.h
+       $(top_srcdir)/src/mapi/glapi/glapi_dispatch.c \
+       $(top_srcdir)/src/mapi/glapi/glapi_entrypoint.c \
+       $(top_srcdir)/src/mapi/glapi/glapi_getproc.c \
+       $(top_srcdir)/src/mapi/glapi/glapi_nop.c \
+       $(top_srcdir)/src/mapi/glapi/glapi.c \
+       $(top_srcdir)/src/mapi/glapi/glapi.h \
+       $(top_srcdir)/src/mapi/glapi/glapi_priv.h
 
 X86_API =                      \
-       glapi_x86.S
+       $(top_builddir)/src/mapi/glapi/glapi_x86.S
 
 X86_64_API =                   \
-       glapi_x86-64.S
+       $(top_builddir)/src/mapi/glapi/glapi_x86-64.S
 
 SPARC_API =                    \
-       glapi_sparc.S
+       $(top_builddir)/src/mapi/glapi/glapi_sparc.S