• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1
2configdir=$(sysconfdir)/dbus-1
3
4INCLUDES=-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
9dbusincludedir=$(includedir)/dbus-1.0/dbus
10dbusarchincludedir=$(libdir)/dbus-1.0/include/dbus
11
12lib_LTLIBRARIES=libdbus-1.la
13
14#
15# Deal with W32 .def and version-info.rc stuff
16#
17if DBUS_WIN
18
19SUFFIXES = rc
20
21.rc.o:
22	$(WINDRES) $< -o $@
23
24dbus_res = versioninfo.o
25dbus_res_ldflag = -Wl,$(dbus_res)
26no_undefined = -no-undefined
27export_symbols =
28export_symvols_internal =
29
30libdbus_1_la_DEPENDENCIES = $(dbus_res)
31intllibs =
32
33else
34dbus_res =
35dbus_res_ldflag =
36no_undefined =
37## don't export symbols that start with "_" (we use this
38## convention for internal symbols)
39export_symbols = -export-symbols-regex "^[^_].*"
40export_symbols_internal =
41
42intllibs = @LTLIBINTL@
43
44endif
45
46
47#
48# Platform-dependent sources:
49#
50if DBUS_WIN
51DBUS_LIB_arch_sources = 			\
52	dbus-server-win.c 			\
53	dbus-server-win.h
54
55if DBUS_WINCE
56wince_source = dbus-sysdeps-wince-glue.h dbus-sysdeps-wince-glue.c
57else
58wince_source =
59endif
60
61DBUS_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
72DBUS_UTIL_arch_sources =			\
73	dbus-sysdeps-util-win.c			\
74	dbus-spawn-win.c
75else
76DBUS_LIB_arch_sources = 			\
77	dbus-uuidgen.c				\
78	dbus-uuidgen.h				\
79	dbus-server-unix.c 			\
80	dbus-server-unix.h
81
82DBUS_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
95DBUS_UTIL_arch_sources = 			\
96	dbus-sysdeps-util-unix.c		\
97	dbus-userdb-util.c			\
98	dbus-spawn.c
99endif
100
101dbusinclude_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
120dbusarchinclude_HEADERS=			\
121	dbus-arch-deps.h
122
123### source code that goes in the installed client library
124### and is specific to library functionality
125DBUS_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)
188DBUS_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)
218DBUS_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
238libdbus_1_la_SOURCES=				\
239	$(DBUS_LIB_SOURCES)			\
240	$(DBUS_SHARED_SOURCES)
241
242libdbus_internal_la_SOURCES=			\
243	$(DBUS_LIB_SOURCES)			\
244	$(DBUS_SHARED_SOURCES)			\
245	$(DBUS_UTIL_SOURCES)
246
247BUILT_SOURCES=$(dbusarchinclude_HEADERS)
248EXTRA_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.
253noinst_LTLIBRARIES=libdbus-internal.la
254
255libdbus_1_la_CPPFLAGS= -Ddbus_1_EXPORTS
256libdbus_1_la_LIBADD= $(DBUS_CLIENT_LIBS)
257libdbus_1_la_LDFLAGS= $(export_symbols) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -no-undefined @R_DYNAMIC_LDFLAG@ @PIC_LDFLAGS@
258
259libdbus_internal_la_CPPFLAGS = -DDBUS_STATIC_BUILD
260libdbus_internal_la_LIBADD=$(DBUS_CLIENT_LIBS)
261libdbus_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
266if DBUS_BUILD_TESTS
267TESTS_ENVIRONMENT=DBUS_TEST_DATA=$(top_builddir)/test/data DBUS_TEST_HOMEDIR=$(top_builddir)/dbus
268TESTS=dbus-test
269else
270TESTS=
271endif
272
273## we use noinst_PROGRAMS not check_PROGRAMS so that we build
274## even when not doing "make check"
275noinst_PROGRAMS=$(TESTS)
276
277dbus_test_SOURCES=				\
278	dbus-test-main.c
279
280dbus_test_LDADD=libdbus-internal.la $(DBUS_TEST_LIBS)
281dbus_test_LDFLAGS=@R_DYNAMIC_LDFLAG@
282
283## mop up the gcov files
284clean-local:
285	/bin/rm *.bb *.bbg *.da *.gcov .libs/*.da .libs/*.bbg || true
286
287update-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
290