1 dbusdatadir=$(datadir)/dbus-1
2 legacydbusdatadir=$(sysconfdir)/dbus-1
3 dbus_daemon_execdir = $(DBUS_DAEMONDIR)
4 # Always lib, even if ${libdir} is lib64 or lib/x86_64-linux-gnu
5 systemdtmpfilesdir = $(prefix)/lib/tmpfiles.d
6 systemdsysusersdir = $(prefix)/lib/sysusers.d
9 $(CODE_COVERAGE_LIBS) \
19 DBUS_LAUNCHER_LIBS = \
20 $(CODE_COVERAGE_LIBS) \
27 $(CODE_COVERAGE_CPPFLAGS) \
29 $(DBUS_STATIC_BUILD_CPPFLAGS) \
32 -DDBUS_SYSTEM_CONFIG_FILE=\""$(dbusdatadir)/system.conf"\" \
37 # if assertions are enabled, improve backtraces
38 AM_LDFLAGS = @R_DYNAMIC_LDFLAG@ -Wl,-z,relro,-z,now
41 $(CODE_COVERAGE_CFLAGS) \
49 legacy-config/session.conf.in \
50 legacy-config/system.conf.in \
51 org.freedesktop.dbus-session.plist.in \
52 example-system-enable-stats.conf.in \
53 example-session-disable-stats.conf.in \
56 dbusdata_DATA = session.conf
57 legacydbusdata_DATA = legacy-config/session.conf
60 dbusdata_DATA += system.conf
61 legacydbusdata_DATA += legacy-config/system.conf
64 examplesdir = ${docdir}/examples
66 example-system-enable-stats.conf \
67 example-session-disable-stats.conf \
70 if DBUS_ENABLE_LAUNCHD
71 agentdir=$(LAUNCHD_AGENT_DIR)
72 agent_DATA=org.freedesktop.dbus-session.plist
75 if DBUS_BUS_ENABLE_KQUEUE
76 DIR_WATCH_SOURCE=dir-watch-kqueue.c
78 if DBUS_BUS_ENABLE_INOTIFY
79 DIR_WATCH_SOURCE=dir-watch-inotify.c
81 DIR_WATCH_SOURCE=dir-watch-default.c
88 activation-exit-codes.h \
97 config-loader-expat.c \
100 config-parser-common.c \
101 config-parser-common.h \
108 $(DIR_WATCH_SOURCE) \
132 dbus_daemon_SOURCES= \
137 $(top_builddir)/dbus/libdbus-1.la \
138 $(top_builddir)/dbus/libdbus-internal.la \
142 LAUNCH_HELPER_SOURCES= \
143 config-loader-expat.c \
144 config-parser-common.c \
145 config-parser-common.h \
146 config-parser-trivial.c \
147 config-parser-trivial.h \
152 activation-exit-codes.h \
153 activation-helper.h \
156 ## This is the installed launch helper with the setuid checks
157 dbus_daemon_launch_helper_SOURCES= \
158 activation-helper-bin.c \
159 $(LAUNCH_HELPER_SOURCES)
161 dbus_daemon_launch_helper_LDADD= \
162 $(top_builddir)/dbus/libdbus-1.la \
163 $(top_builddir)/dbus/libdbus-internal.la \
164 $(DBUS_LAUNCHER_LIBS)
166 ## we build another binary so we can do the launch testing without root privs.
167 ## DO NOT INSTALL THIS FILE
168 dbus_daemon_launch_helper_test_SOURCES= \
169 activation-helper-bin.c \
170 $(LAUNCH_HELPER_SOURCES)
172 dbus_daemon_launch_helper_test_LDADD= \
173 $(top_builddir)/dbus/libdbus-1.la \
174 $(top_builddir)/dbus/libdbus-internal.la \
175 $(DBUS_LAUNCHER_LIBS)
177 dbus_daemon_launch_helper_test_CPPFLAGS = \
179 -DACTIVATION_LAUNCHER_TEST
181 ## we build yet another binary so we can do the OOM tests
182 ## DO NOT INSTALL THIS FILE
183 test_bus_launch_helper_SOURCES= \
184 test-launch-helper.c \
185 $(LAUNCH_HELPER_SOURCES)
187 test_bus_launch_helper_LDADD= \
188 $(top_builddir)/dbus/libdbus-1.la \
189 $(top_builddir)/dbus/libdbus-internal.la \
190 $(DBUS_LAUNCHER_LIBS)
193 test_bus_launch_helper_CPPFLAGS = \
195 -DACTIVATION_LAUNCHER_TEST \
196 -DACTIVATION_LAUNCHER_DO_OOM
199 dbus_daemon_exec_PROGRAMS = dbus-daemon
201 libexec_PROGRAMS = dbus-daemon-launch-helper
204 ## Note that TESTS has special meaning (stuff to use in make check).
205 ## We don't actually want to run any of these tests until test/ has been
206 ## compiled, so we don't put them in TESTS here; we run them in test/
209 if DBUS_ENABLE_EMBEDDED_TESTS
210 ## we use noinst_PROGRAMS not check_PROGRAMS so that we build
211 ## even when not doing "make check"
213 # run as a test by test/Makefile.am
214 noinst_PROGRAMS += test-bus
217 # run as a test by test/Makefile.am
218 noinst_PROGRAMS += test-bus-launch-helper test-bus-system
219 # this is used by the tests but is not,itself, a test
220 noinst_PROGRAMS += dbus-daemon-launch-helper-test
223 endif DBUS_ENABLE_EMBEDDED_TESTS
225 test_bus_system_SOURCES= \
226 config-loader-expat.c \
227 config-parser-common.c \
228 config-parser-common.h \
229 config-parser-trivial.c \
230 config-parser-trivial.h \
235 test_bus_system_LDADD = \
236 $(top_builddir)/dbus/libdbus-1.la \
237 $(top_builddir)/dbus/libdbus-internal.la \
246 $(top_builddir)/dbus/libdbus-1.la \
247 $(top_builddir)/dbus/libdbus-internal.la \
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 # Unconditionally enable D-Bus on systemd installations
264 $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants
265 ln -fs ../dbus.socket $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants/dbus.socket
267 if DBUS_ENABLE_USER_SESSION
268 $(mkinstalldirs) $(DESTDIR)$(systemduserunitdir)/sockets.target.wants
269 ln -fs ../dbus.socket $(DESTDIR)$(systemduserunitdir)/sockets.target.wants/dbus.socket
274 if test `id -u` -eq 0; then \
275 chown root:$(DBUS_USER) $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \
276 chmod 4750 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \
278 echo "Not installing $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper binary setuid!"; \
279 echo "You'll need to manually set permissions to root:$(DBUS_USER) and permissions 4750"; \
286 systemd-user/dbus.service.in \
287 systemd-user/dbus.socket.in \
288 sysusers.d/dbus.conf.in \
289 tmpfiles.d/dbus.conf.in \
293 systemdsystemunit_DATA = \
297 nodist_systemdsysusers_DATA = \
300 nodist_systemdtmpfiles_DATA = \
301 tmpfiles.d/dbus.conf \
305 if DBUS_ENABLE_USER_SESSION
306 systemduserunit_DATA = \
307 systemd-user/dbus.service \
308 systemd-user/dbus.socket \
312 # Add rules for code-coverage testing, as defined by AX_CODE_COVERAGE
313 include $(top_srcdir)/aminclude_static.am