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
35 AM_CFLAGS = $(PTHREAD_CFLAGS)
39 -I$(top_srcdir)/include \
40 -I$(top_srcdir)/src/mapi \
41 -I$(top_builddir)/src/mapi
43 GLAPI = $(top_srcdir)/src/mapi/glapi
44 include Makefile.sources
45 include glapi/Makefile.sources
46 include glapi/gen/glapi_gen.mk
49 BUILT_SOURCES += shared-glapi/glapi_mapi_tmp.h
51 lib_LTLIBRARIES += shared-glapi/libglapi.la
52 shared_glapi_libglapi_la_SOURCES = $(MAPI_GLAPI_FILES)
53 shared_glapi_libglapi_la_CPPFLAGS = \
56 -DMAPI_ABI_HEADER=\"shared-glapi/glapi_mapi_tmp.h\"
57 shared_glapi_libglapi_la_LIBADD = \
60 shared_glapi_libglapi_la_LDFLAGS = \
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)
68 TESTS += shared-glapi-test
69 check_PROGRAMS += shared-glapi-test
71 shared_glapi_test_SOURCES = shared-glapi/tests/check_table.cpp
72 shared_glapi_test_CPPFLAGS = \
74 -I$(top_srcdir)/src/gtest/include
75 shared_glapi_test_LDADD = \
76 $(top_builddir)/src/mapi/shared-glapi/libglapi.la \
77 $(top_builddir)/src/gtest/libgtest.la
81 noinst_LTLIBRARIES = glapi/libglapi.la
85 GLAPI_ASM_SOURCES = $(X86_64_API)
87 GLAPI_ASM_SOURCES = $(X86_API)
91 GLAPI_ASM_SOURCES = $(SPARC_API)
94 glapi_libglapi_la_SOURCES = $(GLAPI_UTIL_SOURCES)
95 glapi_libglapi_la_CPPFLAGS = \
97 -I$(top_srcdir)/src/mapi/glapi \
98 -I$(top_srcdir)/src/mesa
101 glapi_libglapi_la_SOURCES += $(MAPI_BRIDGE_FILES)
102 glapi_libglapi_la_CPPFLAGS += \
104 -DMAPI_ABI_HEADER=\"glapi/glapi_mapi_tmp.h\"
106 glapi_libglapi_la_CPPFLAGS += \
108 glapi_libglapi_la_SOURCES += \
110 $(GLAPI_ASM_SOURCES) \
114 check_PROGRAMS += glapi-test
116 glapi_test_SOURCES = glapi/tests/check_table.cpp
117 glapi_test_CPPFLAGS = \
119 -I$(top_srcdir)/src/gtest/include
122 $(top_builddir)/src/mapi/glapi/libglapi.la \
123 $(top_builddir)/src/gtest/libgtest.la
128 TESTS += es1api/ABI-check
130 BUILT_SOURCES += es1api/glapi_mapi_tmp.h
132 pkgconfig_DATA += es1api/glesv1_cm.pc
134 GLES_includedir = $(includedir)/GLES
135 GLES_include_HEADERS = \
136 $(top_srcdir)/include/GLES/egl.h \
137 $(top_srcdir)/include/GLES/gl.h \
138 $(top_srcdir)/include/GLES/glext.h \
139 $(top_srcdir)/include/GLES/glplatform.h
141 lib_LTLIBRARIES += es1api/libGLESv1_CM.la
143 es1api_libGLESv1_CM_la_SOURCES = entry.c es1api/glapi_mapi_tmp.h
144 es1api_libGLESv1_CM_la_CFLAGS = \
147 es1api_libGLESv1_CM_la_CPPFLAGS = \
150 -DMAPI_ABI_HEADER=\"es1api/glapi_mapi_tmp.h\"
151 es1api_libGLESv1_CM_la_LIBADD = $(GLESv1_CM_LIB_DEPS)
152 es1api_libGLESv1_CM_la_LDFLAGS = \
154 -version-number 1:1 \
159 es1api_libGLESv1_CM_la_LIBADD += shared-glapi/libglapi.la
162 es1api/glapi_mapi_tmp.h: glapi/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
163 $(call glapi_gen_mapi,$<,es1api)
167 TESTS += es2api/ABI-check
169 BUILT_SOURCES += es2api/glapi_mapi_tmp.h
171 pkgconfig_DATA += es2api/glesv2.pc
173 GLES2_includedir = $(includedir)/GLES2
174 GLES2_include_HEADERS = \
175 $(top_srcdir)/include/GLES2/gl2.h \
176 $(top_srcdir)/include/GLES2/gl2ext.h \
177 $(top_srcdir)/include/GLES2/gl2platform.h
178 GLES3_includedir = $(includedir)/GLES3
179 GLES3_include_HEADERS = \
180 $(top_srcdir)/include/GLES3/gl3.h \
181 $(top_srcdir)/include/GLES3/gl31.h \
182 $(top_srcdir)/include/GLES3/gl3ext.h \
183 $(top_srcdir)/include/GLES3/gl3platform.h
185 lib_LTLIBRARIES += es2api/libGLESv2.la
187 es2api_libGLESv2_la_SOURCES = entry.c es2api/glapi_mapi_tmp.h
188 es2api_libGLESv2_la_CFLAGS = \
191 es2api_libGLESv2_la_CPPFLAGS = \
194 -DMAPI_ABI_HEADER=\"es2api/glapi_mapi_tmp.h\"
195 es2api_libGLESv2_la_LIBADD = $(GLESv2_LIB_DEPS)
196 es2api_libGLESv2_la_LDFLAGS = \
203 es2api_libGLESv2_la_LIBADD += shared-glapi/libglapi.la
206 es2api/glapi_mapi_tmp.h: glapi/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
207 $(call glapi_gen_mapi,$<,es2api)
214 include $(top_srcdir)/install-lib-links.mk