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