• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1if BUILD_DOCS
2SUBDIRS = doc
3endif
4
5ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
6
7AM_CPPFLAGS =					\
8	-I$(top_builddir)/src			\
9	-I$(top_srcdir)/src			\
10	-I$(top_builddir)/protocol
11
12AM_CFLAGS = $(GCC_CFLAGS)
13
14aclocaldir = $(datadir)/aclocal
15dist_aclocal_DATA = wayland-scanner.m4
16
17dist_pkgdata_DATA =				\
18	wayland-scanner.mk			\
19	protocol/wayland.xml			\
20	protocol/wayland.dtd
21
22pkgconfigdir = $(libdir)/pkgconfig
23pkgconfig_DATA =
24
25bin_PROGRAMS = wayland-scanner
26wayland_scanner_SOURCES = src/scanner.c
27wayland_scanner_CFLAGS = $(EXPAT_CFLAGS) $(LIBXML_CFLAGS) $(AM_CFLAGS)
28wayland_scanner_LDADD = $(EXPAT_LIBS) $(LIBXML_LIBS) libwayland-util.la
29pkgconfig_DATA += src/wayland-scanner.pc
30
31if DTD_VALIDATION
32wayland_scanner_SOURCES += src/dtddata.S
33endif
34src/dtddata.o: protocol/wayland.dtd
35
36if USE_HOST_SCANNER
37wayland_scanner = wayland-scanner
38else
39$(BUILT_SOURCES) : wayland-scanner
40wayland_scanner = $(top_builddir)/wayland-scanner
41endif
42
43libwayland_util_la_CFLAGS = $(AM_CFLAGS)
44libwayland_util_la_SOURCES =			\
45	src/wayland-util.c			\
46	src/wayland-util.h
47
48noinst_LTLIBRARIES = libwayland-util.la
49
50if ENABLE_LIBRARIES
51noinst_LTLIBRARIES += libwayland-private.la
52lib_LTLIBRARIES = libwayland-server.la libwayland-client.la
53
54libwayland_private_la_CFLAGS = $(FFI_CFLAGS) $(AM_CFLAGS)
55libwayland_private_la_SOURCES =			\
56	src/connection.c			\
57	src/wayland-os.c			\
58	src/wayland-os.h			\
59	src/wayland-private.h
60
61include_HEADERS =				\
62	src/wayland-util.h			\
63	src/wayland-server.h			\
64	src/wayland-server-core.h		\
65	src/wayland-client.h			\
66	src/wayland-client-core.h		\
67	src/wayland-egl.h			\
68	src/wayland-egl-core.h			\
69	src/wayland-version.h
70
71nodist_include_HEADERS =			\
72	protocol/wayland-server-protocol.h	\
73	protocol/wayland-client-protocol.h
74
75libwayland_server_la_CFLAGS = $(FFI_CFLAGS) $(AM_CFLAGS) -pthread
76libwayland_server_la_LIBADD = $(FFI_LIBS) libwayland-private.la libwayland-util.la -lrt -lm
77libwayland_server_la_LDFLAGS = -version-info 1:0:1
78libwayland_server_la_SOURCES =			\
79	src/wayland-server.c			\
80	src/wayland-shm.c			\
81	src/event-loop.c
82
83nodist_libwayland_server_la_SOURCES =		\
84	protocol/wayland-server-protocol.h	\
85	protocol/wayland-protocol.c
86
87libwayland_client_la_CFLAGS = $(FFI_CFLAGS) $(AM_CFLAGS) -pthread
88libwayland_client_la_LIBADD = $(FFI_LIBS) libwayland-private.la libwayland-util.la -lrt -lm
89libwayland_client_la_LDFLAGS = -version-info 3:0:3
90libwayland_client_la_SOURCES =			\
91	src/wayland-client.c
92
93nodist_libwayland_client_la_SOURCES =		\
94	protocol/wayland-client-protocol.h	\
95	protocol/wayland-protocol.c
96
97pkgconfig_DATA += src/wayland-client.pc src/wayland-server.pc
98
99protocol/%-protocol.c : $(top_srcdir)/protocol/%.xml
100	$(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) code < $< > $@
101
102protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml
103	$(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header < $< > $@
104
105protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml
106	$(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@
107
108protocol/%-server-protocol-core.h : $(top_srcdir)/protocol/%.xml
109	$(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) server-header -c < $< > $@
110
111protocol/%-client-protocol-core.h : $(top_srcdir)/protocol/%.xml
112	$(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header -c < $< > $@
113
114BUILT_SOURCES =					\
115	$(nodist_libwayland_server_la_SOURCES)	\
116	$(nodist_libwayland_client_la_SOURCES)	\
117	$(nodist_headers_test_SOURCES)
118
119CLEANFILES = $(BUILT_SOURCES) doc/doxygen/doxygen_sqlite3.db
120DISTCLEANFILES = src/wayland-version.h
121EXTRA_DIST = src/wayland-version.h.in
122
123
124
125lib_LTLIBRARIES += libwayland-cursor.la
126
127include_HEADERS += cursor/wayland-cursor.h
128
129libwayland_cursor_la_SOURCES =			\
130	cursor/wayland-cursor.c			\
131	cursor/os-compatibility.c		\
132	cursor/os-compatibility.h		\
133	cursor/cursor-data.h			\
134	cursor/xcursor.c			\
135	cursor/xcursor.h
136libwayland_cursor_la_LIBADD = libwayland-client.la
137
138pkgconfig_DATA += cursor/wayland-cursor.pc
139
140libwayland_cursor_la_CFLAGS =			\
141	$(AM_CFLAGS)				\
142	-I$(top_builddir)/src			\
143	-I$(top_srcdir)/src			\
144	-DICONDIR=\"$(ICONDIR)\"
145
146
147built_test_programs =				\
148	array-test				\
149	client-test				\
150	display-test				\
151	connection-test				\
152	event-loop-test				\
153	fixed-test				\
154	list-test				\
155	map-test				\
156	os-wrappers-test			\
157	sanity-test				\
158	socket-test				\
159	queue-test				\
160	signal-test				\
161	resources-test				\
162	message-test				\
163	headers-test				\
164	compositor-introspection-test		\
165	protocol-logger-test
166
167if ENABLE_CPP_TEST
168built_test_programs += cpp-compile-test
169endif
170
171TESTS = $(built_test_programs)
172
173check_PROGRAMS =				\
174	$(built_test_programs)			\
175	exec-fd-leak-checker
176
177noinst_PROGRAMS =				\
178	fixed-benchmark
179
180check_LTLIBRARIES = libtest-runner.la
181
182libtest_runner_la_SOURCES =			\
183	tests/test-runner.c			\
184	tests/test-runner.h			\
185	tests/test-helpers.c			\
186	tests/test-compositor.h			\
187	tests/test-compositor.c
188libtest_runner_la_LIBADD =			\
189	libwayland-private.la			\
190	libwayland-util.la			\
191	libwayland-client.la			\
192	libwayland-server.la			\
193	-lrt -ldl $(FFI_LIBS)
194
195
196array_test_SOURCES = tests/array-test.c
197array_test_LDADD = libtest-runner.la
198client_test_SOURCES = tests/client-test.c
199client_test_LDADD = libtest-runner.la
200display_test_SOURCES = tests/display-test.c
201display_test_LDADD = libtest-runner.la
202connection_test_SOURCES = tests/connection-test.c
203connection_test_LDADD = libtest-runner.la
204event_loop_test_SOURCES = tests/event-loop-test.c
205event_loop_test_LDADD = libtest-runner.la
206fixed_test_SOURCES = tests/fixed-test.c
207fixed_test_LDADD = libtest-runner.la
208list_test_SOURCES = tests/list-test.c
209list_test_LDADD = libtest-runner.la
210map_test_SOURCES = tests/map-test.c
211map_test_LDADD = libtest-runner.la
212sanity_test_SOURCES = tests/sanity-test.c
213sanity_test_LDADD = libtest-runner.la
214socket_test_SOURCES = tests/socket-test.c
215socket_test_LDADD = libtest-runner.la
216queue_test_SOURCES = tests/queue-test.c
217queue_test_LDADD = libtest-runner.la
218signal_test_SOURCES = tests/signal-test.c
219signal_test_LDADD = libtest-runner.la
220resources_test_SOURCES = tests/resources-test.c
221resources_test_LDADD = libtest-runner.la
222message_test_SOURCES = tests/message-test.c
223message_test_LDADD = libtest-runner.la
224compositor_introspection_test_SOURCES = tests/compositor-introspection-test.c
225compositor_introspection_test_LDADD = libtest-runner.la
226protocol_logger_test_SOURCES = tests/protocol-logger-test.c
227protocol_logger_test_LDADD = libtest-runner.la
228headers_test_SOURCES = tests/headers-test.c \
229		       tests/headers-protocol-test.c \
230		       tests/headers-protocol-core-test.c
231headers_test_LDADD = libtest-runner.la
232nodist_headers_test_SOURCES =			\
233	protocol/wayland-server-protocol-core.h	\
234	protocol/wayland-client-protocol-core.h
235
236if ENABLE_CPP_TEST
237cpp_compile_test_SOURCES = tests/cpp-compile-test.cpp
238endif
239
240fixed_benchmark_SOURCES = tests/fixed-benchmark.c
241fixed_benchmark_LDADD = libtest-runner.la
242
243os_wrappers_test_SOURCES = tests/os-wrappers-test.c
244os_wrappers_test_LDADD = libtest-runner.la
245
246exec_fd_leak_checker_SOURCES = tests/exec-fd-leak-checker.c
247exec_fd_leak_checker_LDADD = libtest-runner.la
248endif #ENABLE_LIBRARIES
249