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