Makefile.am 9.81 KB
Newer Older
1
if BUILD_DOCS
2
SUBDIRS = doc
3
4
endif

5
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
6

7
8
9
10
11
AM_CPPFLAGS =					\
	-I$(top_builddir)/src			\
	-I$(top_srcdir)/src			\
	-I$(top_builddir)/protocol

12
AM_CFLAGS = $(GCC_CFLAGS)
13

14
aclocaldir = $(datadir)/aclocal
Daiki Ueno's avatar
Daiki Ueno committed
15
dist_aclocal_DATA = wayland-scanner.m4
16

17
18
dist_pkgdata_DATA =				\
	wayland-scanner.mk			\
19
20
	protocol/wayland.xml			\
	protocol/wayland.dtd
21

22
23
24
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA =

25
bin_PROGRAMS = wayland-scanner
26
wayland_scanner_SOURCES = src/scanner.c
27
wayland_scanner_CPPFLAGS = $(AM_CPPFLAGS) -include config.h
28
29
wayland_scanner_CFLAGS = $(EXPAT_CFLAGS) $(LIBXML_CFLAGS) $(AM_CFLAGS)
wayland_scanner_LDADD = $(EXPAT_LIBS) $(LIBXML_LIBS) libwayland-util.la
30
pkgconfig_DATA += src/wayland-scanner.pc
31

32
33
34
if DTD_VALIDATION
wayland_scanner_SOURCES += src/dtddata.S
endif
35
36
src/dtddata.o: protocol/wayland.dtd

37
if USE_HOST_SCANNER
38
wayland_scanner = wayland-scanner
39
40
41
else
$(BUILT_SOURCES) : wayland-scanner
wayland_scanner = $(top_builddir)/wayland-scanner
42
43
endif

44
libwayland_util_la_CFLAGS = $(AM_CFLAGS)
45
46
libwayland_util_la_SOURCES =			\
	src/wayland-util.c			\
47
	src/wayland-util.h
48

49
50
noinst_LTLIBRARIES = libwayland-util.la

51
if ENABLE_LIBRARIES
52
noinst_LTLIBRARIES += libwayland-private.la
53
54
lib_LTLIBRARIES = libwayland-server.la libwayland-client.la

55
56
libwayland_private_la_CFLAGS = $(FFI_CFLAGS) $(AM_CFLAGS)
libwayland_private_la_SOURCES =			\
57
58
59
	src/connection.c			\
	src/wayland-os.c			\
	src/wayland-os.h			\
60
61
	src/wayland-private.h			\
	src/wayland-server-private.h
62

63
64
65
include_HEADERS =				\
	src/wayland-util.h			\
	src/wayland-server.h			\
66
	src/wayland-server-core.h		\
67
	src/wayland-client.h			\
68
	src/wayland-client-core.h		\
69
70
	src/wayland-version.h

71
72
73
74
nodist_include_HEADERS =			\
	protocol/wayland-server-protocol.h	\
	protocol/wayland-client-protocol.h

75
libwayland_server_la_CFLAGS = $(FFI_CFLAGS) $(AM_CFLAGS) -pthread
76
libwayland_server_la_LIBADD = $(FFI_LIBS) libwayland-private.la libwayland-util.la $(RT_LIBS) -lm
77
78
79
80
81
82
83
libwayland_server_la_LDFLAGS = -version-info 1:0:1
libwayland_server_la_SOURCES =			\
	src/wayland-server.c			\
	src/wayland-shm.c			\
	src/event-loop.c

nodist_libwayland_server_la_SOURCES =		\
84
	protocol/wayland-server-protocol.h	\
85
86
	protocol/wayland-protocol.c

87
libwayland_client_la_CFLAGS = $(FFI_CFLAGS) $(AM_CFLAGS) -pthread
88
libwayland_client_la_LIBADD = $(FFI_LIBS) libwayland-private.la libwayland-util.la $(RT_LIBS) -lm
Marek Chalupa's avatar
Marek Chalupa committed
89
libwayland_client_la_LDFLAGS = -version-info 3:0:3
90
91
92
93
libwayland_client_la_SOURCES =			\
	src/wayland-client.c

nodist_libwayland_client_la_SOURCES =		\
94
	protocol/wayland-client-protocol.h	\
95
96
97
98
99
	protocol/wayland-protocol.c

pkgconfig_DATA += src/wayland-client.pc src/wayland-server.pc

protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
100
if USE_HOST_SCANNER
101
	$(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) -s code $< $@
102
else
103
	$(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) -s public-code $< $@
104
endif
105
106

protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
107
	$(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) -s server-header $< $@
108

109
protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
110
	$(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) -s client-header $< $@
111

Giulio Camuffo's avatar
Giulio Camuffo committed
112
protocol/%-server-protocol-core.h : $(top_srcdir)/protocol/%.xml
113
	$(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) -s server-header -c < $< > $@
Giulio Camuffo's avatar
Giulio Camuffo committed
114
115

protocol/%-client-protocol-core.h : $(top_srcdir)/protocol/%.xml
116
	$(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) -s client-header -c < $< > $@
Giulio Camuffo's avatar
Giulio Camuffo committed
117

118
119
BUILT_SOURCES =					\
	$(nodist_libwayland_server_la_SOURCES)	\
Giulio Camuffo's avatar
Giulio Camuffo committed
120
	$(nodist_libwayland_client_la_SOURCES)	\
121
122
	$(nodist_headers_test_SOURCES)		\
	$(nodist_display_test_SOURCES)
123

124
CLEANFILES = $(BUILT_SOURCES) doc/doxygen/doxygen_sqlite3.db
125
DISTCLEANFILES = src/wayland-version.h
Pekka Paalanen's avatar
Pekka Paalanen committed
126
EXTRA_DIST = CONTRIBUTING.md
127
128
129
130
131
132



lib_LTLIBRARIES += libwayland-cursor.la

include_HEADERS += cursor/wayland-cursor.h
133
134
135
136
137
138
139
140

libwayland_cursor_la_SOURCES =			\
	cursor/wayland-cursor.c			\
	cursor/os-compatibility.c		\
	cursor/os-compatibility.h		\
	cursor/cursor-data.h			\
	cursor/xcursor.c			\
	cursor/xcursor.h
141
libwayland_cursor_la_LIBADD = libwayland-client.la
142

143
pkgconfig_DATA += cursor/wayland-cursor.pc
144
145

libwayland_cursor_la_CFLAGS =			\
146
	$(AM_CFLAGS)				\
147
148
149
	-I$(top_builddir)/src			\
	-I$(top_srcdir)/src			\
	-DICONDIR=\"$(ICONDIR)\"
150

Emil Velikov's avatar
Emil Velikov committed
151
152
lib_LTLIBRARIES += libwayland-egl.la

153
154
155
include_HEADERS += egl/wayland-egl.h
include_HEADERS += egl/wayland-egl-core.h

Emil Velikov's avatar
Emil Velikov committed
156
157
158
159
160
161
162
163
libwayland_egl_la_SOURCES = egl/wayland-egl.c
libwayland_egl_la_LDFLAGS = -version-info 1

pkgconfig_DATA += egl/wayland-egl.pc

## XXX: backend interface
include_HEADERS += egl/wayland-egl-backend.h
pkgconfig_DATA += egl/wayland-egl-backend.pc
164

165
built_test_programs =				\
166
167
168
169
170
171
	array-test				\
	client-test				\
	display-test				\
	connection-test				\
	event-loop-test				\
	fixed-test				\
Yong Bakos's avatar
Yong Bakos committed
172
	interface-test				\
173
174
175
176
177
178
	list-test				\
	map-test				\
	os-wrappers-test			\
	sanity-test				\
	socket-test				\
	queue-test				\
179
	proxy-test				\
180
	signal-test				\
181
	newsignal-test				\
182
	resources-test				\
Giulio Camuffo's avatar
Giulio Camuffo committed
183
	message-test				\
184
	headers-test				\
185
	compositor-introspection-test		\
Emil Velikov's avatar
Emil Velikov committed
186
187
188
189
190
191
192
	protocol-logger-test			\
	wayland-egl-abi-check

EXTRA_DIST += egl/wayland-egl-symbols-check

check_PROGRAMS = wayland-egl-abi-check
wayland_egl_abi_check_SOURCES = egl/wayland-egl-abi-check.c
193

Mariusz Ceier's avatar
Mariusz Ceier committed
194
if ENABLE_CPP_TEST
195
built_test_programs += cpp-compile-test
Mariusz Ceier's avatar
Mariusz Ceier committed
196
197
endif

Pekka Paalanen's avatar
Pekka Paalanen committed
198
199
200
201
AM_TESTS_ENVIRONMENT =							\
	export WAYLAND_SCANNER='$(top_builddir)/wayland-scanner'	\
	TEST_DATA_DIR='$(top_srcdir)/tests/data'			\
	TEST_OUTPUT_DIR='$(top_builddir)/tests/output'			\
202
	WAYLAND_EGL_LIB='$(top_builddir)/.libs/libwayland-egl.so'	\
Pekka Paalanen's avatar
Pekka Paalanen committed
203
	SED=$(SED)							\
204
	NM='$(NM)'							\
Pekka Paalanen's avatar
Pekka Paalanen committed
205
206
207
	;

TESTS = $(built_test_programs)			\
Emil Velikov's avatar
Emil Velikov committed
208
	egl/wayland-egl-symbols-check		\
Pekka Paalanen's avatar
Pekka Paalanen committed
209
	tests/scanner-test.sh
210

211
noinst_PROGRAMS =				\
212
213
	$(built_test_programs)			\
	exec-fd-leak-checker			\
214
215
	fixed-benchmark

216
217
218
219
220
noinst_LTLIBRARIES +=				\
	libtest-runner.la			\
	libtest-helpers.la

libtest_helpers_la_SOURCES = tests/test-helpers.c
221
222
223
224

libtest_runner_la_SOURCES =			\
	tests/test-runner.c			\
	tests/test-runner.h			\
Marek Chalupa's avatar
Marek Chalupa committed
225
226
	tests/test-compositor.h			\
	tests/test-compositor.c
227
libtest_runner_la_LIBADD =			\
228
	libwayland-private.la			\
229
230
231
	libwayland-util.la			\
	libwayland-client.la			\
	libwayland-server.la			\
232
	libtest-helpers.la			\
233
	$(RT_LIBS) $(DL_LIBS) $(FFI_LIBS)
234
235
236
237
238

array_test_SOURCES = tests/array-test.c
array_test_LDADD = libtest-runner.la
client_test_SOURCES = tests/client-test.c
client_test_LDADD = libtest-runner.la
239
display_test_CFLAGS = -pthread
240
241
display_test_SOURCES = tests/display-test.c
display_test_LDADD = libtest-runner.la
242
243
244
245
nodist_display_test_SOURCES =				\
	protocol/tests-server-protocol.h		\
	protocol/tests-client-protocol.h 		\
	protocol/tests-protocol.c
246
247
248
249
250
251
connection_test_SOURCES = tests/connection-test.c
connection_test_LDADD = libtest-runner.la
event_loop_test_SOURCES = tests/event-loop-test.c
event_loop_test_LDADD = libtest-runner.la
fixed_test_SOURCES = tests/fixed-test.c
fixed_test_LDADD = libtest-runner.la
Yong Bakos's avatar
Yong Bakos committed
252
253
interface_test_SOURCES = tests/interface-test.c
interface_test_LDADD = libtest-runner.la
254
255
256
257
258
259
260
261
262
263
list_test_SOURCES = tests/list-test.c
list_test_LDADD = libtest-runner.la
map_test_SOURCES = tests/map-test.c
map_test_LDADD = libtest-runner.la
sanity_test_SOURCES = tests/sanity-test.c
sanity_test_LDADD = libtest-runner.la
socket_test_SOURCES = tests/socket-test.c
socket_test_LDADD = libtest-runner.la
queue_test_SOURCES = tests/queue-test.c
queue_test_LDADD = libtest-runner.la
264
265
proxy_test_SOURCES = tests/proxy-test.c
proxy_test_LDADD = libtest-runner.la
266
267
signal_test_SOURCES = tests/signal-test.c
signal_test_LDADD = libtest-runner.la
268
269
270
# wayland-server.c is needed here to access wl_priv_* functions
newsignal_test_SOURCES = tests/newsignal-test.c src/wayland-server.c
newsignal_test_LDADD = libtest-runner.la
271
272
resources_test_SOURCES = tests/resources-test.c
resources_test_LDADD = libtest-runner.la
273
274
message_test_SOURCES = tests/message-test.c
message_test_LDADD = libtest-runner.la
275
276
compositor_introspection_test_SOURCES = tests/compositor-introspection-test.c
compositor_introspection_test_LDADD = libtest-runner.la
277
278
protocol_logger_test_SOURCES = tests/protocol-logger-test.c
protocol_logger_test_LDADD = libtest-runner.la
Giulio Camuffo's avatar
Giulio Camuffo committed
279
280
281
282
283
284
headers_test_SOURCES = tests/headers-test.c \
		       tests/headers-protocol-test.c \
		       tests/headers-protocol-core-test.c
nodist_headers_test_SOURCES =			\
	protocol/wayland-server-protocol-core.h	\
	protocol/wayland-client-protocol-core.h
285

Mariusz Ceier's avatar
Mariusz Ceier committed
286
287
288
289
if ENABLE_CPP_TEST
cpp_compile_test_SOURCES = tests/cpp-compile-test.cpp
endif

290
fixed_benchmark_SOURCES = tests/fixed-benchmark.c
291
fixed_benchmark_LDADD = $(RT_LIBS)
292
293
294
295
296

os_wrappers_test_SOURCES = tests/os-wrappers-test.c
os_wrappers_test_LDADD = libtest-runner.la

exec_fd_leak_checker_SOURCES = tests/exec-fd-leak-checker.c
297
exec_fd_leak_checker_LDADD = libtest-helpers.la
Pekka Paalanen's avatar
Pekka Paalanen committed
298

Emil Velikov's avatar
Emil Velikov committed
299
EXTRA_DIST += tests/scanner-test.sh			\
300
	protocol/tests.xml				\
301
302
303
304
305
306
307
	tests/data/bad-identifier-arg.xml		\
	tests/data/bad-identifier-entry.xml		\
	tests/data/bad-identifier-enum.xml		\
	tests/data/bad-identifier-event.xml		\
	tests/data/bad-identifier-interface.xml		\
	tests/data/bad-identifier-protocol.xml		\
	tests/data/bad-identifier-request.xml		\
Pekka Paalanen's avatar
Pekka Paalanen committed
308
309
310
311
312
313
314
315
316
317
	tests/data/example.xml				\
	tests/data/example-client.h			\
	tests/data/example-server.h			\
	tests/data/example-code.c			\
	tests/data/small.xml				\
	tests/data/small-code.c				\
	tests/data/small-client.h			\
	tests/data/small-server.h			\
	tests/data/small-code-core.c			\
	tests/data/small-client-core.h			\
318
	tests/data/small-server-core.h			\
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
	tests/data/small-private-code.c			\
	meson.build					\
	meson_options.txt				\
	cursor/meson.build				\
	doc/meson.build					\
	doc/doxygen/mainpage.dox			\
	doc/doxygen/meson.build				\
	doc/doxygen/gen-doxygen.py			\
	doc/doxygen/xml/meson.build			\
	doc/doxygen/xml/Client/meson.build		\
	doc/doxygen/xml/Server/meson.build		\
	doc/publican/meson.build			\
	doc/publican/sources/meson.build		\
	egl/meson.build					\
	src/meson.build					\
	tests/meson.build
Pekka Paalanen's avatar
Pekka Paalanen committed
335
336
337
338
339
340

tests/scanner-test.sh: $(top_builddir)/wayland-scanner

clean-local:
	-rm -rf tests/output

341
endif #ENABLE_LIBRARIES