1 dbusdatadir=$(datadir)/dbus-1
2 legacydbusdatadir=$(sysconfdir)/dbus-1
3 dbus_daemon_execdir = $(DBUS_DAEMONDIR)
16 DBUS_LAUNCHER_LIBS = \
24 $(DBUS_STATIC_BUILD_CPPFLAGS) \
27 -DDBUS_SYSTEM_CONFIG_FILE=\""$(dbusdatadir)/system.conf"\" \
34 # if assertions are enabled, improve backtraces
35 AM_LDFLAGS = @R_DYNAMIC_LDFLAG@
42 legacy-config/session.conf.in \
43 legacy-config/system.conf.in \
44 org.freedesktop.dbus-session.plist.in \
45 example-system-enable-stats.conf.in \
46 example-session-disable-stats.conf.in \
49 dbusdata_DATA = session.conf
50 legacydbusdata_DATA = legacy-config/session.conf
53 dbusdata_DATA += system.conf
54 legacydbusdata_DATA += legacy-config/system.conf
57 examplesdir = ${docdir}/examples
59 example-system-enable-stats.conf \
60 example-session-disable-stats.conf \
63 if DBUS_ENABLE_LAUNCHD
64 agentdir=$(LAUNCHD_AGENT_DIR)
65 agent_DATA=org.freedesktop.dbus-session.plist
68 XML_SOURCES=config-loader-expat.c
70 if DBUS_BUS_ENABLE_KQUEUE
71 DIR_WATCH_SOURCE=dir-watch-kqueue.c
73 if DBUS_BUS_ENABLE_INOTIFY
74 DIR_WATCH_SOURCE=dir-watch-inotify.c
76 DIR_WATCH_SOURCE=dir-watch-default.c
83 activation-exit-codes.h \
94 config-parser-common.c \
95 config-parser-common.h \
102 $(DIR_WATCH_SOURCE) \
128 dbus_daemon_SOURCES= \
133 $(top_builddir)/dbus/libdbus-1.la \
134 $(top_builddir)/dbus/libdbus-internal.la \
138 LAUNCH_HELPER_SOURCES= \
140 config-parser-common.c \
141 config-parser-common.h \
142 config-parser-trivial.c \
143 config-parser-trivial.h \
148 activation-exit-codes.h \
149 activation-helper.h \
152 ## This is the installed launch helper with the setuid checks
153 dbus_daemon_launch_helper_SOURCES= \
154 activation-helper-bin.c \
155 $(LAUNCH_HELPER_SOURCES)
157 dbus_daemon_launch_helper_LDADD= \
158 $(top_builddir)/dbus/libdbus-1.la \
159 $(top_builddir)/dbus/libdbus-internal.la \
160 $(DBUS_LAUNCHER_LIBS)
162 ## we build another binary so we can do the launch testing without root privs.
163 ## DO NOT INSTALL THIS FILE
164 dbus_daemon_launch_helper_test_SOURCES= \
165 activation-helper-bin.c \
166 $(LAUNCH_HELPER_SOURCES)
168 dbus_daemon_launch_helper_test_LDADD= \
169 $(top_builddir)/dbus/libdbus-1.la \
170 $(top_builddir)/dbus/libdbus-internal.la \
171 $(DBUS_LAUNCHER_LIBS)
173 dbus_daemon_launch_helper_test_CPPFLAGS = \
175 -DACTIVATION_LAUNCHER_TEST
177 ## we build yet another binary so we can do the OOM tests
178 ## DO NOT INSTALL THIS FILE
179 test_bus_launch_helper_SOURCES= \
180 test-launch-helper.c \
181 $(LAUNCH_HELPER_SOURCES)
183 test_bus_launch_helper_LDADD= \
184 $(top_builddir)/dbus/libdbus-1.la \
185 $(top_builddir)/dbus/libdbus-internal.la \
186 $(DBUS_LAUNCHER_LIBS)
189 test_bus_launch_helper_CPPFLAGS = \
191 -DACTIVATION_LAUNCHER_TEST \
192 -DACTIVATION_LAUNCHER_DO_OOM
195 dbus_daemon_exec_PROGRAMS = dbus-daemon
197 libexec_PROGRAMS = dbus-daemon-launch-helper
200 ## Note that TESTS has special meaning (stuff to use in make check).
201 ## We don't actually want to run any of these tests until test/ has been
202 ## compiled, so we don't put them in TESTS here; we run them in test/
205 if DBUS_ENABLE_EMBEDDED_TESTS
206 ## we use noinst_PROGRAMS not check_PROGRAMS so that we build
207 ## even when not doing "make check"
209 # run as a test by test/Makefile.am
210 noinst_PROGRAMS += test-bus
213 # run as a test by test/Makefile.am
214 noinst_PROGRAMS += test-bus-launch-helper test-bus-system
215 # this is used by the tests but is not,itself, a test
216 noinst_PROGRAMS += dbus-daemon-launch-helper-test
219 endif DBUS_ENABLE_EMBEDDED_TESTS
221 test_bus_system_SOURCES= \
223 config-parser-common.c \
224 config-parser-common.h \
225 config-parser-trivial.c \
226 config-parser-trivial.h \
231 test_bus_system_LDADD = \
232 $(top_builddir)/dbus/libdbus-1.la \
233 $(top_builddir)/dbus/libdbus-internal.la \
242 $(top_builddir)/dbus/libdbus-1.la \
243 $(top_builddir)/dbus/libdbus-internal.la \
247 ## mop up the gcov files
249 /bin/rm *.bb *.bbg *.da *.gcov || true
252 $(mkinstalldirs) $(DESTDIR)$(dbusdatadir)/session.d
253 $(mkinstalldirs) $(DESTDIR)$(dbusdatadir)/services
255 $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus
256 $(mkinstalldirs) $(DESTDIR)$(dbusdatadir)/system.d
257 $(mkinstalldirs) $(DESTDIR)$(dbusdatadir)/system-services
260 # Install dbus.socket as default implementation of a D-Bus stack.
261 # Deliberately not using $(LN_S) here: ln -fs is not universally portable,
262 # but neither is systemd, so it's OK to assume here that ln complies with SUS.
263 $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/dbus.target.wants
264 ln -fs ../dbus.socket $(DESTDIR)$(systemdsystemunitdir)/dbus.target.wants/dbus.socket
265 # Unconditionally enable D-Bus on systemd installations
266 $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants
267 ln -fs ../dbus.socket $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants/dbus.socket
268 $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/multi-user.target.wants
269 ln -fs ../dbus.service $(DESTDIR)$(systemdsystemunitdir)/multi-user.target.wants/dbus.service
271 if DBUS_ENABLE_USER_SESSION
272 $(mkinstalldirs) $(DESTDIR)$(systemduserunitdir)/sockets.target.wants
273 ln -fs ../dbus.socket $(DESTDIR)$(systemduserunitdir)/sockets.target.wants/dbus.socket
278 if test `id -u` -eq 0; then \
279 chown root:$(DBUS_USER) $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \
280 chmod 4750 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \
282 echo "Not installing $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper binary setuid!"; \
283 echo "You'll need to manually set permissions to root:$(DBUS_USER) and permissions 4750"; \
287 #### Init scripts fun
288 SCRIPT_IN_FILES=messagebus.in \
289 messagebus-config.in \
293 if DBUS_INIT_SCRIPTS_RED_HAT
295 initddir=$(sysconfdir)/rc.d/init.d
304 if DBUS_INIT_SCRIPTS_SLACKWARE
306 initddir=$(sysconfdir)/rc.d/
315 if DBUS_INIT_SCRIPTS_CYGWIN
327 systemd-user/dbus.service.in \
328 systemd-user/dbus.socket.in \
331 systemdsystemunit_DATA = \
336 if DBUS_ENABLE_USER_SESSION
337 systemduserunit_DATA = \
338 systemd-user/dbus.service \
339 systemd-user/dbus.socket \
345 EXTRA_DIST=$(CONFIG_IN_FILES) $(SCRIPT_IN_FILES)