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_CPPFLAGS = $(AM_CPPFLAGS) -include config.h 28wayland_scanner_CFLAGS = $(EXPAT_CFLAGS) $(LIBXML_CFLAGS) $(AM_CFLAGS) 29wayland_scanner_LDADD = $(EXPAT_LIBS) $(LIBXML_LIBS) libwayland-util.la 30pkgconfig_DATA += src/wayland-scanner.pc 31 32if DTD_VALIDATION 33wayland_scanner_SOURCES += src/dtddata.S 34endif 35src/dtddata.o: protocol/wayland.dtd 36 37if USE_HOST_SCANNER 38wayland_scanner = wayland-scanner 39else 40$(BUILT_SOURCES) : wayland-scanner 41wayland_scanner = $(top_builddir)/wayland-scanner 42endif 43 44libwayland_util_la_CFLAGS = $(AM_CFLAGS) 45libwayland_util_la_SOURCES = \ 46 src/wayland-util.c \ 47 src/wayland-util.h 48 49noinst_LTLIBRARIES = libwayland-util.la 50 51if ENABLE_LIBRARIES 52noinst_LTLIBRARIES += libwayland-private.la 53lib_LTLIBRARIES = libwayland-server.la libwayland-client.la 54 55libwayland_private_la_CFLAGS = $(FFI_CFLAGS) $(AM_CFLAGS) 56libwayland_private_la_SOURCES = \ 57 src/connection.c \ 58 src/wayland-os.c \ 59 src/wayland-os.h \ 60 src/wayland-private.h \ 61 src/wayland-server-private.h 62 63include_HEADERS = \ 64 src/wayland-util.h \ 65 src/wayland-server.h \ 66 src/wayland-server-core.h \ 67 src/wayland-client.h \ 68 src/wayland-client-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 $(RT_LIBS) -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 $(RT_LIBS) -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 100if USE_HOST_SCANNER 101 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) -s code $< $@ 102else 103 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) -s public-code $< $@ 104endif 105 106protocol/%-server-protocol.h : $(top_srcdir)/protocol/%.xml 107 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) -s server-header $< $@ 108 109protocol/%-client-protocol.h : $(top_srcdir)/protocol/%.xml 110 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) -s client-header $< $@ 111 112protocol/%-server-protocol-core.h : $(top_srcdir)/protocol/%.xml 113 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) -s server-header -c < $< > $@ 114 115protocol/%-client-protocol-core.h : $(top_srcdir)/protocol/%.xml 116 $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) -s client-header -c < $< > $@ 117 118BUILT_SOURCES = \ 119 $(nodist_libwayland_server_la_SOURCES) \ 120 $(nodist_libwayland_client_la_SOURCES) \ 121 $(nodist_headers_test_SOURCES) \ 122 $(nodist_display_test_SOURCES) 123 124CLEANFILES = $(BUILT_SOURCES) doc/doxygen/doxygen_sqlite3.db 125DISTCLEANFILES = src/wayland-version.h 126EXTRA_DIST = CONTRIBUTING.md 127 128 129 130lib_LTLIBRARIES += libwayland-cursor.la 131 132include_HEADERS += cursor/wayland-cursor.h 133 134libwayland_cursor_la_SOURCES = \ 135 cursor/wayland-cursor.c \ 136 cursor/os-compatibility.c \ 137 cursor/os-compatibility.h \ 138 cursor/cursor-data.h \ 139 cursor/xcursor.c \ 140 cursor/xcursor.h 141libwayland_cursor_la_LIBADD = libwayland-client.la 142 143pkgconfig_DATA += cursor/wayland-cursor.pc 144 145libwayland_cursor_la_CFLAGS = \ 146 $(AM_CFLAGS) \ 147 -I$(top_builddir)/src \ 148 -I$(top_srcdir)/src \ 149 -DICONDIR=\"$(ICONDIR)\" 150 151lib_LTLIBRARIES += libwayland-egl.la 152 153include_HEADERS += egl/wayland-egl.h 154include_HEADERS += egl/wayland-egl-core.h 155 156libwayland_egl_la_SOURCES = egl/wayland-egl.c 157libwayland_egl_la_LDFLAGS = -version-info 1 158 159pkgconfig_DATA += egl/wayland-egl.pc 160 161## XXX: backend interface 162include_HEADERS += egl/wayland-egl-backend.h 163pkgconfig_DATA += egl/wayland-egl-backend.pc 164 165built_test_programs = \ 166 array-test \ 167 client-test \ 168 display-test \ 169 connection-test \ 170 event-loop-test \ 171 fixed-test \ 172 interface-test \ 173 list-test \ 174 map-test \ 175 os-wrappers-test \ 176 sanity-test \ 177 socket-test \ 178 queue-test \ 179 proxy-test \ 180 signal-test \ 181 newsignal-test \ 182 resources-test \ 183 message-test \ 184 headers-test \ 185 compositor-introspection-test \ 186 protocol-logger-test \ 187 wayland-egl-abi-check 188 189EXTRA_DIST += egl/wayland-egl-symbols-check 190 191check_PROGRAMS = wayland-egl-abi-check 192wayland_egl_abi_check_SOURCES = egl/wayland-egl-abi-check.c 193 194if ENABLE_CPP_TEST 195built_test_programs += cpp-compile-test 196endif 197 198AM_TESTS_ENVIRONMENT = \ 199 export WAYLAND_SCANNER='$(top_builddir)/wayland-scanner' \ 200 TEST_DATA_DIR='$(top_srcdir)/tests/data' \ 201 TEST_OUTPUT_DIR='$(top_builddir)/tests/output' \ 202 WAYLAND_EGL_LIB='$(top_builddir)/.libs/libwayland-egl.so' \ 203 SED=$(SED) \ 204 NM='$(NM)' \ 205 ; 206 207TESTS = $(built_test_programs) \ 208 egl/wayland-egl-symbols-check \ 209 tests/scanner-test.sh 210 211noinst_PROGRAMS = \ 212 $(built_test_programs) \ 213 exec-fd-leak-checker \ 214 fixed-benchmark 215 216noinst_LTLIBRARIES += \ 217 libtest-runner.la \ 218 libtest-helpers.la 219 220libtest_helpers_la_SOURCES = tests/test-helpers.c 221 222libtest_runner_la_SOURCES = \ 223 tests/test-runner.c \ 224 tests/test-runner.h \ 225 tests/test-compositor.h \ 226 tests/test-compositor.c 227libtest_runner_la_LIBADD = \ 228 libwayland-private.la \ 229 libwayland-util.la \ 230 libwayland-client.la \ 231 libwayland-server.la \ 232 libtest-helpers.la \ 233 $(RT_LIBS) $(DL_LIBS) $(FFI_LIBS) 234 235array_test_SOURCES = tests/array-test.c 236array_test_LDADD = libtest-runner.la 237client_test_SOURCES = tests/client-test.c 238client_test_LDADD = libtest-runner.la 239display_test_CFLAGS = -pthread 240display_test_SOURCES = tests/display-test.c 241display_test_LDADD = libtest-runner.la 242nodist_display_test_SOURCES = \ 243 protocol/tests-server-protocol.h \ 244 protocol/tests-client-protocol.h \ 245 protocol/tests-protocol.c 246connection_test_SOURCES = tests/connection-test.c 247connection_test_LDADD = libtest-runner.la 248event_loop_test_SOURCES = tests/event-loop-test.c 249event_loop_test_LDADD = libtest-runner.la 250fixed_test_SOURCES = tests/fixed-test.c 251fixed_test_LDADD = libtest-runner.la 252interface_test_SOURCES = tests/interface-test.c 253interface_test_LDADD = libtest-runner.la 254list_test_SOURCES = tests/list-test.c 255list_test_LDADD = libtest-runner.la 256map_test_SOURCES = tests/map-test.c 257map_test_LDADD = libtest-runner.la 258sanity_test_SOURCES = tests/sanity-test.c 259sanity_test_LDADD = libtest-runner.la 260socket_test_SOURCES = tests/socket-test.c 261socket_test_LDADD = libtest-runner.la 262queue_test_SOURCES = tests/queue-test.c 263queue_test_LDADD = libtest-runner.la 264proxy_test_SOURCES = tests/proxy-test.c 265proxy_test_LDADD = libtest-runner.la 266signal_test_SOURCES = tests/signal-test.c 267signal_test_LDADD = libtest-runner.la 268# wayland-server.c is needed here to access wl_priv_* functions 269newsignal_test_SOURCES = tests/newsignal-test.c src/wayland-server.c 270newsignal_test_LDADD = libtest-runner.la 271resources_test_SOURCES = tests/resources-test.c 272resources_test_LDADD = libtest-runner.la 273message_test_SOURCES = tests/message-test.c 274message_test_LDADD = libtest-runner.la 275compositor_introspection_test_SOURCES = tests/compositor-introspection-test.c 276compositor_introspection_test_LDADD = libtest-runner.la 277protocol_logger_test_SOURCES = tests/protocol-logger-test.c 278protocol_logger_test_LDADD = libtest-runner.la 279headers_test_SOURCES = tests/headers-test.c \ 280 tests/headers-protocol-test.c \ 281 tests/headers-protocol-core-test.c 282nodist_headers_test_SOURCES = \ 283 protocol/wayland-server-protocol-core.h \ 284 protocol/wayland-client-protocol-core.h 285 286if ENABLE_CPP_TEST 287cpp_compile_test_SOURCES = tests/cpp-compile-test.cpp 288endif 289 290fixed_benchmark_SOURCES = tests/fixed-benchmark.c 291fixed_benchmark_LDADD = $(RT_LIBS) 292 293os_wrappers_test_SOURCES = tests/os-wrappers-test.c 294os_wrappers_test_LDADD = libtest-runner.la 295 296exec_fd_leak_checker_SOURCES = tests/exec-fd-leak-checker.c 297exec_fd_leak_checker_LDADD = libtest-helpers.la 298 299EXTRA_DIST += tests/scanner-test.sh \ 300 protocol/tests.xml \ 301 tests/data/bad-identifier-arg.xml \ 302 tests/data/bad-identifier-entry.xml \ 303 tests/data/bad-identifier-enum.xml \ 304 tests/data/bad-identifier-event.xml \ 305 tests/data/bad-identifier-interface.xml \ 306 tests/data/bad-identifier-protocol.xml \ 307 tests/data/bad-identifier-request.xml \ 308 tests/data/example.xml \ 309 tests/data/example-client.h \ 310 tests/data/example-server.h \ 311 tests/data/example-code.c \ 312 tests/data/small.xml \ 313 tests/data/small-code.c \ 314 tests/data/small-client.h \ 315 tests/data/small-server.h \ 316 tests/data/small-code-core.c \ 317 tests/data/small-client-core.h \ 318 tests/data/small-server-core.h \ 319 tests/data/small-private-code.c \ 320 meson.build \ 321 meson_options.txt \ 322 cursor/meson.build \ 323 doc/meson.build \ 324 doc/doxygen/mainpage.dox \ 325 doc/doxygen/meson.build \ 326 doc/doxygen/gen-doxygen.py \ 327 doc/doxygen/xml/meson.build \ 328 doc/doxygen/xml/Client/meson.build \ 329 doc/doxygen/xml/Server/meson.build \ 330 doc/publican/meson.build \ 331 doc/publican/sources/meson.build \ 332 egl/meson.build \ 333 src/meson.build \ 334 tests/meson.build 335 336tests/scanner-test.sh: $(top_builddir)/wayland-scanner 337 338clean-local: 339 -rm -rf tests/output 340 341endif #ENABLE_LIBRARIES 342