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