1 configdir=$(sysconfdir)/dbus-1
2 dbus_daemon_execdir = $(DBUS_DAEMONDIR)
12 DBUS_LAUNCHER_LIBS = \
21 -DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\" \
26 # if assertions are enabled, improve backtraces
27 AM_LDFLAGS = @R_DYNAMIC_LDFLAG@
31 DBUS_SESSION_SERVICE_DIRS = <standard_session_servicedirs />
36 org.freedesktop.dbus-session.plist.in
42 if DBUS_ENABLE_LAUNCHD
43 agentdir=$(LAUNCHD_AGENT_DIR)
44 agent_DATA=org.freedesktop.dbus-session.plist
48 XML_SOURCES=config-loader-libxml.c
51 XML_SOURCES=config-loader-expat.c
54 if DBUS_BUS_ENABLE_KQUEUE
55 DIR_WATCH_SOURCE=dir-watch-kqueue.c
57 if DBUS_BUS_ENABLE_INOTIFY
58 DIR_WATCH_SOURCE=dir-watch-inotify.c
60 if DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX
61 DIR_WATCH_SOURCE=dir-watch-dnotify.c
63 DIR_WATCH_SOURCE=dir-watch-default.c
71 activation-exit-codes.h \
76 config-parser-common.c \
77 config-parser-common.h \
106 dbus_daemon_SOURCES= \
111 $(top_builddir)/dbus/libdbus-internal.la \
115 LAUNCH_HELPER_SOURCES= \
117 config-parser-common.c \
118 config-parser-common.h \
119 config-parser-trivial.c \
120 config-parser-trivial.h \
125 activation-exit-codes.h \
126 activation-helper.h \
129 ## This is the installed launch helper with the setuid checks
130 dbus_daemon_launch_helper_SOURCES= \
131 activation-helper-bin.c \
132 $(LAUNCH_HELPER_SOURCES)
134 dbus_daemon_launch_helper_LDADD= \
135 $(top_builddir)/dbus/libdbus-internal.la \
136 $(DBUS_LAUNCHER_LIBS)
138 ## we build another binary so we can do the launch testing without root privs.
139 ## DO NOT INSTALL THIS FILE
140 dbus_daemon_launch_helper_test_SOURCES= \
141 activation-helper-bin.c \
142 $(LAUNCH_HELPER_SOURCES)
144 dbus_daemon_launch_helper_test_LDADD= \
145 $(top_builddir)/dbus/libdbus-internal.la \
146 $(DBUS_LAUNCHER_LIBS)
148 dbus_daemon_launch_helper_test_CPPFLAGS = \
150 -DACTIVATION_LAUNCHER_TEST
152 ## we build yet another binary so we can do the OOM tests
153 ## DO NOT INSTALL THIS FILE
154 bus_test_launch_helper_SOURCES= \
155 test-launch-helper.c \
156 $(LAUNCH_HELPER_SOURCES)
158 bus_test_launch_helper_LDADD= \
159 $(top_builddir)/dbus/libdbus-internal.la \
160 $(DBUS_LAUNCHER_LIBS)
162 bus_test_launch_helper_CPPFLAGS = \
164 -DACTIVATION_LAUNCHER_TEST \
165 -DACTIVATION_LAUNCHER_DO_OOM
168 dbus_daemon_exec_PROGRAMS = dbus-daemon
170 libexec_PROGRAMS = dbus-daemon-launch-helper
173 ## Note that TESTS has special meaning (stuff to use in make check).
174 ## We don't actually want to run any of these tests until test/ has been
175 ## compiled, so we don't put them in TESTS here; we run them in test/
179 ## we use noinst_PROGRAMS not check_PROGRAMS so that we build
180 ## even when not doing "make check"
182 # run as a test by test/Makefile.am
183 noinst_PROGRAMS += bus-test bus-test-system
186 # run as a test by test/Makefile.am
187 noinst_PROGRAMS += bus-test-launch-helper
188 # this is used by the tests but is not,itself, a test
189 noinst_PROGRAMS += dbus-daemon-launch-helper-test
192 endif DBUS_BUILD_TESTS
194 bus_test_system_SOURCES= \
196 config-parser-common.c \
197 config-parser-common.h \
198 config-parser-trivial.c \
199 config-parser-trivial.h \
204 bus_test_system_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS)
210 bus_test_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS)
212 ## mop up the gcov files
214 /bin/rm *.bb *.bbg *.da *.gcov || true
217 $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus
218 $(mkinstalldirs) $(DESTDIR)$(configdir)/system.d
219 $(mkinstalldirs) $(DESTDIR)$(configdir)/session.d
220 $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services
221 $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/system-services
223 # Install dbus.socket as default implementation of a D-Bus stack.
224 # Deliberately not using $(LN_S) here: ln -fs is not universally portable,
225 # but neither is systemd, so it's OK to assume here that ln complies with SUS.
226 $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/dbus.target.wants
227 ln -fs ../dbus.socket $(DESTDIR)$(systemdsystemunitdir)/dbus.target.wants/dbus.socket
228 # Unconditionally enable D-Bus on systemd installations
229 $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants
230 ln -fs ../dbus.socket $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants/dbus.socket
231 $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/multi-user.target.wants
232 ln -fs ../dbus.service $(DESTDIR)$(systemdsystemunitdir)/multi-user.target.wants/dbus.service
237 if test `id -u` -eq 0; then \
238 chown root:$(DBUS_USER) $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \
239 chmod 4750 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \
241 echo "Not installing $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper binary setuid!"; \
242 echo "You'll need to manually set permissions to root:$(DBUS_USER) and permissions 4750"; \
246 #### Init scripts fun
247 SCRIPT_IN_FILES=messagebus.in \
248 messagebus-config.in \
252 if DBUS_INIT_SCRIPTS_RED_HAT
254 initddir=$(sysconfdir)/rc.d/init.d
263 if DBUS_INIT_SCRIPTS_SLACKWARE
265 initddir=$(sysconfdir)/rc.d/
274 if DBUS_INIT_SCRIPTS_CYGWIN
287 systemdsystemunit_DATA = \
294 EXTRA_DIST=$(CONFIG_IN_FILES) $(SCRIPT_IN_FILES)