Revert "configure: allow building with python3"
[mesa.git] / src / mapi / Makefile.am
index 46afe3bae60859ac871e5da4704eae5c5e1ba4ed..3da1a193d284a68af528817233be637093997163 100644 (file)
@@ -36,7 +36,12 @@ EXTRA_DIST = \
        mapi_abi.py \
        glapi/SConscript \
        glapi/registry/gl.xml \
-       shared-glapi/SConscript
+       shared-glapi/SConscript \
+       es1api/meson.build \
+       es2api/meson.build \
+       glapi/meson.build \
+       shared-glapi/meson.build \
+       meson.build
 
 AM_CFLAGS = \
        $(PTHREAD_CFLAGS) \
@@ -46,8 +51,10 @@ AM_CPPFLAGS =                                                        \
        $(SELINUX_CFLAGS)                                       \
        -I$(top_srcdir)/include                                 \
        -I$(top_srcdir)/src                                     \
+       -I$(top_builddir)/src/mapi                              \
        -I$(top_srcdir)/src/mapi                                \
-       -I$(top_builddir)/src/mapi
+       -I$(top_builddir)/src/mapi/glapi                        \
+       -I$(top_srcdir)/src/mapi/glapi
 
 include Makefile.sources
 
@@ -64,6 +71,9 @@ BUILT_SOURCES += shared-glapi/glapi_mapi_tmp.h
 
 lib_LTLIBRARIES += shared-glapi/libglapi.la
 shared_glapi_libglapi_la_SOURCES = $(MAPI_GLAPI_FILES) shared-glapi/glapi_mapi_tmp.h
+shared_glapi_libglapi_la_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(VISIBILITY_CFLAGS)
 shared_glapi_libglapi_la_CPPFLAGS = \
        $(AM_CPPFLAGS) \
        -DMAPI_MODE_GLAPI \
@@ -82,7 +92,8 @@ check_PROGRAMS += shared-glapi-test
 shared_glapi_test_SOURCES = shared-glapi/tests/check_table.cpp
 shared_glapi_test_CPPFLAGS = \
        $(AM_CPPFLAGS) \
-       -I$(top_srcdir)/src/gtest/include
+       -I$(top_srcdir)/src/gtest/include \
+       -I$(top_srcdir)/src/mesa
 shared_glapi_test_LDADD = \
        $(top_builddir)/src/mapi/shared-glapi/libglapi.la \
        $(top_builddir)/src/gtest/libgtest.la
@@ -90,7 +101,7 @@ endif
 
 shared-glapi/glapi_mapi_tmp.h : glapi/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
        $(MKDIR_GEN)
-       $(PYTHON_GEN) $(srcdir)/mapi_abi.py --mode lib --printer shared-glapi \
+       $(PYTHON_GEN) $(srcdir)/mapi_abi.py --printer shared-glapi \
                $(srcdir)/glapi/gen/gl_and_es_API.xml > $@
 
 if HAVE_OPENGL
@@ -110,7 +121,6 @@ endif
 glapi_libglapi_la_SOURCES =
 glapi_libglapi_la_CPPFLAGS = \
        $(AM_CPPFLAGS) \
-       -I$(top_srcdir)/src/mapi/glapi \
        -I$(top_srcdir)/src/mesa
 
 if HAVE_APPLEDRI
@@ -145,7 +155,8 @@ check_PROGRAMS += glapi-test
 glapi_test_SOURCES = glapi/tests/check_table.cpp
 glapi_test_CPPFLAGS = \
        $(AM_CPPFLAGS) \
-       -I$(top_srcdir)/src/gtest/include
+       -I$(top_srcdir)/src/gtest/include \
+       -I$(top_srcdir)/src/mesa
 
 glapi_test_LDADD = \
        $(top_builddir)/src/mapi/glapi/libglapi.la \
@@ -184,14 +195,12 @@ es1api_libGLESv1_CM_la_LDFLAGS = \
        $(GC_SECTIONS) \
        $(LD_NO_UNDEFINED)
 
-if HAVE_SHARED_GLAPI
 es1api_libGLESv1_CM_la_LIBADD += shared-glapi/libglapi.la
 endif
-endif
 
 es1api/glapi_mapi_tmp.h: glapi/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
        $(MKDIR_GEN)
-       $(PYTHON_GEN) $(srcdir)/mapi_abi.py --mode lib --printer es1api \
+       $(PYTHON_GEN) $(srcdir)/mapi_abi.py --printer es1api \
                $(srcdir)/glapi/gen/gl_and_es_API.xml > $@
 
 if HAVE_OPENGL_ES2
@@ -231,14 +240,17 @@ es2api_libGLESv2_la_LDFLAGS = \
        $(GC_SECTIONS) \
        $(LD_NO_UNDEFINED)
 
-if HAVE_SHARED_GLAPI
 es2api_libGLESv2_la_LIBADD += shared-glapi/libglapi.la
 endif
-endif
 
 es2api/glapi_mapi_tmp.h: glapi/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
        $(MKDIR_GEN)
-       $(PYTHON_GEN) $(srcdir)/mapi_abi.py --mode lib --printer es2api \
+       $(PYTHON_GEN) $(srcdir)/mapi_abi.py --printer es2api \
                $(srcdir)/glapi/gen/gl_and_es_API.xml > $@
 
 include $(top_srcdir)/install-lib-links.mk
+
+if NEED_KHRPLATFORM
+khrdir = $(includedir)/KHR
+khr_HEADERS = $(top_srcdir)/include/KHR/khrplatform.h
+endif