Makefile.am 7.25 KB
Newer Older
1

2
dbusdatadir=$(datadir)/dbus-1
3

Simon McVittie's avatar
Simon McVittie committed
4 5 6
AM_CPPFLAGS = \
	-I$(top_builddir) \
	-I$(top_srcdir) \
7
	$(DBUS_STATIC_BUILD_CPPFLAGS) \
8
	$(SYSTEMD_CFLAGS) \
9
	$(VALGRIND_CFLAGS) \
10 11
	-DDBUS_COMPILATION \
	-DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/lib/dbus/machine-id"\" \
12 13
	-DDBUS_SYSTEM_CONFIG_FILE=\""$(dbusdatadir)/system.conf"\" \
	-DDBUS_SESSION_CONFIG_FILE=\""$(dbusdatadir)/session.conf"\" \
Simon McVittie's avatar
Simon McVittie committed
14
	$(NULL)
15

16 17 18 19 20 21 22 23 24 25 26 27
AM_CFLAGS =

if HAVE_VISIBILITY
if !DBUS_WIN
AM_CFLAGS += $(CFLAG_VISIBILITY)
AM_CPPFLAGS += \
	-DDBUS_EXPORT='__attribute__((__visibility__("default")))' \
	-DDBUS_PRIVATE_EXPORT='__attribute__((__visibility__("default")))' \
	$(NULL)
endif
endif

28 29 30
# if assertions are enabled, improve backtraces
AM_LDFLAGS = @R_DYNAMIC_LDFLAG@

31
dbusincludedir=$(includedir)/dbus-1.0/dbus
32
dbusarchincludedir=$(libdir)/dbus-1.0/include/dbus
33 34 35

lib_LTLIBRARIES=libdbus-1.la

36 37 38 39
#
# Deal with W32 .def and version-info.rc stuff
#
if DBUS_WIN
40

41
SUFFIXES = rc
42 43

.rc.o:
44
	$(WINDRES) $< -o $@
45 46 47 48

dbus_res = versioninfo.o
dbus_res_ldflag = -Wl,$(dbus_res)
no_undefined = -no-undefined
49
export_symbols =
50

51
EXTRA_libdbus_1_la_DEPENDENCIES = $(dbus_res)
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
intllibs =

else
dbus_res =
dbus_res_ldflag =
no_undefined =

intllibs = @LTLIBINTL@

endif


#
# Platform-dependent sources:
#
if DBUS_WIN
DBUS_LIB_arch_sources = 			\
	dbus-server-win.c 			\
	dbus-server-win.h

72 73 74
if DBUS_WINCE
wince_source = dbus-sysdeps-wince-glue.h dbus-sysdeps-wince-glue.c
else
75
wince_source =
76 77
endif

78
DBUS_SHARED_arch_sources = 			\
79
	$(wince_source)				\
80
	dbus-file-win.c 			\
81
	dbus-pipe-win.c 			\
82
	dbus-sockets-win.h			\
83 84 85 86 87 88 89 90 91 92
	dbus-sysdeps-win.c 			\
	dbus-sysdeps-win.h			\
	dbus-sysdeps-thread-win.c		\
	dbus-transport-win.c			\
	dbus-transport-win.h

DBUS_UTIL_arch_sources =			\
	dbus-sysdeps-util-win.c			\
	dbus-spawn-win.c
else
Benjamin Reed's avatar
Benjamin Reed committed
93 94 95 96 97 98 99

if DBUS_ENABLE_LAUNCHD
launchd_source = dbus-server-launchd.h dbus-server-launchd.c
else
launchd_source =
endif

100
DBUS_LIB_arch_sources = 			\
101 102
	dbus-uuidgen.c				\
	dbus-uuidgen.h				\
103 104 105 106
	dbus-server-unix.c 			\
	dbus-server-unix.h

DBUS_SHARED_arch_sources = 			\
Benjamin Reed's avatar
Benjamin Reed committed
107
	$(launchd_source)			\
108
	dbus-file-unix.c 			\
109
	dbus-pipe-unix.c 			\
110 111 112 113 114 115
	dbus-sysdeps-unix.c 			\
	dbus-sysdeps-unix.h			\
	dbus-sysdeps-pthread.c			\
	dbus-transport-unix.c			\
	dbus-transport-unix.h			\
	dbus-userdb.c				\
116
	dbus-userdb.h 				\
117
	$(NULL)
118 119 120 121 122 123 124

DBUS_UTIL_arch_sources = 			\
	dbus-sysdeps-util-unix.c		\
	dbus-userdb-util.c			\
	dbus-spawn.c
endif

125 126 127 128
if HAVE_LINUX_EPOLL
DBUS_UTIL_arch_sources += dbus-socket-set-epoll.c
endif

129
dbusinclude_HEADERS=				\
130
	dbus.h					\
131
	dbus-address.h				\
132
	dbus-bus.h				\
133
	dbus-connection.h			\
134
	dbus-errors.h				\
135
	dbus-macros.h				\
136
	dbus-memory.h				\
137
	dbus-message.h				\
138
	dbus-misc.h				\
139
	dbus-pending-call.h			\
140
	dbus-protocol.h				\
141
	dbus-server.h				\
142
	dbus-shared.h				\
143
	dbus-signature.h			\
Simon McVittie's avatar
Simon McVittie committed
144
	dbus-syntax.h				\
145
	dbus-threads.h				\
John Palmieri's avatar
John Palmieri committed
146
	dbus-types.h
Thiago Macieira's avatar
Thiago Macieira committed
147

148

149
nodist_dbusarchinclude_HEADERS=			\
150 151
	dbus-arch-deps.h

152 153 154
### source code that goes in the installed client library
### and is specific to library functionality
DBUS_LIB_SOURCES=				\
155
	dbus-address.c				\
156 157
	dbus-auth.c				\
	dbus-auth.h				\
158
	dbus-bus.c				\
159 160
	dbus-connection.c			\
	dbus-connection-internal.h		\
161 162
	dbus-credentials.c			\
	dbus-credentials.h			\
163
	dbus-errors.c				\
164 165
	dbus-keyring.c				\
	dbus-keyring.h				\
166 167
	dbus-marshal-header.c			\
	dbus-marshal-header.h			\
168 169
	dbus-marshal-byteswap.c			\
	dbus-marshal-byteswap.h			\
170 171 172 173
	dbus-marshal-recursive.c		\
	dbus-marshal-recursive.h		\
	dbus-marshal-validate.c			\
	dbus-marshal-validate.h			\
174 175
	dbus-message.c				\
	dbus-message-internal.h			\
176
	dbus-message-private.h			\
177
	dbus-misc.c				\
178
	dbus-nonce.h				\
179
	dbus-nonce.c				\
180 181
	dbus-object-tree.c			\
	dbus-object-tree.h			\
182
	dbus-pending-call.c			\
183
	dbus-pending-call-internal.h		\
184 185
	dbus-resources.c			\
	dbus-resources.h			\
186
	dbus-server.c				\
187 188
	dbus-server-debug-pipe.c		\
	dbus-server-debug-pipe.h		\
189
	dbus-server-protected.h			\
190 191
	dbus-server-socket.c			\
	dbus-server-socket.h			\
192
	$(DBUS_LIB_arch_sources)		\
193 194
	dbus-sha.c				\
	dbus-sha.h				\
195
	dbus-signature.c			\
Simon McVittie's avatar
Simon McVittie committed
196
	dbus-syntax.c				\
197 198
	dbus-timeout.c				\
	dbus-timeout.h				\
199
	dbus-threads-internal.h			\
200
	dbus-threads.c				\
201 202 203
	dbus-transport.c			\
	dbus-transport.h			\
	dbus-transport-protected.h		\
204 205
	dbus-transport-socket.c			\
	dbus-transport-socket.h			\
206 207 208
	dbus-watch.c				\
	dbus-watch.h

209
### source code that goes in the installed client library
210 211
### AND is generic utility functionality used by the
### daemon or test programs (all symbols in here should
212 213
### be underscore-prefixed)
DBUS_SHARED_SOURCES=				\
214 215
	dbus-dataslot.c				\
	dbus-dataslot.h				\
216 217
	dbus-file.c                 \
	dbus-file.h                 \
218
	dbus-hash.c				\
219 220
	dbus-hash.h				\
	dbus-internals.c			\
221 222
	dbus-internals.h			\
	dbus-list.c				\
223
	dbus-list.h				\
224 225
	dbus-marshal-basic.c			\
	dbus-marshal-basic.h			\
226
	dbus-memory.c				\
227 228
	dbus-mempool.c				\
	dbus-mempool.h				\
229 230
	dbus-pipe.c                 \
	dbus-pipe.h                 \
231 232
	dbus-string.c				\
	dbus-string.h				\
233
	dbus-string-private.h			\
234
	$(DBUS_SHARED_arch_sources)		\
235
	dbus-sysdeps.c				\
236 237
	dbus-sysdeps.h				\
	dbus-valgrind-internal.h
238

239 240
### source code that is generic utility functionality used
### by the bus daemon or test apps, but is NOT included
241 242
### in the D-Bus client library (all symbols in here
### should be underscore-prefixed but don't really need
243 244
### to be unless they move to DBUS_SHARED_SOURCES later)
DBUS_UTIL_SOURCES=				\
245 246
	dbus-asv-util.c				\
	dbus-asv-util.h				\
247 248
	dbus-auth-script.c			\
	dbus-auth-script.h			\
249
	dbus-auth-util.c			\
250
	dbus-credentials-util.c			\
251
	dbus-mainloop.c				\
252
	dbus-mainloop.h				\
253
	dbus-marshal-byteswap-util.c		\
254
	dbus-marshal-recursive-util.c		\
255
	dbus-marshal-validate-util.c		\
256 257
	dbus-message-factory.c			\
	dbus-message-factory.h			\
258
	dbus-message-util.c			\
259 260
	dbus-shell.c				\
	dbus-shell.h				\
261
	$(DBUS_UTIL_arch_sources)		\
262 263 264
	dbus-socket-set.h			\
	dbus-socket-set.c			\
	dbus-socket-set-poll.c			\
265
	dbus-spawn.h				\
266
	dbus-string-util.c			\
267 268
	dbus-sysdeps-util.c			\
	dbus-test.c				\
269
	dbus-test.h
270

271
libdbus_1_la_SOURCES=				\
272 273
	$(DBUS_LIB_SOURCES)			\
	$(DBUS_SHARED_SOURCES)
274

275
libdbus_internal_la_SOURCES=			\
276
	$(DBUS_UTIL_SOURCES)
277

278
BUILT_SOURCES=$(nodist_dbusarchinclude_HEADERS)
279
EXTRA_DIST=dbus-arch-deps.h.in
280

281
noinst_LTLIBRARIES=libdbus-internal.la
282

Simon McVittie's avatar
Simon McVittie committed
283 284 285 286
libdbus_1_la_CPPFLAGS = \
	$(AM_CPPFLAGS) \
	-Ddbus_1_EXPORTS \
	$(NULL)
287 288 289 290 291 292 293

if HAVE_LD_VERSION_SCRIPT
SYMBOL_EXPORT_LDFLAGS=-Wl,--version-script=Version
else
SYMBOL_EXPORT_LDFLAGS=
endif

294
libdbus_1_la_LIBADD= $(LIBDBUS_LIBS)
295 296 297
libdbus_1_la_LDFLAGS = \
	$(AM_LDFLAGS) \
	-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
298
	$(SYMBOL_EXPORT_LDFLAGS) \
299 300
	-no-undefined \
	$(NULL)
301

302
libdbus_internal_la_LIBADD=$(LIBDBUS_LIBS) libdbus-1.la
303

304 305 306 307 308 309 310 311 312 313
if DBUS_WIN
# This must be a separate convenience library, otherwise libtool notices
# that libdbus-1 might contain C++, links it with g++ and links in libstdc++,
# even on Unix where in fact it doesn't contain any C++. For Windows, where
# this code is used, we don't actually need libstdc++.
noinst_LTLIBRARIES += libdbus-init-win.la
libdbus_init_win_la_SOURCES = dbus-init-win.cpp
libdbus_1_la_LIBADD += libdbus-init-win.la
endif

314 315
noinst_PROGRAMS =

316
if DBUS_ENABLE_EMBEDDED_TESTS
317
# We can't actually run this til we've reached test/
318
noinst_PROGRAMS += test-dbus
319 320
endif

321
test_dbus_SOURCES=				\
322
	dbus-test-main.c
323

324
test_dbus_LDADD = libdbus-internal.la
325 326 327

## mop up the gcov files
clean-local:
328
	/bin/rm *.bb *.bbg *.da *.gcov .libs/*.da .libs/*.bbg || true