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@
34 org.freedesktop.dbus-session.plist.in
40 if DBUS_ENABLE_LAUNCHD
41 agentdir=$(LAUNCHD_AGENT_DIR)
42 agent_DATA=org.freedesktop.dbus-session.plist
46 XML_SOURCES=config-loader-libxml.c
49 XML_SOURCES=config-loader-expat.c
52 if DBUS_BUS_ENABLE_KQUEUE
53 DIR_WATCH_SOURCE=dir-watch-kqueue.c
55 if DBUS_BUS_ENABLE_INOTIFY
56 DIR_WATCH_SOURCE=dir-watch-inotify.c
58 if DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX
59 DIR_WATCH_SOURCE=dir-watch-dnotify.c
61 DIR_WATCH_SOURCE=dir-watch-default.c
69 activation-exit-codes.h \
74 config-parser-common.c \
75 config-parser-common.h \
104 dbus_daemon_SOURCES= \
109 $(top_builddir)/dbus/libdbus-internal.la \
113 LAUNCH_HELPER_SOURCES= \
115 config-parser-common.c \
116 config-parser-common.h \
117 config-parser-trivial.c \
118 config-parser-trivial.h \
123 activation-exit-codes.h \
124 activation-helper.h \
127 ## This is the installed launch helper with the setuid checks
128 dbus_daemon_launch_helper_SOURCES= \
129 activation-helper-bin.c \
130 $(LAUNCH_HELPER_SOURCES)
132 dbus_daemon_launch_helper_LDADD= \
133 $(top_builddir)/dbus/libdbus-internal.la \
134 $(DBUS_LAUNCHER_LIBS)
136 ## we build another binary so we can do the launch testing without root privs.
137 ## DO NOT INSTALL THIS FILE
138 dbus_daemon_launch_helper_test_SOURCES= \
139 activation-helper-bin.c \
140 $(LAUNCH_HELPER_SOURCES)
142 dbus_daemon_launch_helper_test_LDADD= \
143 $(top_builddir)/dbus/libdbus-internal.la \
144 $(DBUS_LAUNCHER_LIBS)
146 dbus_daemon_launch_helper_test_CPPFLAGS = \
148 -DACTIVATION_LAUNCHER_TEST
150 ## we build yet another binary so we can do the OOM tests
151 ## DO NOT INSTALL THIS FILE
152 bus_test_launch_helper_SOURCES= \
153 test-launch-helper.c \
154 $(LAUNCH_HELPER_SOURCES)
156 bus_test_launch_helper_LDADD= \
157 $(top_builddir)/dbus/libdbus-internal.la \
158 $(DBUS_LAUNCHER_LIBS)
160 bus_test_launch_helper_CPPFLAGS = \
162 -DACTIVATION_LAUNCHER_TEST \
163 -DACTIVATION_LAUNCHER_DO_OOM
166 dbus_daemon_exec_PROGRAMS = dbus-daemon
168 libexec_PROGRAMS = dbus-daemon-launch-helper
171 ## Note that TESTS has special meaning (stuff to use in make check).
172 ## We don't actually want to run any of these tests until test/ has been
173 ## compiled, so we don't put them in TESTS here; we run them in test/
177 ## we use noinst_PROGRAMS not check_PROGRAMS so that we build
178 ## even when not doing "make check"
180 # run as a test by test/Makefile.am
181 noinst_PROGRAMS += bus-test bus-test-system
184 # run as a test by test/Makefile.am
185 noinst_PROGRAMS += bus-test-launch-helper
186 # this is used by the tests but is not,itself, a test
187 noinst_PROGRAMS += dbus-daemon-launch-helper-test
190 endif DBUS_BUILD_TESTS
192 bus_test_system_SOURCES= \
194 config-parser-common.c \
195 config-parser-common.h \
196 config-parser-trivial.c \
197 config-parser-trivial.h \
202 bus_test_system_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS)
208 bus_test_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS)
210 ## mop up the gcov files
212 /bin/rm *.bb *.bbg *.da *.gcov || true
215 $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus
216 $(mkinstalldirs) $(DESTDIR)$(configdir)/system.d
217 $(mkinstalldirs) $(DESTDIR)$(configdir)/session.d
218 $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services
219 $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/system-services
221 # Install dbus.socket as default implementation of a D-Bus stack.
222 # Deliberately not using $(LN_S) here: ln -fs is not universally portable,
223 # but neither is systemd, so it's OK to assume here that ln complies with SUS.
224 $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/dbus.target.wants
225 ln -fs ../dbus.socket $(DESTDIR)$(systemdsystemunitdir)/dbus.target.wants/dbus.socket
226 # Unconditionally enable D-Bus on systemd installations
227 $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants
228 ln -fs ../dbus.socket $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants/dbus.socket
229 $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/multi-user.target.wants
230 ln -fs ../dbus.service $(DESTDIR)$(systemdsystemunitdir)/multi-user.target.wants/dbus.service
235 if test `id -u` -eq 0; then \
236 chown root:$(DBUS_USER) $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \
237 chmod 4750 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \
239 echo "Not installing $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper binary setuid!"; \
240 echo "You'll need to manually set permissions to root:$(DBUS_USER) and permissions 4750"; \
244 #### Init scripts fun
245 SCRIPT_IN_FILES=messagebus.in \
246 messagebus-config.in \
250 if DBUS_INIT_SCRIPTS_RED_HAT
252 initddir=$(sysconfdir)/rc.d/init.d
261 if DBUS_INIT_SCRIPTS_SLACKWARE
263 initddir=$(sysconfdir)/rc.d/
272 if DBUS_INIT_SCRIPTS_CYGWIN
285 systemdsystemunit_DATA = \
292 EXTRA_DIST=$(CONFIG_IN_FILES) $(SCRIPT_IN_FILES)