Makefile.am revision e52adb7b
1e52adb7bSmrg# Copyright © 2013 Intel Corporation
2e52adb7bSmrg#
3e52adb7bSmrg# Permission is hereby granted, free of charge, to any person obtaining a
4e52adb7bSmrg# copy of this software and associated documentation files (the "Software"),
5e52adb7bSmrg# to deal in the Software without restriction, including without limitation
6e52adb7bSmrg# the rights to use, copy, modify, merge, publish, distribute, sublicense,
7e52adb7bSmrg# and/or sell copies of the Software, and to permit persons to whom the
8e52adb7bSmrg# Software is furnished to do so, subject to the following conditions:
9e52adb7bSmrg#
10e52adb7bSmrg# The above copyright notice and this permission notice (including the next
11e52adb7bSmrg# paragraph) shall be included in all copies or substantial portions of the
12e52adb7bSmrg# Software.
13e52adb7bSmrg#
14e52adb7bSmrg# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15e52adb7bSmrg# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16e52adb7bSmrg# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17e52adb7bSmrg# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18e52adb7bSmrg# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19e52adb7bSmrg# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20e52adb7bSmrg# IN THE SOFTWARE.
21e52adb7bSmrg
22e52adb7bSmrgEPOXY = $(builddir)/../src/libepoxy.la
23e52adb7bSmrg
24e52adb7bSmrgcheck_LTLIBRARIES = \
25e52adb7bSmrg	$(EGL_UTIL_LIB) \
26e52adb7bSmrg	$(GLX_UTIL_LIB) \
27e52adb7bSmrg	$(WGL_UTIL_LIB) \
28e52adb7bSmrg	$()
29e52adb7bSmrg
30e52adb7bSmrglibegl_common_la_SOURCES = \
31e52adb7bSmrg	egl_common.c \
32e52adb7bSmrg	egl_common.h
33e52adb7bSmrg	$()
34e52adb7bSmrg
35e52adb7bSmrglibglx_common_la_SOURCES = \
36e52adb7bSmrg	glx_common.c \
37e52adb7bSmrg	glx_common.h
38e52adb7bSmrg	$()
39e52adb7bSmrg
40e52adb7bSmrglibwgl_common_la_SOURCES = \
41e52adb7bSmrg	wgl_common.c \
42e52adb7bSmrg	wgl_common.h
43e52adb7bSmrg	$()
44e52adb7bSmrglibwgl_common_la_LIBADD = $(EPOXY)
45e52adb7bSmrg
46e52adb7bSmrgAM_CPPFLAGS = \
47e52adb7bSmrg	-I$(top_srcdir)/include \
48e52adb7bSmrg	-I$(top_builddir)/include \
49e52adb7bSmrg	$(X11_CFLAGS) \
50e52adb7bSmrg	$(EGL_CFLAGS) \
51e52adb7bSmrg	$()
52e52adb7bSmrg
53e52adb7bSmrgAM_CFLAGS = $(CWARNFLAGS)
54e52adb7bSmrg
55e52adb7bSmrgTESTS = \
56e52adb7bSmrg	$(EGL_TESTS) \
57e52adb7bSmrg	$(GLX_TESTS) \
58e52adb7bSmrg	$(EGL_AND_GLX_TESTS) \
59e52adb7bSmrg	$(WGL_TESTS) \
60e52adb7bSmrg	headerguards$(EXEEXT) \
61e52adb7bSmrg	miscdefines$(EXEEXT) \
62e52adb7bSmrg	khronos_typedefs$(EXEEXT) \
63e52adb7bSmrg	$()
64e52adb7bSmrg
65e52adb7bSmrgcheck_BINARIES = $(EGL_AND_GLX_BIN)
66e52adb7bSmrg
67e52adb7bSmrgXFAIL_TESTS = \
68e52adb7bSmrg        egl_and_glx_different_pointers_egl_glx \
69e52adb7bSmrg	$()
70e52adb7bSmrg
71e52adb7bSmrgcheck_PROGRAMS = $(TESTS)
72e52adb7bSmrg
73e52adb7bSmrgif BUILD_EGL
74e52adb7bSmrgEGL_TESTS = \
75e52adb7bSmrg	egl_has_extension_nocontext \
76e52adb7bSmrg	egl_gl \
77e52adb7bSmrg	egl_gles1_without_glx \
78e52adb7bSmrg	egl_gles2_without_glx \
79e52adb7bSmrg	$()
80e52adb7bSmrg
81e52adb7bSmrgEGL_UTIL_LIB = libegl_common.la
82e52adb7bSmrgendif
83e52adb7bSmrg
84e52adb7bSmrgif BUILD_GLX
85e52adb7bSmrgif HAS_ZNOW
86e52adb7bSmrgGLX_SHARED_ZNOW = glx_shared_znow
87e52adb7bSmrgendif
88e52adb7bSmrg
89e52adb7bSmrgif BUILD_EGL
90e52adb7bSmrgif BUILD_GLX
91e52adb7bSmrgif !BUILD_APPLE
92e52adb7bSmrgEGL_AND_GLX_TESTS = \
93e52adb7bSmrg	egl_and_glx_different_pointers_egl_glx \
94e52adb7bSmrg	egl_and_glx_different_pointers_egl \
95e52adb7bSmrg	egl_and_glx_different_pointers_glx \
96e52adb7bSmrg        $()
97e52adb7bSmrgendif
98e52adb7bSmrgendif
99e52adb7bSmrgendif
100e52adb7bSmrg
101e52adb7bSmrgif !BUILD_APPLE
102e52adb7bSmrgGLX_NON_APPLE_TESTS = \
103e52adb7bSmrg	glx_alias_prefer_same_name \
104e52adb7bSmrg	glx_gles2 \
105e52adb7bSmrg        $()
106e52adb7bSmrgendif
107e52adb7bSmrg
108e52adb7bSmrgGLX_TESTS = \
109e52adb7bSmrg	glx_beginend \
110e52adb7bSmrg	glx_public_api \
111e52adb7bSmrg	glx_public_api_core \
112e52adb7bSmrg	glx_glxgetprocaddress_nocontext \
113e52adb7bSmrg	glx_has_extension_nocontext \
114e52adb7bSmrg	glx_static \
115e52adb7bSmrg        $(GLX_SHARED_ZNOW) \
116e52adb7bSmrg        $(GLX_NON_APPLE_TESTS) \
117e52adb7bSmrg	$()
118e52adb7bSmrg
119e52adb7bSmrgGLX_UTIL_LIB = libglx_common.la
120e52adb7bSmrgendif
121e52adb7bSmrg
122e52adb7bSmrgif BUILD_WGL
123e52adb7bSmrgWGL_TESTS = \
124e52adb7bSmrg	wgl_core_and_exts$(EXEEXT) \
125e52adb7bSmrg	wgl_per_context_funcptrs$(EXEEXT) \
126e52adb7bSmrg	wgl_usefontbitmaps$(EXEEXT) \
127e52adb7bSmrg	wgl_usefontbitmaps_unicode$(EXEEXT) \
128e52adb7bSmrg	$()
129e52adb7bSmrg
130e52adb7bSmrgWGL_UTIL_LIB = libwgl_common.la
131e52adb7bSmrgendif
132e52adb7bSmrg
133e52adb7bSmrgegl_has_extension_nocontext_LDADD = $(EPOXY) libegl_common.la $(X11_LIBS)
134e52adb7bSmrg
135e52adb7bSmrgegl_gl_LDADD = $(EPOXY) $(DLOPEN_LIBS) libegl_common.la $(X11_LIBS)
136e52adb7bSmrg
137e52adb7bSmrgegl_gles1_without_glx_CPPFLAGS = $(AM_CPPFLAGS) -DGLES_VERSION=1
138e52adb7bSmrgegl_gles1_without_glx_SOURCES = egl_without_glx.c
139e52adb7bSmrgegl_gles1_without_glx_LDADD = $(EPOXY) $(DLOPEN_LIBS) libegl_common.la $(X11_LIBS)
140e52adb7bSmrg
141e52adb7bSmrgegl_gles2_without_glx_CPPFLAGS = $(AM_CPPFLAGS) -DGLES_VERSION=2
142e52adb7bSmrgegl_gles2_without_glx_SOURCES = egl_without_glx.c
143e52adb7bSmrgegl_gles2_without_glx_LDADD = $(EPOXY) $(DLOPEN_LIBS) libegl_common.la $(X11_LIBS)
144e52adb7bSmrg
145e52adb7bSmrgegl_and_glx_different_pointers_egl_SOURCES = egl_and_glx_different_pointers.c dlwrap.c dlwrap.h
146e52adb7bSmrgegl_and_glx_different_pointers_egl_LDADD = libegl_common.la libglx_common.la $(DLOPEN_LIBS) $(EPOXY) $(X11_LIBS)
147e52adb7bSmrgegl_and_glx_different_pointers_egl_LDFLAGS = -rdynamic
148e52adb7bSmrgegl_and_glx_different_pointers_egl_CPPFLAGS = $(AM_CPPFLAGS) -DUSE_EGL
149e52adb7bSmrg
150e52adb7bSmrgegl_and_glx_different_pointers_glx_SOURCES = egl_and_glx_different_pointers.c dlwrap.c dlwrap.h
151e52adb7bSmrgegl_and_glx_different_pointers_glx_LDADD = libegl_common.la libglx_common.la $(DLOPEN_LIBS) $(EPOXY) $(X11_LIBS)
152e52adb7bSmrgegl_and_glx_different_pointers_glx_LDFLAGS = -rdynamic
153e52adb7bSmrgegl_and_glx_different_pointers_glx_CPPFLAGS = $(AM_CPPFLAGS) -DUSE_GLX
154e52adb7bSmrg
155e52adb7bSmrgegl_and_glx_different_pointers_egl_glx_SOURCES = egl_and_glx_different_pointers.c dlwrap.c dlwrap.h
156e52adb7bSmrgegl_and_glx_different_pointers_egl_glx_LDADD = libegl_common.la libglx_common.la $(DLOPEN_LIBS) $(EPOXY) $(X11_LIBS)
157e52adb7bSmrgegl_and_glx_different_pointers_egl_glx_LDFLAGS = -rdynamic
158e52adb7bSmrgegl_and_glx_different_pointers_egl_glx_CPPFLAGS = $(AM_CPPFLAGS) -DUSE_EGL -DUSE_GLX
159e52adb7bSmrg
160e52adb7bSmrgglx_alias_prefer_same_name_SOURCES = glx_gles2.c dlwrap.c dlwrap.h
161e52adb7bSmrgglx_alias_prefer_same_name_LDFLAGS = -rdynamic
162e52adb7bSmrgglx_alias_prefer_same_name_LDADD = $(EPOXY) libglx_common.la $(X11_LIBS) -ldl
163e52adb7bSmrg
164e52adb7bSmrgglx_beginend_LDADD = $(EPOXY) libglx_common.la $(GL_LIBS) $(X11_LIBS)
165e52adb7bSmrg
166e52adb7bSmrgglx_gles2_SOURCES = glx_gles2.c dlwrap.c dlwrap.h
167e52adb7bSmrgglx_gles2_LDFLAGS = -rdynamic
168e52adb7bSmrgglx_gles2_LDADD = $(EPOXY) libglx_common.la $(X11_LIBS) -ldl
169e52adb7bSmrg
170e52adb7bSmrgglx_public_api_LDADD = $(EPOXY) libglx_common.la $(X11_LIBS)
171e52adb7bSmrg
172e52adb7bSmrgglx_public_api_core_LDADD = $(EPOXY) libglx_common.la $(X11_LIBS)
173e52adb7bSmrg
174e52adb7bSmrgglx_glxgetprocaddress_nocontext_LDADD = $(EPOXY) libglx_common.la $(X11_LIBS)
175e52adb7bSmrg
176e52adb7bSmrgglx_has_extension_nocontext_LDADD = $(EPOXY) libglx_common.la $(X11_LIBS)
177e52adb7bSmrg
178e52adb7bSmrgglx_static_CFLAGS = -DNEEDS_TO_BE_STATIC
179e52adb7bSmrgglx_static_LDADD = $(DLOPEN_LIBS) $(EPOXY) libglx_common.la $(X11_LIBS)
180e52adb7bSmrgglx_static_LDFLAGS = -static
181e52adb7bSmrg
182e52adb7bSmrgglx_shared_znow_SOURCES = glx_static.c
183e52adb7bSmrgglx_shared_znow_LDADD = $(DLOPEN_LIBS) $(EPOXY) libglx_common.la $(X11_LIBS)
184e52adb7bSmrgglx_shared_znow_LDFLAGS = -Wl,-z,now
185e52adb7bSmrg
186e52adb7bSmrgkhronos_typedefs_SOURCES = \
187e52adb7bSmrg	khronos_typedefs.c \
188e52adb7bSmrg	khronos_typedefs.h \
189e52adb7bSmrg	khronos_typedefs_nonepoxy.c \
190e52adb7bSmrg	$()
191e52adb7bSmrg
192e52adb7bSmrgwgl_core_and_exts_LDADD = $(EPOXY) libwgl_common.la -lgdi32
193e52adb7bSmrg
194e52adb7bSmrgwgl_per_context_funcptrs_LDADD = $(EPOXY) libwgl_common.la -lgdi32
195e52adb7bSmrg
196e52adb7bSmrgwgl_usefontbitmaps_LDADD = $(EPOXY) libwgl_common.la -lgdi32
197e52adb7bSmrgwgl_usefontbitmaps_unicode_SOURCES = wgl_usefontbitmaps.c
198e52adb7bSmrgwgl_usefontbitmaps_unicode_LDADD = $(EPOXY) libwgl_common.la -lgdi32
199e52adb7bSmrgwgl_usefontbitmaps_unicode_CPPFLAGS = $(AM_CPPFLAGS) -DUNICODE
200