dbus-spawn.h is internal, it shouldn't be installed
[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 SUFFIXES = rc
19
20 .rc.o:
21         $(WINDRES) $< -o $@
22
23 dbus_res = versioninfo.o
24 dbus_res_ldflag = -Wl,$(dbus_res)
25 no_undefined = -no-undefined
26
27
28 ### FIXME use the .def.in files depending on the current config 
29 ### or combine them in a single .def file as done in the cmake build
30 export_symbols = -export-symbols $(srcdir)/dbus-1.def
31
32 install-def-file:
33         test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
34         $(INSTALL) dbus-1.def $(DESTDIR)$(libdir)/dbus-1.def
35
36 uninstall-def-file:
37         -rm $(DESTDIR)$(libdir)/dbus-1.def
38
39 libdbus_1_la_DEPENDENCIES = $(dbus_res) dbus-1.def
40 intllibs =
41
42 else
43 dbus_res =
44 dbus_res_ldflag =
45 no_undefined =
46 ## don't export symbols that start with "_" (we use this
47 ## convention for internal symbols)
48 export_symbols = -export-symbols-regex "^[^_].*"
49 install-def-file:
50 uninstall-def-file:
51
52 intllibs = @LTLIBINTL@
53
54 endif
55
56
57 #
58 # Platform-dependent sources:
59 #
60 if DBUS_WIN
61 DBUS_LIB_arch_sources =                         \
62         dbus-server-win.c                       \
63         dbus-server-win.h
64
65 DBUS_SHARED_arch_sources =                      \
66         dbus-pipe-win.c                         \
67         dbus-sysdeps-win.c                      \
68         dbus-sysdeps-win.h                      \
69         dbus-sysdeps-thread-win.c               \
70         dbus-transport-win.c                    \
71         dbus-transport-win.h
72
73 DBUS_UTIL_arch_sources =                        \
74         dbus-sysdeps-util-win.c                 \
75         dbus-spawn-win.c
76 else
77 DBUS_LIB_arch_sources =                         \
78         dbus-uuidgen.c                          \
79         dbus-uuidgen.h                          \
80         dbus-server-unix.c                      \
81         dbus-server-unix.h
82
83 DBUS_SHARED_arch_sources =                      \
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
93 DBUS_UTIL_arch_sources =                        \
94         dbus-sysdeps-util-unix.c                \
95         dbus-userdb-util.c                      \
96         dbus-spawn.c
97 endif
98
99 dbusinclude_HEADERS=                            \
100         dbus.h                                  \
101         dbus-address.h                          \
102         dbus-bus.h                              \
103         dbus-connection.h                       \
104         dbus-errors.h                           \
105         dbus-macros.h                           \
106         dbus-memory.h                           \
107         dbus-message.h                          \
108         dbus-misc.h                             \
109         dbus-pending-call.h                     \
110         dbus-protocol.h                         \
111         dbus-server.h                           \
112         dbus-shared.h                           \
113         dbus-signature.h                        \
114         dbus-threads.h                          \
115         dbus-types.h
116
117
118 dbusarchinclude_HEADERS=                        \
119         dbus-arch-deps.h
120
121 ### source code that goes in the installed client library
122 ### and is specific to library functionality
123 DBUS_LIB_SOURCES=                               \
124         dbus-address.c                          \
125         dbus-auth.c                             \
126         dbus-auth.h                             \
127         dbus-auth-script.c                      \
128         dbus-auth-script.h                      \
129         dbus-bus.c                              \
130         dbus-connection.c                       \
131         dbus-connection-internal.h              \
132         dbus-credentials.c                      \
133         dbus-credentials.h                      \
134         dbus-errors.c                           \
135         dbus-keyring.c                          \
136         dbus-keyring.h                          \
137         dbus-marshal-header.c                   \
138         dbus-marshal-header.h                   \
139         dbus-marshal-byteswap.c                 \
140         dbus-marshal-byteswap.h                 \
141         dbus-marshal-recursive.c                \
142         dbus-marshal-recursive.h                \
143         dbus-marshal-validate.c                 \
144         dbus-marshal-validate.h                 \
145         dbus-message.c                          \
146         dbus-message-internal.h                 \
147         dbus-message-private.h                  \
148         dbus-misc.c                             \
149         dbus-nonce.c                            \
150         dbus-object-tree.c                      \
151         dbus-object-tree.h                      \
152         dbus-pending-call.c                     \
153         dbus-pending-call-internal.h            \
154         dbus-resources.c                        \
155         dbus-resources.h                        \
156         dbus-server.c                           \
157         dbus-server-debug-pipe.c                \
158         dbus-server-debug-pipe.h                \
159         dbus-server-protected.h                 \
160         dbus-server-socket.c                    \
161         dbus-server-socket.h                    \
162         $(DBUS_LIB_arch_sources)                \
163         dbus-sha.c                              \
164         dbus-sha.h                              \
165         dbus-signature.c                        \
166         dbus-timeout.c                          \
167         dbus-timeout.h                          \
168         dbus-threads-internal.h                 \
169         dbus-threads.c                          \
170         dbus-transport.c                        \
171         dbus-transport.h                        \
172         dbus-transport-protected.h              \
173         dbus-transport-socket.c                 \
174         dbus-transport-socket.h                 \
175         dbus-watch.c                            \
176         dbus-watch.h
177
178 ##      dbus-md5.c                              \
179 ##      dbus-md5.h                              \
180
181 ### source code that goes in the installed client library
182 ### AND is generic utility functionality used by the 
183 ### daemon or test programs (all symbols in here should 
184 ### be underscore-prefixed)
185 DBUS_SHARED_SOURCES=                            \
186         dbus-dataslot.c                         \
187         dbus-dataslot.h                         \
188         dbus-hash.c                             \
189         dbus-hash.h                             \
190         dbus-internals.c                        \
191         dbus-internals.h                        \
192         dbus-list.c                             \
193         dbus-list.h                             \
194         dbus-marshal-basic.c                    \
195         dbus-marshal-basic.h                    \
196         dbus-memory.c                           \
197         dbus-mempool.c                          \
198         dbus-mempool.h                          \
199         dbus-pipe.c                 \
200         dbus-pipe.h                 \
201         dbus-string.c                           \
202         dbus-string.h                           \
203         dbus-string-private.h                   \
204         $(DBUS_SHARED_arch_sources)             \
205         dbus-sysdeps.c                          \
206         dbus-sysdeps.h
207
208 ### source code that is generic utility functionality used
209 ### by the bus daemon or test apps, but is NOT included
210 ### in the D-Bus client library (all symbols in here 
211 ### should be underscore-prefixed but don't really need 
212 ### to be unless they move to DBUS_SHARED_SOURCES later)
213 DBUS_UTIL_SOURCES=                              \
214         dbus-auth-util.c                        \
215         dbus-credentials-util.c                 \
216         dbus-mainloop.c                         \
217         dbus-mainloop.h                         \
218         dbus-marshal-byteswap-util.c            \
219         dbus-marshal-recursive-util.c           \
220         dbus-marshal-validate-util.c            \
221         dbus-message-factory.c                  \
222         dbus-message-factory.h                  \
223         dbus-message-util.c                     \
224         dbus-shell.c                            \
225         dbus-shell.h                            \
226         $(DBUS_UTIL_arch_sources)               \
227         dbus-spawn.h                            \
228         dbus-string-util.c                      \
229         dbus-sysdeps-util.c                     \
230         dbus-test.c                             \
231         dbus-test.h
232
233 libdbus_1_la_SOURCES=                           \
234         $(DBUS_LIB_SOURCES)                     \
235         $(DBUS_SHARED_SOURCES)
236
237 libdbus_convenience_la_SOURCES=                 \
238         $(DBUS_LIB_SOURCES)                     \
239         $(DBUS_SHARED_SOURCES)                  \
240         $(DBUS_UTIL_SOURCES)
241
242
243 BUILT_SOURCES=$(dbusarchinclude_HEADERS)
244 EXTRA_DIST=dbus-arch-deps.h.in dbus-1.def
245
246 ## this library is the same as libdbus, but exports all the symbols
247 ## and is only used for static linking within the dbus package.
248 noinst_LTLIBRARIES=libdbus-convenience.la
249
250 libdbus_1_la_LIBADD= $(DBUS_CLIENT_LIBS)
251 libdbus_1_la_LDFLAGS= $(export_symbols) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -no-undefined @R_DYNAMIC_LDFLAG@ @PIC_LDFLAGS@
252
253 libdbus_convenience_la_LIBADD=$(DBUS_CLIENT_LIBS)
254 libdbus_convenience_la_LDFLAGS=@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-convenience.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