Makefile.am 6.71 KB
Newer Older
1

2 3
configdir=$(sysconfdir)/dbus-1

4
INCLUDES=-I$(top_builddir) -I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) @PIC_CFLAGS@ -DDBUS_COMPILATION	\
5 6 7
	-DDBUS_MACHINE_UUID_FILE=\""$(localstatedir)/lib/dbus/machine-id"\"		\
	-DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\"			\
	-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 13

lib_LTLIBRARIES=libdbus-1.la

14 15 16 17 18 19 20
#
# Deal with W32 .def and version-info.rc stuff
#
if DBUS_WIN
SUFFIXES = rc

.rc.o:
21
	$(WINDRES) $< -o $@
22 23 24 25 26 27 28

dbus_res = versioninfo.o
dbus_res_ldflag = -Wl,$(dbus_res)
no_undefined = -no-undefined
export_symbols = -export-symbols $(srcdir)/dbus-1.def

install-def-file:
29
	test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
30 31 32 33 34 35 36 37 38 39 40 41
	$(INSTALL) dbus-1.def $(DESTDIR)$(libdir)/dbus-1.def

uninstall-def-file:
	-rm $(DESTDIR)$(libdir)/dbus-1.def

libdbus_1_la_DEPENDENCIES = $(dbus_res) dbus-1.def
intllibs =

else
dbus_res =
dbus_res_ldflag =
no_undefined =
Tor Lillqvist's avatar
Tor Lillqvist committed
42 43 44
## don't export symbols that start with "_" (we use this
## convention for internal symbols)
export_symbols = -export-symbols-regex "^[^_].*"
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
install-def-file:
uninstall-def-file:

intllibs = @LTLIBINTL@

endif


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

DBUS_SHARED_arch_sources = 			\
62
	dbus-file-win.c 			\
63
	dbus-pipe-win.c 			\
64 65 66 67 68 69 70 71 72 73 74
	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
DBUS_LIB_arch_sources = 			\
75 76
	dbus-uuidgen.c				\
	dbus-uuidgen.h				\
77 78 79 80
	dbus-server-unix.c 			\
	dbus-server-unix.h

DBUS_SHARED_arch_sources = 			\
81
	dbus-file-unix.c 			\
82
	dbus-pipe-unix.c 			\
83 84 85 86 87 88 89 90 91 92 93 94 95 96
	dbus-sysdeps-unix.c 			\
	dbus-sysdeps-unix.h			\
	dbus-sysdeps-pthread.c			\
	dbus-transport-unix.c			\
	dbus-transport-unix.h			\
	dbus-userdb.c				\
	dbus-userdb.h

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

97
dbusinclude_HEADERS=				\
98
	dbus.h					\
99
	dbus-address.h				\
100
	dbus-bus.h				\
101
	dbus-connection.h			\
102
	dbus-errors.h				\
103
	dbus-macros.h				\
104
	dbus-memory.h				\
105
	dbus-message.h				\
106
	dbus-misc.h				\
107
	dbus-pending-call.h			\
108
	dbus-protocol.h				\
109
	dbus-server.h				\
110
	dbus-shared.h				\
111
	dbus-signature.h			\
112
	dbus-spawn.h				\
113
	dbus-threads.h				\
John Palmieri's avatar
John Palmieri committed
114
	dbus-types.h
Thiago Macieira's avatar
Thiago Macieira committed
115

116

117 118 119
dbusarchinclude_HEADERS=			\
	dbus-arch-deps.h

120 121 122
### source code that goes in the installed client library
### and is specific to library functionality
DBUS_LIB_SOURCES=				\
123
	dbus-address.c				\
124 125
	dbus-auth.c				\
	dbus-auth.h				\
126 127
	dbus-auth-script.c			\
	dbus-auth-script.h			\
128
	dbus-bus.c				\
129 130
	dbus-connection.c			\
	dbus-connection-internal.h		\
131 132
	dbus-credentials.c			\
	dbus-credentials.h			\
133
	dbus-errors.c				\
134 135
	dbus-keyring.c				\
	dbus-keyring.h				\
136 137
	dbus-marshal-header.c			\
	dbus-marshal-header.h			\
138 139
	dbus-marshal-byteswap.c			\
	dbus-marshal-byteswap.h			\
140 141 142 143
	dbus-marshal-recursive.c		\
	dbus-marshal-recursive.h		\
	dbus-marshal-validate.c			\
	dbus-marshal-validate.h			\
144 145
	dbus-message.c				\
	dbus-message-internal.h			\
146
	dbus-message-private.h			\
147
	dbus-misc.c				\
148
	dbus-nonce.c				\
149 150
	dbus-object-tree.c			\
	dbus-object-tree.h			\
151
	dbus-pending-call.c			\
152
	dbus-pending-call-internal.h		\
153 154
	dbus-resources.c			\
	dbus-resources.h			\
155
	dbus-server.c				\
156 157
	dbus-server-debug-pipe.c		\
	dbus-server-debug-pipe.h		\
158
	dbus-server-protected.h			\
159 160
	dbus-server-socket.c			\
	dbus-server-socket.h			\
161
	$(DBUS_LIB_arch_sources)		\
162 163
	dbus-sha.c				\
	dbus-sha.h				\
164
	dbus-signature.c			\
165 166
	dbus-timeout.c				\
	dbus-timeout.h				\
167
	dbus-threads-internal.h			\
168
	dbus-threads.c				\
169 170 171
	dbus-transport.c			\
	dbus-transport.h			\
	dbus-transport-protected.h		\
172 173
	dbus-transport-socket.c			\
	dbus-transport-socket.h			\
174 175 176
	dbus-watch.c				\
	dbus-watch.h

177 178 179
##	dbus-md5.c				\
##	dbus-md5.h				\

180 181 182 183 184
### source code that goes in the installed client library
### AND is generic utility functionality used by the 
### daemon or test programs (all symbols in here should 
### be underscore-prefixed)
DBUS_SHARED_SOURCES=				\
185 186
	dbus-dataslot.c				\
	dbus-dataslot.h				\
187 188
	dbus-file.c                 \
	dbus-file.h                 \
189
	dbus-hash.c				\
190 191
	dbus-hash.h				\
	dbus-internals.c			\
192 193
	dbus-internals.h			\
	dbus-list.c				\
194
	dbus-list.h				\
195 196
	dbus-marshal-basic.c			\
	dbus-marshal-basic.h			\
197
	dbus-memory.c				\
198 199
	dbus-mempool.c				\
	dbus-mempool.h				\
200 201
	dbus-pipe.c                 \
	dbus-pipe.h                 \
202 203
	dbus-string.c				\
	dbus-string.h				\
204
	dbus-string-private.h			\
205
	$(DBUS_SHARED_arch_sources)		\
206
	dbus-sysdeps.c				\
207
	dbus-sysdeps.h
208

209 210
### source code that is generic utility functionality used
### by the bus daemon or test apps, but is NOT included
John Palmieri's avatar
John Palmieri committed
211
### in the D-Bus client library (all symbols in here 
212 213 214
### should be underscore-prefixed but don't really need 
### to be unless they move to DBUS_SHARED_SOURCES later)
DBUS_UTIL_SOURCES=				\
215
	dbus-auth-util.c			\
216
	dbus-credentials-util.c			\
217
	dbus-mainloop.c				\
218
	dbus-mainloop.h				\
219
	dbus-marshal-byteswap-util.c		\
220
	dbus-marshal-recursive-util.c		\
221
	dbus-marshal-validate-util.c		\
222 223
	dbus-message-factory.c			\
	dbus-message-factory.h			\
224
	dbus-message-util.c			\
225 226
	dbus-shell.c				\
	dbus-shell.h				\
227
	$(DBUS_UTIL_arch_sources)		\
228
	dbus-spawn.h				\
229
	dbus-string-util.c			\
230 231
	dbus-sysdeps-util.c			\
	dbus-test.c				\
232
	dbus-test.h
233

234
libdbus_1_la_SOURCES=				\
235 236
	$(DBUS_LIB_SOURCES)			\
	$(DBUS_SHARED_SOURCES)
237 238

libdbus_convenience_la_SOURCES=			\
239 240 241
	$(DBUS_LIB_SOURCES)			\
	$(DBUS_SHARED_SOURCES)			\
	$(DBUS_UTIL_SOURCES)
242

John Palmieri's avatar
John Palmieri committed
243

John Palmieri's avatar
John Palmieri committed
244
BUILT_SOURCES=$(dbusarchinclude_HEADERS)
245
EXTRA_DIST=dbus-arch-deps.h.in dbus-1.def
246

247 248 249 250 251
## this library is the same as libdbus, but exports all the symbols
## and is only used for static linking within the dbus package.
noinst_LTLIBRARIES=libdbus-convenience.la

libdbus_1_la_LIBADD= $(DBUS_CLIENT_LIBS)
Tor Lillqvist's avatar
Tor Lillqvist committed
252
libdbus_1_la_LDFLAGS= $(export_symbols) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -no-undefined @R_DYNAMIC_LDFLAG@ @PIC_LDFLAGS@
253 254

libdbus_convenience_la_LDFLAGS=@R_DYNAMIC_LDFLAG@
255

256 257 258
## note that TESTS has special meaning (stuff to use in make check)
## so if adding tests not to be run in make check, don't add them to 
## 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 263 264 265 266 267 268
else
TESTS=
endif

## we use noinst_PROGRAMS not check_PROGRAMS so that we build 
## even when not doing "make check"
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 277 278 279
install-data-local: install-def-file

uninstall-local: uninstall-def-file

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