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
40 shared-glapi/SConscript
42 AM_CFLAGS = $(PTHREAD_CFLAGS)
46 -I$(top_srcdir)/include \
47 -I$(top_srcdir)/src/mapi \
48 -I$(top_builddir)/src/mapi
50 GLAPI = $(top_srcdir)/src/mapi/glapi
51 include Makefile.sources
52 include glapi/Makefile.sources
53 include glapi/gen/glapi_gen.mk
56 BUILT_SOURCES += shared-glapi/glapi_mapi_tmp.h
58 lib_LTLIBRARIES += shared-glapi/libglapi.la
59 shared_glapi_libglapi_la_SOURCES = $(MAPI_GLAPI_FILES)
60 shared_glapi_libglapi_la_CPPFLAGS = \
63 -DMAPI_ABI_HEADER=\"shared-glapi/glapi_mapi_tmp.h\"
64 shared_glapi_libglapi_la_LIBADD = \
67 shared_glapi_libglapi_la_LDFLAGS = \
72 shared-glapi/glapi_mapi_tmp.h : $(GLAPI)/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
73 $(call glapi_gen_mapi,$<,shared-glapi)
75 TESTS += shared-glapi-test
76 check_PROGRAMS += shared-glapi-test
78 shared_glapi_test_SOURCES = shared-glapi/tests/check_table.cpp
79 shared_glapi_test_CPPFLAGS = \
81 -I$(top_srcdir)/src/gtest/include
82 shared_glapi_test_LDADD = \
83 $(top_builddir)/src/mapi/shared-glapi/libglapi.la \
84 $(top_builddir)/src/gtest/libgtest.la
88 noinst_LTLIBRARIES = glapi/libglapi.la
92 GLAPI_ASM_SOURCES = $(X86_64_API)
94 GLAPI_ASM_SOURCES = $(X86_API)
98 GLAPI_ASM_SOURCES = $(SPARC_API)
101 glapi_libglapi_la_SOURCES = $(GLAPI_UTIL_SOURCES)
102 glapi_libglapi_la_CPPFLAGS = \
104 -I$(top_srcdir)/src/mapi/glapi \
105 -I$(top_srcdir)/src/mesa
108 glapi_libglapi_la_SOURCES += $(MAPI_BRIDGE_FILES)
109 glapi_libglapi_la_CPPFLAGS += \
111 -DMAPI_ABI_HEADER=\"glapi/glapi_mapi_tmp.h\"
113 glapi_libglapi_la_CPPFLAGS += \
115 glapi_libglapi_la_SOURCES += \
117 $(GLAPI_ASM_SOURCES) \
121 check_PROGRAMS += glapi-test
123 glapi_test_SOURCES = glapi/tests/check_table.cpp
124 glapi_test_CPPFLAGS = \
126 -I$(top_srcdir)/src/gtest/include
129 $(top_builddir)/src/mapi/glapi/libglapi.la \
130 $(top_builddir)/src/gtest/libgtest.la
135 TESTS += es1api/ABI-check
137 BUILT_SOURCES += es1api/glapi_mapi_tmp.h
139 pkgconfig_DATA += es1api/glesv1_cm.pc
141 GLES_includedir = $(includedir)/GLES
142 GLES_include_HEADERS = \
143 $(top_srcdir)/include/GLES/egl.h \
144 $(top_srcdir)/include/GLES/gl.h \
145 $(top_srcdir)/include/GLES/glext.h \
146 $(top_srcdir)/include/GLES/glplatform.h
148 lib_LTLIBRARIES += es1api/libGLESv1_CM.la
150 es1api_libGLESv1_CM_la_SOURCES = entry.c es1api/glapi_mapi_tmp.h
151 es1api_libGLESv1_CM_la_CFLAGS = \
154 es1api_libGLESv1_CM_la_CPPFLAGS = \
157 -DMAPI_ABI_HEADER=\"es1api/glapi_mapi_tmp.h\"
158 es1api_libGLESv1_CM_la_LIBADD = $(GLESv1_CM_LIB_DEPS)
159 es1api_libGLESv1_CM_la_LDFLAGS = \
161 -version-number 1:1 \
166 es1api_libGLESv1_CM_la_LIBADD += shared-glapi/libglapi.la
169 es1api/glapi_mapi_tmp.h: glapi/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
170 $(call glapi_gen_mapi,$<,es1api)
174 TESTS += es2api/ABI-check
176 BUILT_SOURCES += es2api/glapi_mapi_tmp.h
178 pkgconfig_DATA += es2api/glesv2.pc
180 GLES2_includedir = $(includedir)/GLES2
181 GLES2_include_HEADERS = \
182 $(top_srcdir)/include/GLES2/gl2.h \
183 $(top_srcdir)/include/GLES2/gl2ext.h \
184 $(top_srcdir)/include/GLES2/gl2platform.h
185 GLES3_includedir = $(includedir)/GLES3
186 GLES3_include_HEADERS = \
187 $(top_srcdir)/include/GLES3/gl3.h \
188 $(top_srcdir)/include/GLES3/gl31.h \
189 $(top_srcdir)/include/GLES3/gl3ext.h \
190 $(top_srcdir)/include/GLES3/gl3platform.h
192 lib_LTLIBRARIES += es2api/libGLESv2.la
194 es2api_libGLESv2_la_SOURCES = entry.c es2api/glapi_mapi_tmp.h
195 es2api_libGLESv2_la_CFLAGS = \
198 es2api_libGLESv2_la_CPPFLAGS = \
201 -DMAPI_ABI_HEADER=\"es2api/glapi_mapi_tmp.h\"
202 es2api_libGLESv2_la_LIBADD = $(GLESv2_LIB_DEPS)
203 es2api_libGLESv2_la_LDFLAGS = \
210 es2api_libGLESv2_la_LIBADD += shared-glapi/libglapi.la
213 es2api/glapi_mapi_tmp.h: glapi/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
214 $(call glapi_gen_mapi,$<,es2api)
221 include $(top_srcdir)/install-lib-links.mk