Add DRI2 support. (v2)
[free-sw/xcb/libxcb] / src / Makefile.am
1 lib_LTLIBRARIES = libxcb.la
2
3 EXTHEADERS =    xproto.h \
4                 bigreq.h \
5                 xc_misc.h
6 EXTSOURCES =    xproto.c \
7                 bigreq.c \
8                 xc_misc.c
9 EXTENSION_XML = xproto.xml \
10                 bigreq.xml \
11                 xc_misc.xml
12
13 AM_CFLAGS = $(CWARNFLAGS) $(NEEDED_CFLAGS) $(XDMCP_CFLAGS)
14 libxcb_la_LIBADD = $(NEEDED_LIBS) $(XDMCP_LIBS)
15 libxcb_la_SOURCES = \
16                 xcb_conn.c xcb_out.c xcb_in.c xcb_ext.c xcb_xid.c \
17                 xcb_list.c xcb_util.c xcb_auth.c c_client.py
18 nodist_libxcb_la_SOURCES = xproto.c bigreq.c xc_misc.c
19
20 # Explanation for -version-info:
21 # -version-info current:revision:age
22 # The library supports interface (current-age) to interface current.
23 # * If you changed the source code at all, increment revision.
24 # * If you add an interface, increment current and age and set revision to 0.
25 # * If you change or remove an interface, increment current and set revision
26 #   and age to 0.
27 libxcb_la_LDFLAGS = -version-info 2:0:1 -no-undefined
28
29 XCB_LIBS = libxcb.la
30
31 # FIXME: find a way to autogenerate this from the XML files.
32
33 EXTHEADERS += composite.h
34 EXTSOURCES += composite.c
35 EXTENSION_XML += composite.xml
36 if BUILD_COMPOSITE
37 lib_LTLIBRARIES += libxcb-composite.la
38 libxcb_composite_la_LDFLAGS = -version-info 0:0:0 -no-undefined
39 libxcb_composite_la_LIBADD = $(XCB_LIBS)
40 nodist_libxcb_composite_la_SOURCES = composite.c composite.h
41 endif
42
43 EXTHEADERS += damage.h
44 EXTSOURCES += damage.c
45 EXTENSION_XML += damage.xml
46 if BUILD_DAMAGE
47 lib_LTLIBRARIES += libxcb-damage.la
48 libxcb_damage_la_LDFLAGS = -version-info 0:0:0 -no-undefined
49 libxcb_damage_la_LIBADD = $(XCB_LIBS)
50 nodist_libxcb_damage_la_SOURCES = damage.c damage.h
51 endif
52
53 EXTHEADERS += dpms.h
54 EXTSOURCES += dpms.c
55 EXTENSION_XML += dpms.xml
56 if BUILD_DPMS
57 lib_LTLIBRARIES += libxcb-dpms.la
58 libxcb_dpms_la_LDFLAGS = -version-info 0:0:0 -no-undefined
59 libxcb_dpms_la_LIBADD = $(XCB_LIBS)
60 nodist_libxcb_dpms_la_SOURCES = dpms.c dpms.h
61 endif
62
63 EXTHEADERS += dri2.h
64 EXTSOURCES += dri2.c
65 EXTENSION_XML += dri2.xml
66 if BUILD_DRI2
67 lib_LTLIBRARIES += libxcb-dri2.la
68 libxcb_dri2_la_LDFLAGS = -version-info 0:0:0 -no-undefined
69 libxcb_dri2_la_LIBADD = $(XCB_LIBS)
70 nodist_libxcb_dri2_la_SOURCES = dri2.c dri2.h
71 endif
72
73 EXTHEADERS += glx.h
74 EXTSOURCES += glx.c
75 EXTENSION_XML += glx.xml
76 if BUILD_GLX
77 lib_LTLIBRARIES += libxcb-glx.la
78 libxcb_glx_la_LDFLAGS = -version-info 0:0:0 -no-undefined
79 libxcb_glx_la_LIBADD = $(XCB_LIBS)
80 nodist_libxcb_glx_la_SOURCES = glx.c glx.h
81 endif
82
83 EXTHEADERS += randr.h
84 EXTSOURCES += randr.c
85 EXTENSION_XML += randr.xml
86 if BUILD_RANDR
87 lib_LTLIBRARIES += libxcb-randr.la
88 libxcb_randr_la_LDFLAGS = -version-info 1:0:1 -no-undefined
89 libxcb_randr_la_LIBADD = $(XCB_LIBS)
90 nodist_libxcb_randr_la_SOURCES = randr.c randr.h
91 endif
92
93 EXTHEADERS += record.h
94 EXTSOURCES += record.c
95 EXTENSION_XML += record.xml
96 if BUILD_RECORD
97 lib_LTLIBRARIES += libxcb-record.la
98 libxcb_record_la_LDFLAGS = -version-info 0:0:0 -no-undefined
99 libxcb_record_la_LIBADD = $(XCB_LIBS)
100 nodist_libxcb_record_la_SOURCES = record.c record.h
101 endif
102
103 EXTHEADERS += render.h
104 EXTSOURCES += render.c
105 EXTENSION_XML += render.xml
106 if BUILD_RENDER
107 lib_LTLIBRARIES += libxcb-render.la
108 libxcb_render_la_LDFLAGS = -version-info 0:0:0 -no-undefined
109 libxcb_render_la_LIBADD = $(XCB_LIBS)
110 nodist_libxcb_render_la_SOURCES = render.c render.h
111 endif
112
113 EXTHEADERS += res.h
114 EXTSOURCES += res.c
115 EXTENSION_XML += res.xml
116 if BUILD_RESOURCE
117 lib_LTLIBRARIES += libxcb-res.la
118 libxcb_res_la_LDFLAGS = -version-info 0:0:0 -no-undefined
119 libxcb_res_la_LIBADD = $(XCB_LIBS)
120 nodist_libxcb_res_la_SOURCES = res.c res.h
121 endif
122
123 EXTHEADERS += screensaver.h
124 EXTSOURCES += screensaver.c
125 EXTENSION_XML += screensaver.xml
126 if BUILD_SCREENSAVER
127 lib_LTLIBRARIES += libxcb-screensaver.la
128 libxcb_screensaver_la_LDFLAGS = -version-info 0:0:0 -no-undefined
129 libxcb_screensaver_la_LIBADD = $(XCB_LIBS)
130 nodist_libxcb_screensaver_la_SOURCES = screensaver.c screensaver.h
131 endif
132
133 EXTHEADERS += shape.h
134 EXTSOURCES += shape.c
135 EXTENSION_XML += shape.xml
136 if BUILD_SHAPE
137 lib_LTLIBRARIES += libxcb-shape.la
138 libxcb_shape_la_LDFLAGS = -version-info 0:0:0 -no-undefined
139 libxcb_shape_la_LIBADD = $(XCB_LIBS)
140 nodist_libxcb_shape_la_SOURCES = shape.c shape.h
141 endif
142
143 EXTHEADERS += shm.h
144 EXTSOURCES += shm.c
145 EXTENSION_XML += shm.xml
146 if BUILD_SHM
147 lib_LTLIBRARIES += libxcb-shm.la
148 libxcb_shm_la_LDFLAGS = -version-info 0:0:0 -no-undefined
149 libxcb_shm_la_LIBADD = $(XCB_LIBS)
150 nodist_libxcb_shm_la_SOURCES = shm.c shm.h
151 endif
152
153 EXTHEADERS += sync.h
154 EXTSOURCES += sync.c
155 EXTENSION_XML += sync.xml
156 if BUILD_SYNC
157 lib_LTLIBRARIES += libxcb-sync.la
158 libxcb_sync_la_LDFLAGS = -version-info 0:0:0 -no-undefined
159 libxcb_sync_la_LIBADD = $(XCB_LIBS)
160 nodist_libxcb_sync_la_SOURCES = sync.c sync.h
161 endif
162
163 EXTHEADERS += xevie.h
164 EXTSOURCES += xevie.c
165 EXTENSION_XML += xevie.xml
166 if BUILD_XEVIE
167 lib_LTLIBRARIES += libxcb-xevie.la
168 libxcb_xevie_la_LDFLAGS = -version-info 0:0:0 -no-undefined
169 libxcb_xevie_la_LIBADD = $(XCB_LIBS)
170 nodist_libxcb_xevie_la_SOURCES = xevie.c xevie.h
171 endif
172
173 EXTHEADERS += xf86dri.h
174 EXTSOURCES += xf86dri.c
175 EXTENSION_XML += xf86dri.xml
176 if BUILD_XFREE86_DRI
177 lib_LTLIBRARIES += libxcb-xf86dri.la
178 libxcb_xf86dri_la_LDFLAGS = -version-info 0:0:0 -no-undefined
179 libxcb_xf86dri_la_LIBADD = $(XCB_LIBS)
180 nodist_libxcb_xf86dri_la_SOURCES = xf86dri.c xf86dri.h
181 endif
182
183 EXTHEADERS += xfixes.h
184 EXTSOURCES += xfixes.c
185 EXTENSION_XML += xfixes.xml
186 if BUILD_XFIXES
187 lib_LTLIBRARIES += libxcb-xfixes.la
188 libxcb_xfixes_la_LDFLAGS = -version-info 0:0:0 -no-undefined
189 libxcb_xfixes_la_LIBADD = $(XCB_LIBS)
190 nodist_libxcb_xfixes_la_SOURCES = xfixes.c xfixes.h
191 endif
192
193 EXTHEADERS += xinerama.h
194 EXTSOURCES += xinerama.c
195 EXTENSION_XML += xinerama.xml
196 if BUILD_XINERAMA
197 lib_LTLIBRARIES += libxcb-xinerama.la
198 libxcb_xinerama_la_LDFLAGS = -version-info 0:0:0 -no-undefined
199 libxcb_xinerama_la_LIBADD = $(XCB_LIBS)
200 nodist_libxcb_xinerama_la_SOURCES = xinerama.c xinerama.h
201 endif
202
203 EXTHEADERS += xinput.h
204 EXTSOURCES += xinput.c
205 EXTENSION_XML += xinput.xml
206 if BUILD_XINPUT
207 lib_LTLIBRARIES += libxcb-xinput.la
208 libxcb_xinput_la_LDFLAGS = -version-info 0:0:0 -no-undefined
209 libxcb_xinput_la_LIBADD = $(XCB_LIBS)
210 nodist_libxcb_xinput_la_SOURCES = xinput.c xinput.h
211 endif
212
213 EXTHEADERS += xprint.h
214 EXTSOURCES += xprint.c
215 EXTENSION_XML += xprint.xml
216 if BUILD_XPRINT
217 lib_LTLIBRARIES += libxcb-xprint.la
218 libxcb_xprint_la_LDFLAGS = -version-info 0:0:0 -no-undefined
219 libxcb_xprint_la_LIBADD = $(XCB_LIBS)
220 nodist_libxcb_xprint_la_SOURCES = xprint.c xprint.h
221 endif
222
223 EXTHEADERS += xselinux.h
224 EXTSOURCES += xselinux.c
225 EXTENSION_XML += xselinux.xml
226 if BUILD_SELINUX
227 lib_LTLIBRARIES += libxcb-xselinux.la
228 libxcb_xselinux_la_LDFLAGS = -version-info 0:0:0 -no-undefined
229 libxcb_xselinux_la_LIBADD = $(XCB_LIBS)
230 nodist_libxcb_xselinux_la_SOURCES = xselinux.c xselinux.h
231 endif
232
233 EXTHEADERS += xtest.h
234 EXTSOURCES += xtest.c
235 EXTENSION_XML += xtest.xml
236 if BUILD_XTEST
237 lib_LTLIBRARIES += libxcb-xtest.la
238 libxcb_xtest_la_LDFLAGS = -version-info 0:0:0 -no-undefined
239 libxcb_xtest_la_LIBADD = $(XCB_LIBS)
240 nodist_libxcb_xtest_la_SOURCES = xtest.c xtest.h
241 endif
242
243 EXTHEADERS += xv.h
244 EXTSOURCES += xv.c
245 EXTENSION_XML += xv.xml
246 if BUILD_XV
247 lib_LTLIBRARIES += libxcb-xv.la
248 libxcb_xv_la_LDFLAGS = -version-info 0:0:0 -no-undefined
249 libxcb_xv_la_LIBADD = $(XCB_LIBS)
250 nodist_libxcb_xv_la_SOURCES = xv.c xv.h
251 endif
252
253 EXTHEADERS += xvmc.h
254 EXTSOURCES += xvmc.c
255 EXTENSION_XML += xvmc.xml
256 if BUILD_XVMC
257 lib_LTLIBRARIES += libxcb-xvmc.la
258 libxcb_xvmc_la_LDFLAGS = -version-info 0:0:0 -no-undefined
259 libxcb_xvmc_la_LIBADD = $(XCB_LIBS)
260 nodist_libxcb_xvmc_la_SOURCES = xvmc.c xvmc.h
261 endif
262
263
264
265 xcbinclude_HEADERS = xcb.h xcbext.h
266 nodist_xcbinclude_HEADERS = $(EXTHEADERS)
267 noinst_HEADERS = xcbint.h
268
269 BUILT_SOURCES = $(EXTSOURCES) $(EXTHEADERS)
270 CLEANFILES = $(EXTSOURCES) $(EXTHEADERS) $(EXTENSION_XML)
271
272 $(EXTHEADERS) $(EXTSOURCES): c_client.py
273
274 SUFFIXES = .xml
275
276 .xml.h:
277         $(PYTHON) $(srcdir)/c_client.py -p $(XCBPROTO_XCBPYTHONDIR) $(XCBPROTO_XCBINCLUDEDIR)/$<
278
279 .xml.c:
280         $(PYTHON) $(srcdir)/c_client.py -p $(XCBPROTO_XCBPYTHONDIR) $(XCBPROTO_XCBINCLUDEDIR)/$<
281
282 $(EXTENSION_XML):
283         $(LN_S) -f $(XCBPROTO_XCBINCLUDEDIR)/$@ $@