Renamed libdbus-convenience to libdbus-internal for automake (to stay in sync with...
[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 install-def-file:
42 uninstall-def-file:
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 DBUS_SHARED_arch_sources =                      \
58         dbus-file-win.c                         \
59         dbus-pipe-win.c                         \
60         dbus-sockets-win.h                      \
61         dbus-sysdeps-win.c                      \
62         dbus-sysdeps-win.h                      \
63         dbus-sysdeps-thread-win.c               \
64         dbus-transport-win.c                    \
65         dbus-transport-win.h
66
67 DBUS_UTIL_arch_sources =                        \
68         dbus-sysdeps-util-win.c                 \
69         dbus-spawn-win.c
70 else
71 DBUS_LIB_arch_sources =                         \
72         dbus-uuidgen.c                          \
73         dbus-uuidgen.h                          \
74         dbus-server-unix.c                      \
75         dbus-server-unix.h
76
77 DBUS_SHARED_arch_sources =                      \
78         dbus-file-unix.c                        \
79         dbus-pipe-unix.c                        \
80         dbus-sysdeps-unix.c                     \
81         dbus-sysdeps-unix.h                     \
82         dbus-sysdeps-pthread.c                  \
83         dbus-transport-unix.c                   \
84         dbus-transport-unix.h                   \
85         dbus-userdb.c                           \
86         dbus-userdb.h
87
88 DBUS_UTIL_arch_sources =                        \
89         dbus-sysdeps-util-unix.c                \
90         dbus-userdb-util.c                      \
91         dbus-spawn.c
92 endif
93
94 dbusinclude_HEADERS=                            \
95         dbus.h                                  \
96         dbus-address.h                          \
97         dbus-bus.h                              \
98         dbus-connection.h                       \
99         dbus-errors.h                           \
100         dbus-macros.h                           \
101         dbus-memory.h                           \
102         dbus-message.h                          \
103         dbus-misc.h                             \
104         dbus-pending-call.h                     \
105         dbus-protocol.h                         \
106         dbus-server.h                           \
107         dbus-shared.h                           \
108         dbus-signature.h                        \
109         dbus-threads.h                          \
110         dbus-types.h
111
112
113 dbusarchinclude_HEADERS=                        \
114         dbus-arch-deps.h
115
116 ### source code that goes in the installed client library
117 ### and is specific to library functionality
118 DBUS_LIB_SOURCES=                               \
119         dbus-address.c                          \
120         dbus-auth.c                             \
121         dbus-auth.h                             \
122         dbus-auth-script.c                      \
123         dbus-auth-script.h                      \
124         dbus-bus.c                              \
125         dbus-connection.c                       \
126         dbus-connection-internal.h              \
127         dbus-credentials.c                      \
128         dbus-credentials.h                      \
129         dbus-errors.c                           \
130         dbus-keyring.c                          \
131         dbus-keyring.h                          \
132         dbus-marshal-header.c                   \
133         dbus-marshal-header.h                   \
134         dbus-marshal-byteswap.c                 \
135         dbus-marshal-byteswap.h                 \
136         dbus-marshal-recursive.c                \
137         dbus-marshal-recursive.h                \
138         dbus-marshal-validate.c                 \
139         dbus-marshal-validate.h                 \
140         dbus-message.c                          \
141         dbus-message-internal.h                 \
142         dbus-message-private.h                  \
143         dbus-misc.c                             \
144         dbus-nonce.h                            \
145         dbus-nonce.c                            \
146         dbus-object-tree.c                      \
147         dbus-object-tree.h                      \
148         dbus-pending-call.c                     \
149         dbus-pending-call-internal.h            \
150         dbus-resources.c                        \
151         dbus-resources.h                        \
152         dbus-server.c                           \
153         dbus-server-debug-pipe.c                \
154         dbus-server-debug-pipe.h                \
155         dbus-server-protected.h                 \
156         dbus-server-socket.c                    \
157         dbus-server-socket.h                    \
158         $(DBUS_LIB_arch_sources)                \
159         dbus-sha.c                              \
160         dbus-sha.h                              \
161         dbus-signature.c                        \
162         dbus-timeout.c                          \
163         dbus-timeout.h                          \
164         dbus-threads-internal.h                 \
165         dbus-threads.c                          \
166         dbus-transport.c                        \
167         dbus-transport.h                        \
168         dbus-transport-protected.h              \
169         dbus-transport-socket.c                 \
170         dbus-transport-socket.h                 \
171         dbus-watch.c                            \
172         dbus-watch.h
173
174 ##      dbus-md5.c                              \
175 ##      dbus-md5.h                              \
176
177 ### source code that goes in the installed client library
178 ### AND is generic utility functionality used by the 
179 ### daemon or test programs (all symbols in here should 
180 ### be underscore-prefixed)
181 DBUS_SHARED_SOURCES=                            \
182         dbus-dataslot.c                         \
183         dbus-dataslot.h                         \
184         dbus-file.c                 \
185         dbus-file.h                 \
186         dbus-hash.c                             \
187         dbus-hash.h                             \
188         dbus-internals.c                        \
189         dbus-internals.h                        \
190         dbus-list.c                             \
191         dbus-list.h                             \
192         dbus-marshal-basic.c                    \
193         dbus-marshal-basic.h                    \
194         dbus-memory.c                           \
195         dbus-mempool.c                          \
196         dbus-mempool.h                          \
197         dbus-pipe.c                 \
198         dbus-pipe.h                 \
199         dbus-string.c                           \
200         dbus-string.h                           \
201         dbus-string-private.h                   \
202         $(DBUS_SHARED_arch_sources)             \
203         dbus-sysdeps.c                          \
204         dbus-sysdeps.h
205
206 ### source code that is generic utility functionality used
207 ### by the bus daemon or test apps, but is NOT included
208 ### in the D-Bus client library (all symbols in here 
209 ### should be underscore-prefixed but don't really need 
210 ### to be unless they move to DBUS_SHARED_SOURCES later)
211 DBUS_UTIL_SOURCES=                              \
212         dbus-auth-util.c                        \
213         dbus-credentials-util.c                 \
214         dbus-mainloop.c                         \
215         dbus-mainloop.h                         \
216         dbus-marshal-byteswap-util.c            \
217         dbus-marshal-recursive-util.c           \
218         dbus-marshal-validate-util.c            \
219         dbus-message-factory.c                  \
220         dbus-message-factory.h                  \
221         dbus-message-util.c                     \
222         dbus-shell.c                            \
223         dbus-shell.h                            \
224         $(DBUS_UTIL_arch_sources)               \
225         dbus-spawn.h                            \
226         dbus-string-util.c                      \
227         dbus-sysdeps-util.c                     \
228         dbus-test.c                             \
229         dbus-test.h
230
231 libdbus_1_la_SOURCES=                           \
232         $(DBUS_LIB_SOURCES)                     \
233         $(DBUS_SHARED_SOURCES)
234
235 libdbus_internal_la_SOURCES=                    \
236         $(DBUS_LIB_SOURCES)                     \
237         $(DBUS_SHARED_SOURCES)                  \
238         $(DBUS_UTIL_SOURCES)
239
240 BUILT_SOURCES=$(dbusarchinclude_HEADERS)
241 EXTRA_DIST=dbus-arch-deps.h.in
242
243
244 ## this library is the same as libdbus, but exports all the symbols
245 ## and is only used for static linking within the dbus package.
246 noinst_LTLIBRARIES=libdbus-internal.la
247
248 libdbus_1_la_CPPFLAGS= -Ddbus_1_EXPORTS
249 libdbus_1_la_LIBADD= $(DBUS_CLIENT_LIBS)
250 libdbus_1_la_LDFLAGS= $(export_symbols) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -no-undefined @R_DYNAMIC_LDFLAG@ @PIC_LDFLAGS@
251
252 libdbus_internal_la_CPPFLAGS = -DDBUS_STATIC_BUILD
253 libdbus_internal_la_LIBADD=$(DBUS_CLIENT_LIBS)
254 libdbus_internal_la_LDFLAGS=$(export_symbols_internal) @R_DYNAMIC_LDFLAG@
255
256 ## note that TESTS has special meaning (stuff to use in make check)
257 ## so if adding tests not to be run in make check, don't add them to 
258 ## TESTS
259 if DBUS_BUILD_TESTS
260 TESTS_ENVIRONMENT=DBUS_TEST_DATA=$(top_builddir)/test/data DBUS_TEST_HOMEDIR=$(top_builddir)/dbus
261 TESTS=dbus-test
262 else
263 TESTS=
264 endif
265
266 ## we use noinst_PROGRAMS not check_PROGRAMS so that we build 
267 ## even when not doing "make check"
268 noinst_PROGRAMS=$(TESTS)
269
270 dbus_test_SOURCES=                              \
271         dbus-test-main.c
272
273 dbus_test_LDADD=libdbus-internal.la $(DBUS_TEST_LIBS)
274 dbus_test_LDFLAGS=@R_DYNAMIC_LDFLAG@
275
276 install-data-local: install-def-file
277
278 uninstall-local: uninstall-def-file
279
280 ## mop up the gcov files
281 clean-local:
282         /bin/rm *.bb *.bbg *.da *.gcov .libs/*.da .libs/*.bbg || true