d08ff7a8dd2a60cd9ddef0d6bccc4574fee390e1
[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_CFLAGS = -DGLX_SHARED_GLAPI
24 SHARED_GLAPI_LIB = $(top_builddir)/src/mapi/shared-glapi/libglapi.la
25 endif
26
27 SUBDIRS =
28
29 EXTRA_DIST = SConscript
30
31 if HAVE_XF86VIDMODE
32 EXTRA_DEFINES_XF86VIDMODE = -DXF86VIDMODE
33 endif
34
35 AM_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_srcdir)/src/mapi \
41 -I$(top_srcdir)/src/mapi/glapi \
42 -I$(top_builddir)/src/mapi \
43 -I$(top_builddir)/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 -DGL_LIB_NAME=\"lib@GL_LIB@.so.1\" \
50 $(DEFINES) \
51 $(LIBDRM_CFLAGS) \
52 $(DRI2PROTO_CFLAGS) \
53 $(GLPROTO_CFLAGS) \
54 $(X11_INCLUDES)
55
56 lib_LTLIBRARIES = lib@GL_LIB@.la
57
58 noinst_LTLIBRARIES = libglx.la
59
60 libglx_la_SOURCES = \
61 clientattrib.c \
62 clientinfo.c \
63 compsize.c \
64 create_context.c \
65 eval.c \
66 glxclient.h \
67 glxcmds.c \
68 glxconfig.c \
69 glxconfig.h \
70 glxcurrent.c \
71 glx_error.c \
72 glx_error.h \
73 glxext.c \
74 glxextensions.c \
75 glxextensions.h \
76 glxhash.c \
77 glxhash.h \
78 glx_pbuffer.c \
79 glx_query.c \
80 indirect.c \
81 indirect_glx.c \
82 indirect_init.c \
83 indirect_init.h \
84 indirect_size.c \
85 indirect_texture_compression.c \
86 indirect_transpose_matrix.c \
87 indirect_vertex_array.c \
88 indirect_vertex_array.h \
89 indirect_vertex_array_priv.h \
90 indirect_vertex_program.c \
91 indirect_window_pos.c \
92 packrender.h \
93 packsingle.h \
94 pixel.c \
95 pixelstore.c \
96 query_renderer.c \
97 render2.c \
98 renderpix.c \
99 single2.c \
100 singlepix.c \
101 vertarr.c
102
103 libglx_la_LIBADD = $(top_builddir)/src/loader/libloader.la
104
105 if HAVE_DRISW
106 libglx_la_SOURCES += \
107 drisw_glx.c \
108 drisw_priv.h
109 endif
110
111 if HAVE_DRICOMMON
112 libglx_la_SOURCES += \
113 dri_common.c \
114 dri_common.h \
115 dri_common_query_renderer.c \
116 xfont.c
117 endif
118
119 if HAVE_DRI2
120 libglx_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
130 endif
131
132 if HAVE_DRI3
133 libglx_la_SOURCES += \
134 dri3_glx.c \
135 dri3_priv.h
136
137 libglx_la_LIBADD += $(XCB_DRI3_LIBS)
138 endif
139
140 if HAVE_APPLEDRI
141 libglx_la_SOURCES += \
142 applegl_glx.c
143
144 SUBDIRS += apple
145 libglx_la_LIBADD += $(builddir)/apple/libappleglx.la
146 endif
147
148 GL_LIBS = \
149 libglx.la \
150 $(top_builddir)/src/mapi/glapi/libglapi.la \
151 $(SHARED_GLAPI_LIB) \
152 $(GL_LIB_DEPS)
153
154 GL_LDFLAGS = \
155 -no-undefined \
156 -version-number 1:2 \
157 $(BSYMBOLIC) \
158 $(GC_SECTIONS) \
159 $(LD_NO_UNDEFINED)
160
161 lib@GL_LIB@_la_SOURCES =
162 lib@GL_LIB@_la_LIBADD = $(GL_LIBS)
163 lib@GL_LIB@_la_LDFLAGS = $(GL_LDFLAGS)
164
165 SUBDIRS += . tests
166
167 include $(top_srcdir)/install-lib-links.mk