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