• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright © 2012 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
22if HAVE_SHARED_GLAPI
23SHARED_GLAPI_CFLAGS = -DGLX_SHARED_GLAPI
24SHARED_GLAPI_LIB = $(top_builddir)/src/mapi/shared-glapi/libglapi.la
25endif
26
27SUBDIRS =
28
29EXTRA_DIST = SConscript
30
31if HAVE_XF86VIDMODE
32EXTRA_DEFINES_XF86VIDMODE = -DXF86VIDMODE
33endif
34
35AM_CFLAGS = \
36	-I$(top_srcdir)/include \
37	-I$(top_srcdir)/include/GL/internal \
38	-I$(top_srcdir)/src \
39	-I$(top_srcdir)/src/loader \
40	-I$(top_builddir)/src/mapi \
41	-I$(top_srcdir)/src/mapi \
42	-I$(top_builddir)/src/mapi/glapi \
43	-I$(top_srcdir)/src/mapi/glapi \
44	$(VISIBILITY_CFLAGS) \
45	$(SHARED_GLAPI_CFLAGS) \
46	$(EXTRA_DEFINES_XF86VIDMODE) \
47	-D_REENTRANT \
48	-DDEFAULT_DRIVER_DIR=\"$(DRI_DRIVER_SEARCH_DIR)\" \
49	$(DEFINES) \
50	$(LIBDRM_CFLAGS) \
51	$(DRI2PROTO_CFLAGS) \
52	$(GLPROTO_CFLAGS) \
53	$(X11_INCLUDES)
54
55lib_LTLIBRARIES = lib@GL_LIB@.la
56
57noinst_LTLIBRARIES = libglx.la
58
59libglx_la_SOURCES = \
60	clientattrib.c \
61	clientinfo.c \
62	compsize.c \
63	create_context.c \
64	eval.c \
65	glxclient.h \
66	glxcmds.c \
67	glxconfig.c \
68	glxconfig.h \
69	glxcurrent.c \
70	glx_error.c \
71	glx_error.h \
72	glxext.c \
73	glxextensions.c \
74	glxextensions.h \
75	glxhash.c \
76	glxhash.h \
77	glx_pbuffer.c \
78	glx_query.c \
79	indirect.c \
80	indirect_glx.c \
81	indirect_init.c \
82	indirect_init.h \
83	indirect_size.c \
84	indirect_texture_compression.c \
85	indirect_transpose_matrix.c \
86	indirect_vertex_array.c \
87	indirect_vertex_array.h \
88	indirect_vertex_array_priv.h \
89	indirect_vertex_program.c \
90	indirect_window_pos.c \
91	packrender.h \
92	packsingle.h \
93	pixel.c \
94	pixelstore.c \
95	query_renderer.c \
96	render2.c \
97	renderpix.c \
98	single2.c \
99	singlepix.c \
100	vertarr.c
101
102libglx_la_LIBADD = $(top_builddir)/src/loader/libloader.la
103
104if HAVE_DRISW
105libglx_la_SOURCES += \
106	drisw_glx.c \
107	drisw_priv.h
108endif
109
110if HAVE_DRICOMMON
111libglx_la_SOURCES += \
112	dri_common.c \
113	dri_common.h \
114	dri_common_query_renderer.c \
115	dri_common_interop.c \
116	xfont.c
117endif
118
119if HAVE_DRI2
120libglx_la_SOURCES += \
121	dri2.c \
122	dri2_glx.c \
123	dri2.h \
124	dri2_priv.h \
125	dri_glx.c \
126	dri_sarea.h \
127	XF86dri.c \
128	xf86dri.h \
129	xf86dristr.h
130endif
131
132if HAVE_DRI3
133libglx_la_SOURCES += \
134	dri3_glx.c \
135	dri3_priv.h
136
137libglx_la_LIBADD += $(top_builddir)/src/loader/libloader_dri3_helper.la
138endif
139
140if HAVE_APPLEDRI
141libglx_la_SOURCES += \
142	applegl_glx.c
143
144SUBDIRS += apple
145libglx_la_LIBADD += $(builddir)/apple/libappleglx.la
146endif
147
148if HAVE_WINDOWSDRI
149libglx_la_SOURCES += \
150	  driwindows_glx.c
151
152SUBDIRS += windows
153libglx_la_LIBADD += \
154	  $(builddir)/windows/libwindowsdri.la \
155	  $(builddir)/windows/libwindowsglx.la
156endif
157
158if USE_LIBGLVND_GLX
159AM_CFLAGS += \
160	-DGL_LIB_NAME=\"lib@GL_LIB@.so.0\" \
161	$(GLVND_CFLAGS)
162
163libglx_la_SOURCES += \
164	g_glxglvnddispatchfuncs.c \
165	g_glxglvnddispatchindices.h \
166	glxglvnd.c \
167	glxglvnd.h \
168	glxglvnddispatchfuncs.h
169
170GL_LIB_VERSION=0
171else
172AM_CFLAGS += \
173	-DGL_LIB_NAME=\"lib@GL_LIB@.so.1\"
174GL_LIB_VERSION=1:2
175endif
176
177GL_LIBS = \
178	libglx.la \
179	$(top_builddir)/src/mapi/glapi/libglapi.la \
180	$(SHARED_GLAPI_LIB) \
181	$(GL_LIB_DEPS)
182
183GL_LDFLAGS = \
184	-no-undefined \
185	-version-number $(GL_LIB_VERSION) \
186	$(BSYMBOLIC) \
187	$(GC_SECTIONS) \
188	$(LD_NO_UNDEFINED)
189
190lib@GL_LIB@_la_SOURCES =
191lib@GL_LIB@_la_LIBADD = $(GL_LIBS)
192lib@GL_LIB@_la_LDFLAGS = $(GL_LDFLAGS)
193
194if HAVE_WINDOWSDRI
195lib@GL_LIB@_la_LDFLAGS += -lgdi32 -lopengl32 -Wl,--disable-stdcall-fixup
196endif
197
198SUBDIRS += . tests
199
200include $(top_srcdir)/install-lib-links.mk
201