Add an implementation of DBusSocketSet using epoll
[platform/upstream/dbus.git] / dbus / Makefile.am
1
2 configdir=$(sysconfdir)/dbus-1
3
4 INCLUDES = -I$(top_builddir) -I$(top_srcdir) \
5         $(DBUS_CLIENT_CFLAGS) \
6         -DDBUS_COMPILATION \
7         -DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/lib/dbus/machine-id"\" \
8         -DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\" \
9         -DDBUS_SESSION_CONFIG_FILE=\""$(configdir)/session.conf"\"
10
11 dbusincludedir=$(includedir)/dbus-1.0/dbus
12 dbusarchincludedir=$(libdir)/dbus-1.0/include/dbus
13
14 lib_LTLIBRARIES=libdbus-1.la
15
16 #
17 # Deal with W32 .def and version-info.rc stuff
18 #
19 if DBUS_WIN
20
21 SUFFIXES = rc
22
23 .rc.o:
24         $(WINDRES) $< -o $@
25
26 dbus_res = versioninfo.o
27 dbus_res_ldflag = -Wl,$(dbus_res)
28 no_undefined = -no-undefined
29 export_symbols =
30 export_symvols_internal =
31
32 libdbus_1_la_DEPENDENCIES = $(dbus_res)
33 intllibs =
34
35 else
36 dbus_res =
37 dbus_res_ldflag =
38 no_undefined =
39 ## don't export symbols that start with "_" (we use this
40 ## convention for internal symbols)
41 export_symbols = -export-symbols-regex "^[^_].*"
42 export_symbols_internal =
43
44 intllibs = @LTLIBINTL@
45
46 endif
47
48
49 #
50 # Platform-dependent sources:
51 #
52 if DBUS_WIN
53 DBUS_LIB_arch_sources =                         \
54         dbus-server-win.c                       \
55         dbus-server-win.h
56
57 if DBUS_WINCE
58 wince_source = dbus-sysdeps-wince-glue.h dbus-sysdeps-wince-glue.c
59 else
60 wince_source =
61 endif
62
63 DBUS_SHARED_arch_sources =                      \
64         $(wince_source)                         \
65         dbus-file-win.c                         \
66         dbus-pipe-win.c                         \
67         dbus-sockets-win.h                      \
68         dbus-sysdeps-win.c                      \
69         dbus-sysdeps-win.h                      \
70         dbus-sysdeps-thread-win.c               \
71         dbus-transport-win.c                    \
72         dbus-transport-win.h
73
74 DBUS_UTIL_arch_sources =                        \
75         dbus-sysdeps-util-win.c                 \
76         dbus-spawn-win.c
77 else
78
79 if DBUS_ENABLE_LAUNCHD
80 launchd_source = dbus-server-launchd.h dbus-server-launchd.c
81 else
82 launchd_source =
83 endif
84
85 DBUS_LIB_arch_sources =                         \
86         dbus-uuidgen.c                          \
87         dbus-uuidgen.h                          \
88         dbus-server-unix.c                      \
89         dbus-server-unix.h
90
91 DBUS_SHARED_arch_sources =                      \
92         $(launchd_source)                       \
93         dbus-file-unix.c                        \
94         dbus-pipe-unix.c                        \
95         dbus-sysdeps-unix.c                     \
96         dbus-sysdeps-unix.h                     \
97         dbus-sysdeps-pthread.c                  \
98         dbus-transport-unix.c                   \
99         dbus-transport-unix.h                   \
100         dbus-userdb.c                           \
101         dbus-userdb.h                           \
102         sd-daemon.c                             \
103         sd-daemon.h
104
105 DBUS_UTIL_arch_sources =                        \
106         dbus-sysdeps-util-unix.c                \
107         dbus-userdb-util.c                      \
108         dbus-spawn.c
109 endif
110
111 if HAVE_LINUX_EPOLL
112 DBUS_UTIL_arch_sources += dbus-socket-set-epoll.c
113 endif
114
115 dbusinclude_HEADERS=                            \
116         dbus.h                                  \
117         dbus-address.h                          \
118         dbus-bus.h                              \
119         dbus-connection.h                       \
120         dbus-errors.h                           \
121         dbus-macros.h                           \
122         dbus-memory.h                           \
123         dbus-message.h                          \
124         dbus-misc.h                             \
125         dbus-pending-call.h                     \
126         dbus-protocol.h                         \
127         dbus-server.h                           \
128         dbus-shared.h                           \
129         dbus-signature.h                        \
130         dbus-threads.h                          \
131         dbus-types.h
132
133
134 nodist_dbusarchinclude_HEADERS=                 \
135         dbus-arch-deps.h
136
137 ### source code that goes in the installed client library
138 ### and is specific to library functionality
139 DBUS_LIB_SOURCES=                               \
140         dbus-address.c                          \
141         dbus-auth.c                             \
142         dbus-auth.h                             \
143         dbus-auth-script.c                      \
144         dbus-auth-script.h                      \
145         dbus-bus.c                              \
146         dbus-connection.c                       \
147         dbus-connection-internal.h              \
148         dbus-credentials.c                      \
149         dbus-credentials.h                      \
150         dbus-errors.c                           \
151         dbus-keyring.c                          \
152         dbus-keyring.h                          \
153         dbus-marshal-header.c                   \
154         dbus-marshal-header.h                   \
155         dbus-marshal-byteswap.c                 \
156         dbus-marshal-byteswap.h                 \
157         dbus-marshal-recursive.c                \
158         dbus-marshal-recursive.h                \
159         dbus-marshal-validate.c                 \
160         dbus-marshal-validate.h                 \
161         dbus-message.c                          \
162         dbus-message-internal.h                 \
163         dbus-message-private.h                  \
164         dbus-misc.c                             \
165         dbus-nonce.h                            \
166         dbus-nonce.c                            \
167         dbus-object-tree.c                      \
168         dbus-object-tree.h                      \
169         dbus-pending-call.c                     \
170         dbus-pending-call-internal.h            \
171         dbus-resources.c                        \
172         dbus-resources.h                        \
173         dbus-server.c                           \
174         dbus-server-debug-pipe.c                \
175         dbus-server-debug-pipe.h                \
176         dbus-server-protected.h                 \
177         dbus-server-socket.c                    \
178         dbus-server-socket.h                    \
179         $(DBUS_LIB_arch_sources)                \
180         dbus-sha.c                              \
181         dbus-sha.h                              \
182         dbus-signature.c                        \
183         dbus-timeout.c                          \
184         dbus-timeout.h                          \
185         dbus-threads-internal.h                 \
186         dbus-threads.c                          \
187         dbus-transport.c                        \
188         dbus-transport.h                        \
189         dbus-transport-protected.h              \
190         dbus-transport-socket.c                 \
191         dbus-transport-socket.h                 \
192         dbus-watch.c                            \
193         dbus-watch.h
194
195 ##      dbus-md5.c                              \
196 ##      dbus-md5.h                              \
197
198 ### source code that goes in the installed client library
199 ### AND is generic utility functionality used by the
200 ### daemon or test programs (all symbols in here should
201 ### be underscore-prefixed)
202 DBUS_SHARED_SOURCES=                            \
203         dbus-dataslot.c                         \
204         dbus-dataslot.h                         \
205         dbus-file.c                 \
206         dbus-file.h                 \
207         dbus-hash.c                             \
208         dbus-hash.h                             \
209         dbus-internals.c                        \
210         dbus-internals.h                        \
211         dbus-list.c                             \
212         dbus-list.h                             \
213         dbus-marshal-basic.c                    \
214         dbus-marshal-basic.h                    \
215         dbus-memory.c                           \
216         dbus-mempool.c                          \
217         dbus-mempool.h                          \
218         dbus-pipe.c                 \
219         dbus-pipe.h                 \
220         dbus-string.c                           \
221         dbus-string.h                           \
222         dbus-string-private.h                   \
223         $(DBUS_SHARED_arch_sources)             \
224         dbus-sysdeps.c                          \
225         dbus-sysdeps.h
226
227 ### source code that is generic utility functionality used
228 ### by the bus daemon or test apps, but is NOT included
229 ### in the D-Bus client library (all symbols in here
230 ### should be underscore-prefixed but don't really need
231 ### to be unless they move to DBUS_SHARED_SOURCES later)
232 DBUS_UTIL_SOURCES=                              \
233         dbus-auth-util.c                        \
234         dbus-credentials-util.c                 \
235         dbus-mainloop.c                         \
236         dbus-mainloop.h                         \
237         dbus-marshal-byteswap-util.c            \
238         dbus-marshal-recursive-util.c           \
239         dbus-marshal-validate-util.c            \
240         dbus-message-factory.c                  \
241         dbus-message-factory.h                  \
242         dbus-message-util.c                     \
243         dbus-shell.c                            \
244         dbus-shell.h                            \
245         $(DBUS_UTIL_arch_sources)               \
246         dbus-socket-set.h                       \
247         dbus-socket-set.c                       \
248         dbus-socket-set-poll.c                  \
249         dbus-spawn.h                            \
250         dbus-string-util.c                      \
251         dbus-sysdeps-util.c                     \
252         dbus-test.c                             \
253         dbus-test.h
254
255 libdbus_1_la_SOURCES=                           \
256         $(DBUS_LIB_SOURCES)                     \
257         $(DBUS_SHARED_SOURCES)
258
259 libdbus_internal_la_SOURCES=                    \
260         $(DBUS_LIB_SOURCES)                     \
261         $(DBUS_SHARED_SOURCES)                  \
262         $(DBUS_UTIL_SOURCES)
263
264 BUILT_SOURCES=$(nodist_dbusarchinclude_HEADERS)
265 EXTRA_DIST=dbus-arch-deps.h.in
266
267 ## this library is the same as libdbus, but exports all the symbols
268 ## and is only used for static linking within the dbus package.
269 noinst_LTLIBRARIES=libdbus-internal.la
270
271 libdbus_1_la_CPPFLAGS= -Ddbus_1_EXPORTS
272 libdbus_1_la_LIBADD= $(DBUS_CLIENT_LIBS)
273 libdbus_1_la_LDFLAGS= $(export_symbols) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -no-undefined @R_DYNAMIC_LDFLAG@
274
275 libdbus_internal_la_CPPFLAGS = -DDBUS_STATIC_BUILD
276 libdbus_internal_la_LIBADD=$(DBUS_CLIENT_LIBS)
277 libdbus_internal_la_LDFLAGS=$(export_symbols_internal) @R_DYNAMIC_LDFLAG@
278
279 ## note that TESTS has special meaning (stuff to use in make check)
280 ## so if adding tests not to be run in make check, don't add them to
281 ## TESTS
282 if DBUS_BUILD_TESTS
283 TESTS_ENVIRONMENT=DBUS_TEST_DATA=$(top_builddir)/test/data DBUS_TEST_HOMEDIR=$(top_builddir)/dbus
284 TESTS=dbus-test
285 else
286 TESTS=
287 endif
288
289 ## we use noinst_PROGRAMS not check_PROGRAMS so that we build
290 ## even when not doing "make check"
291 noinst_PROGRAMS=$(TESTS)
292
293 dbus_test_SOURCES=                              \
294         dbus-test-main.c
295
296 dbus_test_LDADD=libdbus-internal.la $(DBUS_TEST_LIBS)
297 dbus_test_LDFLAGS=@R_DYNAMIC_LDFLAG@
298
299 ## mop up the gcov files
300 clean-local:
301         /bin/rm *.bb *.bbg *.da *.gcov .libs/*.da .libs/*.bbg || true
302
303 update-systemd:
304         curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.c > sd-daemon.c
305         curl http://cgit.freedesktop.org/systemd/plain/src/sd-daemon.h > sd-daemon.h