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