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