1 # Copyright © 2013, 2014 Intel Corporation
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:
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
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
28 CLEANFILES = $(BUILT_SOURCES)
32 pkgconfigdir = $(libdir)/pkgconfig
38 shared-glapi/SConscript
40 AM_CFLAGS = $(PTHREAD_CFLAGS)
44 -I$(top_srcdir)/include \
45 -I$(top_srcdir)/src/mapi \
46 -I$(top_builddir)/src/mapi
48 GLAPI = $(top_srcdir)/src/mapi/glapi
49 include Makefile.sources
50 include glapi/Makefile.sources
51 include glapi/gen/glapi_gen.mk
54 BUILT_SOURCES += shared-glapi/glapi_mapi_tmp.h
56 lib_LTLIBRARIES += shared-glapi/libglapi.la
57 shared_glapi_libglapi_la_SOURCES = $(MAPI_GLAPI_FILES)
58 shared_glapi_libglapi_la_CPPFLAGS = \
61 -DMAPI_ABI_HEADER=\"shared-glapi/glapi_mapi_tmp.h\"
62 shared_glapi_libglapi_la_LIBADD = \
65 shared_glapi_libglapi_la_LDFLAGS = \
70 shared-glapi/glapi_mapi_tmp.h : $(GLAPI)/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
71 $(call glapi_gen_mapi,$<,shared-glapi)
73 TESTS += shared-glapi-test
74 check_PROGRAMS += shared-glapi-test
76 shared_glapi_test_SOURCES = shared-glapi/tests/check_table.cpp
77 shared_glapi_test_CPPFLAGS = \
79 -I$(top_srcdir)/src/gtest/include
80 shared_glapi_test_LDADD = \
81 $(top_builddir)/src/mapi/shared-glapi/libglapi.la \
82 $(top_builddir)/src/gtest/libgtest.la
86 noinst_LTLIBRARIES = glapi/libglapi.la
90 GLAPI_ASM_SOURCES = $(X86_64_API)
92 GLAPI_ASM_SOURCES = $(X86_API)
96 GLAPI_ASM_SOURCES = $(SPARC_API)
99 glapi_libglapi_la_SOURCES = $(GLAPI_UTIL_SOURCES)
100 glapi_libglapi_la_CPPFLAGS = \
102 -I$(top_srcdir)/src/mapi/glapi \
103 -I$(top_srcdir)/src/mesa
106 glapi_libglapi_la_SOURCES += $(MAPI_BRIDGE_FILES)
107 glapi_libglapi_la_CPPFLAGS += \
109 -DMAPI_ABI_HEADER=\"glapi/glapi_mapi_tmp.h\"
111 glapi_libglapi_la_CPPFLAGS += \
113 glapi_libglapi_la_SOURCES += \
115 $(GLAPI_ASM_SOURCES) \
119 check_PROGRAMS += glapi-test
121 glapi_test_SOURCES = glapi/tests/check_table.cpp
122 glapi_test_CPPFLAGS = \
124 -I$(top_srcdir)/src/gtest/include
127 $(top_builddir)/src/mapi/glapi/libglapi.la \
128 $(top_builddir)/src/gtest/libgtest.la
133 TESTS += es1api/ABI-check
135 BUILT_SOURCES += es1api/glapi_mapi_tmp.h
137 pkgconfig_DATA += es1api/glesv1_cm.pc
139 GLES_includedir = $(includedir)/GLES
140 GLES_include_HEADERS = \
141 $(top_srcdir)/include/GLES/egl.h \
142 $(top_srcdir)/include/GLES/gl.h \
143 $(top_srcdir)/include/GLES/glext.h \
144 $(top_srcdir)/include/GLES/glplatform.h
146 lib_LTLIBRARIES += es1api/libGLESv1_CM.la
148 es1api_libGLESv1_CM_la_SOURCES = entry.c es1api/glapi_mapi_tmp.h
149 es1api_libGLESv1_CM_la_CFLAGS = \
152 es1api_libGLESv1_CM_la_CPPFLAGS = \
155 -DMAPI_ABI_HEADER=\"es1api/glapi_mapi_tmp.h\"
156 es1api_libGLESv1_CM_la_LIBADD = $(GLESv1_CM_LIB_DEPS)
157 es1api_libGLESv1_CM_la_LDFLAGS = \
159 -version-number 1:1 \
164 es1api_libGLESv1_CM_la_LIBADD += shared-glapi/libglapi.la
167 es1api/glapi_mapi_tmp.h: glapi/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
168 $(call glapi_gen_mapi,$<,es1api)
172 TESTS += es2api/ABI-check
174 BUILT_SOURCES += es2api/glapi_mapi_tmp.h
176 pkgconfig_DATA += es2api/glesv2.pc
178 GLES2_includedir = $(includedir)/GLES2
179 GLES2_include_HEADERS = \
180 $(top_srcdir)/include/GLES2/gl2.h \
181 $(top_srcdir)/include/GLES2/gl2ext.h \
182 $(top_srcdir)/include/GLES2/gl2platform.h
183 GLES3_includedir = $(includedir)/GLES3
184 GLES3_include_HEADERS = \
185 $(top_srcdir)/include/GLES3/gl3.h \
186 $(top_srcdir)/include/GLES3/gl31.h \
187 $(top_srcdir)/include/GLES3/gl3ext.h \
188 $(top_srcdir)/include/GLES3/gl3platform.h
190 lib_LTLIBRARIES += es2api/libGLESv2.la
192 es2api_libGLESv2_la_SOURCES = entry.c es2api/glapi_mapi_tmp.h
193 es2api_libGLESv2_la_CFLAGS = \
196 es2api_libGLESv2_la_CPPFLAGS = \
199 -DMAPI_ABI_HEADER=\"es2api/glapi_mapi_tmp.h\"
200 es2api_libGLESv2_la_LIBADD = $(GLESv2_LIB_DEPS)
201 es2api_libGLESv2_la_LDFLAGS = \
208 es2api_libGLESv2_la_LIBADD += shared-glapi/libglapi.la
211 es2api/glapi_mapi_tmp.h: glapi/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
212 $(call glapi_gen_mapi,$<,es2api)
219 include $(top_srcdir)/install-lib-links.mk