mapi: Inline es1api/Makefile.
[mesa.git] / src / mapi / Makefile.am
1 # Copyright © 2013, 2014 Intel Corporation
2 #
3 # Permission is hereby granted, free of charge, to any person obtaining a
4 # copy of this software and associated documentation files (the "Software"),
5 # to deal in the Software without restriction, including without limitation
6 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
7 # and/or sell copies of the Software, and to permit persons to whom the
8 # Software is furnished to do so, subject to the following conditions:
9 #
10 # The above copyright notice and this permission notice (including the next
11 # paragraph) shall be included in all copies or substantial portions of the
12 # Software.
13 #
14 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20 # IN THE SOFTWARE.
21
22 SUBDIRS = glapi/gen .
23 TESTS =
24
25 TOP = $(top_srcdir)
26
27 BUILT_SOURCES =
28 CLEANFILES = $(BUILT_SOURCES)
29
30 lib_LTLIBRARIES =
31 pkgconfigdir = $(libdir)/pkgconfig
32 pkgconfig_DATA =
33
34 AM_CFLAGS = $(PTHREAD_CFLAGS)
35 AM_CPPFLAGS = \
36 $(DEFINES) \
37 $(SELINUX_CFLAGS) \
38 -I$(top_srcdir)/include \
39 -I$(top_srcdir)/src/mapi \
40 -I$(top_builddir)/src/mapi
41
42 GLAPI = $(top_srcdir)/src/mapi/glapi
43 include Makefile.sources
44 include glapi/gen/glapi_gen.mk
45
46 if HAVE_SHARED_GLAPI
47 SUBDIRS += shared-glapi/tests
48
49 BUILT_SOURCES += shared-glapi/glapi_mapi_tmp.h
50
51 lib_LTLIBRARIES += shared-glapi/libglapi.la
52 shared_glapi_libglapi_la_SOURCES = $(MAPI_GLAPI_FILES)
53 shared_glapi_libglapi_la_CPPFLAGS = \
54 $(AM_CPPFLAGS) \
55 -DMAPI_MODE_GLAPI \
56 -DMAPI_ABI_HEADER=\"shared-glapi/glapi_mapi_tmp.h\"
57 shared_glapi_libglapi_la_LIBADD = \
58 $(PTHREAD_LIBS) \
59 $(SELINUX_LIBS)
60 shared_glapi_libglapi_la_LDFLAGS = \
61 -no-undefined \
62 $(GC_SECTIONS) \
63 $(LD_NO_UNDEFINED)
64
65 shared-glapi/glapi_mapi_tmp.h : $(GLAPI)/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
66 $(call glapi_gen_mapi,$<,shared-glapi)
67 endif
68
69 if HAVE_OPENGL
70 SUBDIRS += glapi
71 endif
72
73 if HAVE_OPENGL_ES1
74 TESTS += es1api/ABI-check
75
76 BUILT_SOURCES += es1api/glapi_mapi_tmp.h
77
78 pkgconfig_DATA += es1api/glesv1_cm.pc
79
80 GLES_includedir = $(includedir)/GLES
81 GLES_include_HEADERS = \
82 $(top_srcdir)/include/GLES/egl.h \
83 $(top_srcdir)/include/GLES/gl.h \
84 $(top_srcdir)/include/GLES/glext.h \
85 $(top_srcdir)/include/GLES/glplatform.h
86
87 lib_LTLIBRARIES += es1api/libGLESv1_CM.la
88
89 es1api_libGLESv1_CM_la_SOURCES = entry.c es1api/glapi_mapi_tmp.h
90 es1api_libGLESv1_CM_la_CFLAGS = \
91 $(AM_CFLAGS) \
92 $(VISIBILITY_CFLAGS)
93 es1api_libGLESv1_CM_la_CPPFLAGS = \
94 $(AM_CPPFLAGS) \
95 -DMAPI_MODE_BRIDGE \
96 -DMAPI_ABI_HEADER=\"es1api/glapi_mapi_tmp.h\"
97 es1api_libGLESv1_CM_la_LIBADD = $(GLESv1_CM_LIB_DEPS)
98 es1api_libGLESv1_CM_la_LDFLAGS = \
99 -no-undefined \
100 -version-number 1:1 \
101 $(GC_SECTIONS) \
102 $(LD_NO_UNDEFINED)
103
104 if HAVE_SHARED_GLAPI
105 es1api_libGLESv1_CM_la_LIBADD += shared-glapi/libglapi.la
106 endif
107
108 es1api/glapi_mapi_tmp.h: glapi/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
109 $(call glapi_gen_mapi,$<,es1api)
110 endif
111
112 if HAVE_OPENGL_ES2
113 SUBDIRS += es2api
114 endif
115
116 if HAVE_OPENVG
117 SUBDIRS += vgapi
118 endif
119
120 include $(top_srcdir)/install-lib-links.mk