1 configdir=$(sysconfdir)/dbus-1
2 dbus_daemon_execdir = $(DBUS_DAEMONDIR)
12 DBUS_LAUNCHER_LIBS = \
18 INCLUDES = -I$(top_srcdir) \
20 -DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\" \
23 # if assertions are enabled, improve backtraces
24 AM_LDFLAGS = @R_DYNAMIC_LDFLAG@
31 org.freedesktop.dbus-session.plist.in
37 if DBUS_ENABLE_LAUNCHD
38 agentdir=$(LAUNCHD_AGENT_DIR)
39 agent_DATA=org.freedesktop.dbus-session.plist
43 XML_SOURCES=config-loader-libxml.c
46 XML_SOURCES=config-loader-expat.c
49 if DBUS_BUS_ENABLE_KQUEUE
50 DIR_WATCH_SOURCE=dir-watch-kqueue.c
52 if DBUS_BUS_ENABLE_INOTIFY
53 DIR_WATCH_SOURCE=dir-watch-inotify.c
55 if DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX
56 DIR_WATCH_SOURCE=dir-watch-dnotify.c
58 DIR_WATCH_SOURCE=dir-watch-default.c
66 activation-exit-codes.h \
71 config-parser-common.c \
72 config-parser-common.h \
101 dbus_daemon_SOURCES= \
105 dbus_daemon_CPPFLAGS = -DDBUS_STATIC_BUILD
107 $(top_builddir)/dbus/libdbus-internal.la \
111 LAUNCH_HELPER_SOURCES= \
113 config-parser-common.c \
114 config-parser-common.h \
115 config-parser-trivial.c \
116 config-parser-trivial.h \
121 activation-exit-codes.h \
122 activation-helper.h \
125 ## This is the installed launch helper with the setuid checks
126 dbus_daemon_launch_helper_SOURCES= \
127 activation-helper-bin.c \
128 $(LAUNCH_HELPER_SOURCES)
130 dbus_daemon_launch_helper_CPPFLAGS = -DDBUS_STATIC_BUILD
131 dbus_daemon_launch_helper_LDADD= \
132 $(top_builddir)/dbus/libdbus-internal.la \
133 $(DBUS_LAUNCHER_LIBS)
135 ## we build another binary so we can do the launch testing without root privs.
136 ## DO NOT INSTALL THIS FILE
137 dbus_daemon_launch_helper_test_SOURCES= \
138 activation-helper-bin.c \
139 $(LAUNCH_HELPER_SOURCES)
141 dbus_daemon_launch_helper_test_LDADD= \
142 $(top_builddir)/dbus/libdbus-internal.la \
143 $(DBUS_LAUNCHER_LIBS)
145 dbus_daemon_launch_helper_test_CPPFLAGS= -DDBUS_STATIC_BUILD \
146 -DACTIVATION_LAUNCHER_TEST
148 ## we build yet another binary so we can do the OOM tests
149 ## DO NOT INSTALL THIS FILE
150 bus_test_launch_helper_SOURCES= \
151 test-launch-helper.c \
152 $(LAUNCH_HELPER_SOURCES)
154 bus_test_launch_helper_LDADD= \
155 $(top_builddir)/dbus/libdbus-internal.la \
156 $(DBUS_LAUNCHER_LIBS)
158 bus_test_launch_helper_CPPFLAGS= -DDBUS_STATIC_BUILD \
159 -DACTIVATION_LAUNCHER_TEST \
160 -DACTIVATION_LAUNCHER_DO_OOM
163 dbus_daemon_exec_PROGRAMS = dbus-daemon
165 libexec_PROGRAMS = dbus-daemon-launch-helper
168 ## Note that TESTS has special meaning (stuff to use in make check).
169 ## We don't actually want to run any of these tests until test/ has been
170 ## compiled, so we don't put them in TESTS here; we run them in test/
174 ## we use noinst_PROGRAMS not check_PROGRAMS so that we build
175 ## even when not doing "make check"
177 # run as a test by test/Makefile.am
178 noinst_PROGRAMS += bus-test bus-test-system
181 # run as a test by test/Makefile.am
182 noinst_PROGRAMS += bus-test-launch-helper
183 # this is used by the tests but is not,itself, a test
184 noinst_PROGRAMS += dbus-daemon-launch-helper-test
187 endif DBUS_BUILD_TESTS
189 bus_test_system_SOURCES= \
191 config-parser-common.c \
192 config-parser-common.h \
193 config-parser-trivial.c \
194 config-parser-trivial.h \
199 bus_test_system_CPPFLAGS = -DDBUS_STATIC_BUILD
200 bus_test_system_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS)
206 bus_test_CPPFLAGS = -DDBUS_STATIC_BUILD
207 bus_test_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS)
209 ## mop up the gcov files
211 /bin/rm *.bb *.bbg *.da *.gcov || true
214 $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus
215 $(mkinstalldirs) $(DESTDIR)$(configdir)/system.d
216 $(mkinstalldirs) $(DESTDIR)$(configdir)/session.d
217 $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services
218 $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/system-services
220 # Install dbus.socket as default implementation of a D-Bus stack.
221 # Deliberately not using $(LN_S) here: ln -fs is not universally portable,
222 # but neither is systemd, so it's OK to assume here that ln complies with SUS.
223 $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/dbus.target.wants
224 ln -fs ../dbus.socket $(DESTDIR)$(systemdsystemunitdir)/dbus.target.wants/dbus.socket
225 # Unconditionally enable D-Bus on systemd installations
226 $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants
227 ln -fs ../dbus.socket $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants/dbus.socket
228 $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/multi-user.target.wants
229 ln -fs ../dbus.service $(DESTDIR)$(systemdsystemunitdir)/multi-user.target.wants/dbus.service
234 if test `id -u` -eq 0; then \
235 chown root:$(DBUS_USER) $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \
236 chmod 4750 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \
238 echo "Not installing $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper binary setuid!"; \
239 echo "You'll need to manually set permissions to root:$(DBUS_USER) and permissions 4750"; \
243 #### Init scripts fun
244 SCRIPT_IN_FILES=messagebus.in \
245 messagebus-config.in \
249 if DBUS_INIT_SCRIPTS_RED_HAT
251 initddir=$(sysconfdir)/rc.d/init.d
260 if DBUS_INIT_SCRIPTS_SLACKWARE
262 initddir=$(sysconfdir)/rc.d/
271 if DBUS_INIT_SCRIPTS_CYGWIN
284 systemdsystemunit_DATA = \
291 EXTRA_DIST=$(CONFIG_IN_FILES) $(SCRIPT_IN_FILES)