1 configdir=$(sysconfdir)/dbus-1
2 dbus_daemon_execdir = $(DBUS_DAEMONDIR)
4 INCLUDES = -I$(top_srcdir) \
6 -DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\" \
14 org.freedesktop.dbus-session.plist.in
20 if DBUS_ENABLE_LAUNCHD
21 agentdir=$(LAUNCHD_AGENT_DIR)
22 agent_DATA=org.freedesktop.dbus-session.plist
26 XML_SOURCES=config-loader-libxml.c
29 XML_SOURCES=config-loader-expat.c
32 if DBUS_BUS_ENABLE_KQUEUE
33 DIR_WATCH_SOURCE=dir-watch-kqueue.c
35 if DBUS_BUS_ENABLE_INOTIFY
36 DIR_WATCH_SOURCE=dir-watch-inotify.c
38 if DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX
39 DIR_WATCH_SOURCE=dir-watch-dnotify.c
41 DIR_WATCH_SOURCE=dir-watch-default.c
49 activation-exit-codes.h \
54 config-parser-common.c \
55 config-parser-common.h \
84 dbus_daemon_SOURCES= \
88 dbus_daemon_CPPFLAGS = -DDBUS_STATIC_BUILD
90 $(top_builddir)/dbus/libdbus-internal.la \
94 dbus_daemon_LDFLAGS=@R_DYNAMIC_LDFLAG@
96 LAUNCH_HELPER_SOURCES= \
98 config-parser-common.c \
99 config-parser-common.h \
100 config-parser-trivial.c \
101 config-parser-trivial.h \
106 activation-exit-codes.h \
107 activation-helper.h \
110 ## This is the installed launch helper with the setuid checks
111 dbus_daemon_launch_helper_SOURCES= \
112 activation-helper-bin.c \
113 $(LAUNCH_HELPER_SOURCES)
115 dbus_daemon_launch_helper_CPPFLAGS = -DDBUS_STATIC_BUILD
116 dbus_daemon_launch_helper_LDADD= \
117 $(top_builddir)/dbus/libdbus-internal.la \
118 $(DBUS_LAUNCHER_LIBS)
120 dbus_daemon_launch_helper_LDFLAGS=@R_DYNAMIC_LDFLAG@
122 ## we build another binary so we can do the launch testing without root privs.
123 ## DO NOT INSTALL THIS FILE
124 dbus_daemon_launch_helper_test_SOURCES= \
125 activation-helper-bin.c \
126 $(LAUNCH_HELPER_SOURCES)
128 dbus_daemon_launch_helper_test_LDADD= \
129 $(top_builddir)/dbus/libdbus-internal.la \
130 $(DBUS_LAUNCHER_LIBS)
132 dbus_daemon_launch_helper_test_LDFLAGS=@R_DYNAMIC_LDFLAG@
133 dbus_daemon_launch_helper_test_CPPFLAGS= -DDBUS_STATIC_BUILD \
134 -DACTIVATION_LAUNCHER_TEST
136 ## we build yet another binary so we can do the OOM tests
137 ## DO NOT INSTALL THIS FILE
138 bus_test_launch_helper_SOURCES= \
139 test-launch-helper.c \
140 $(LAUNCH_HELPER_SOURCES)
142 bus_test_launch_helper_LDADD= \
143 $(top_builddir)/dbus/libdbus-internal.la \
144 $(DBUS_LAUNCHER_LIBS)
146 bus_test_launch_helper_LDFLAGS=@R_DYNAMIC_LDFLAG@
147 bus_test_launch_helper_CPPFLAGS= -DDBUS_STATIC_BUILD \
148 -DACTIVATION_LAUNCHER_TEST \
149 -DACTIVATION_LAUNCHER_DO_OOM
152 dbus_daemon_exec_PROGRAMS = dbus-daemon
154 libexec_PROGRAMS = dbus-daemon-launch-helper
157 ## Note that TESTS has special meaning (stuff to use in make check).
158 ## We don't actually want to run any of these tests until test/ has been
159 ## compiled, so we don't put them in TESTS here; we run them in test/
163 ## we use noinst_PROGRAMS not check_PROGRAMS so that we build
164 ## even when not doing "make check"
166 # run as a test by test/Makefile.am
167 noinst_PROGRAMS += bus-test bus-test-system
170 # run as a test by test/Makefile.am
171 noinst_PROGRAMS += bus-test-launch-helper
172 # this is used by the tests but is not,itself, a test
173 noinst_PROGRAMS += dbus-daemon-launch-helper-test
176 endif DBUS_BUILD_TESTS
178 bus_test_system_SOURCES= \
180 config-parser-common.c \
181 config-parser-common.h \
182 config-parser-trivial.c \
183 config-parser-trivial.h \
188 bus_test_system_CPPFLAGS = -DDBUS_STATIC_BUILD
189 bus_test_system_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS)
190 bus_test_system_LDFLAGS=@R_DYNAMIC_LDFLAG@
196 bus_test_CPPFLAGS = -DDBUS_STATIC_BUILD
197 bus_test_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS)
198 bus_test_LDFLAGS=@R_DYNAMIC_LDFLAG@
200 ## mop up the gcov files
202 /bin/rm *.bb *.bbg *.da *.gcov || true
205 $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus
206 $(mkinstalldirs) $(DESTDIR)$(configdir)/system.d
207 $(mkinstalldirs) $(DESTDIR)$(configdir)/session.d
208 $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services
209 $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/system-services
211 # Install dbus.socket as default implementation of a D-Bus stack.
212 # Deliberately not using $(LN_S) here: ln -fs is not universally portable,
213 # but neither is systemd, so it's OK to assume here that ln complies with SUS.
214 $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/dbus.target.wants
215 ln -fs ../dbus.socket $(DESTDIR)$(systemdsystemunitdir)/dbus.target.wants/dbus.socket
216 # Unconditionally enable D-Bus on systemd installations
217 $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants
218 ln -fs ../dbus.socket $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants/dbus.socket
219 $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/multi-user.target.wants
220 ln -fs ../dbus.service $(DESTDIR)$(systemdsystemunitdir)/multi-user.target.wants/dbus.service
225 if test `id -u` -eq 0; then \
226 chown root:$(DBUS_USER) $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \
227 chmod 4750 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \
229 echo "Not installing $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper binary setuid!"; \
230 echo "You'll need to manually set permissions to root:$(DBUS_USER) and permissions 4750"; \
234 #### Init scripts fun
235 SCRIPT_IN_FILES=messagebus.in \
236 messagebus-config.in \
240 if DBUS_INIT_SCRIPTS_RED_HAT
242 initddir=$(sysconfdir)/rc.d/init.d
251 if DBUS_INIT_SCRIPTS_SLACKWARE
253 initddir=$(sysconfdir)/rc.d/
262 if DBUS_INIT_SCRIPTS_CYGWIN
275 systemdsystemunit_DATA = \
282 EXTRA_DIST=$(CONFIG_IN_FILES) $(SCRIPT_IN_FILES)