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 \
82 dbus_daemon_SOURCES= \
86 dbus_daemon_CPPFLAGS = -DDBUS_STATIC_BUILD
88 $(top_builddir)/dbus/libdbus-internal.la \
92 dbus_daemon_LDFLAGS=@R_DYNAMIC_LDFLAG@
94 LAUNCH_HELPER_SOURCES= \
96 config-parser-common.c \
97 config-parser-common.h \
98 config-parser-trivial.c \
99 config-parser-trivial.h \
104 activation-exit-codes.h \
105 activation-helper.h \
108 ## This is the installed launch helper with the setuid checks
109 dbus_daemon_launch_helper_SOURCES= \
110 activation-helper-bin.c \
111 $(LAUNCH_HELPER_SOURCES)
113 dbus_daemon_launch_helper_CPPFLAGS = -DDBUS_STATIC_BUILD
114 dbus_daemon_launch_helper_LDADD= \
115 $(top_builddir)/dbus/libdbus-internal.la \
116 $(DBUS_LAUNCHER_LIBS)
118 dbus_daemon_launch_helper_LDFLAGS=@R_DYNAMIC_LDFLAG@
120 ## we build another binary so we can do the launch testing without root privs.
121 ## DO NOT INSTALL THIS FILE
122 dbus_daemon_launch_helper_test_SOURCES= \
123 activation-helper-bin.c \
124 $(LAUNCH_HELPER_SOURCES)
126 dbus_daemon_launch_helper_test_LDADD= \
127 $(top_builddir)/dbus/libdbus-internal.la \
128 $(DBUS_LAUNCHER_LIBS)
130 dbus_daemon_launch_helper_test_LDFLAGS=@R_DYNAMIC_LDFLAG@
131 dbus_daemon_launch_helper_test_CPPFLAGS= -DDBUS_STATIC_BUILD \
132 -DACTIVATION_LAUNCHER_TEST
134 ## we build yet another binary so we can do the OOM tests
135 ## DO NOT INSTALL THIS FILE
136 bus_test_launch_helper_SOURCES= \
137 test-launch-helper.c \
138 $(LAUNCH_HELPER_SOURCES)
140 bus_test_launch_helper_LDADD= \
141 $(top_builddir)/dbus/libdbus-internal.la \
142 $(DBUS_LAUNCHER_LIBS)
144 bus_test_launch_helper_LDFLAGS=@R_DYNAMIC_LDFLAG@
145 bus_test_launch_helper_CPPFLAGS= -DDBUS_STATIC_BUILD \
146 -DACTIVATION_LAUNCHER_TEST \
147 -DACTIVATION_LAUNCHER_DO_OOM
150 dbus_daemon_exec_PROGRAMS = dbus-daemon
152 libexec_PROGRAMS = dbus-daemon-launch-helper
155 ## Note that TESTS has special meaning (stuff to use in make check).
156 ## We don't actually want to run any of these tests until test/ has been
157 ## compiled, so we don't put them in TESTS here; we run them in test/
161 ## we use noinst_PROGRAMS not check_PROGRAMS so that we build
162 ## even when not doing "make check"
164 # run as a test by test/Makefile.am
165 noinst_PROGRAMS += bus-test bus-test-system
168 # run as a test by test/Makefile.am
169 noinst_PROGRAMS += bus-test-launch-helper
170 # this is used by the tests but is not,itself, a test
171 noinst_PROGRAMS += dbus-daemon-launch-helper-test
174 endif DBUS_BUILD_TESTS
176 bus_test_system_SOURCES= \
178 config-parser-common.c \
179 config-parser-common.h \
180 config-parser-trivial.c \
181 config-parser-trivial.h \
186 bus_test_system_CPPFLAGS = -DDBUS_STATIC_BUILD
187 bus_test_system_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS)
188 bus_test_system_LDFLAGS=@R_DYNAMIC_LDFLAG@
194 bus_test_CPPFLAGS = -DDBUS_STATIC_BUILD
195 bus_test_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS)
196 bus_test_LDFLAGS=@R_DYNAMIC_LDFLAG@
198 ## mop up the gcov files
200 /bin/rm *.bb *.bbg *.da *.gcov || true
203 $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus
204 $(mkinstalldirs) $(DESTDIR)$(configdir)/system.d
205 $(mkinstalldirs) $(DESTDIR)$(configdir)/session.d
206 $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services
207 $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/system-services
209 # Install dbus.socket as default implementation of a D-Bus stack.
210 # Deliberately not using $(LN_S) here: ln -fs is not universally portable,
211 # but neither is systemd, so it's OK to assume here that ln complies with SUS.
212 $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/dbus.target.wants
213 ln -fs ../dbus.socket $(DESTDIR)$(systemdsystemunitdir)/dbus.target.wants/dbus.socket
214 # Unconditionally enable D-Bus on systemd installations
215 $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants
216 ln -fs ../dbus.socket $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants/dbus.socket
217 $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/multi-user.target.wants
218 ln -fs ../dbus.service $(DESTDIR)$(systemdsystemunitdir)/multi-user.target.wants/dbus.service
223 if test `id -u` -eq 0; then \
224 chown root:$(DBUS_USER) $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \
225 chmod 4750 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \
227 echo "Not installing $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper binary setuid!"; \
228 echo "You'll need to manually set permissions to root:$(DBUS_USER) and permissions 4750"; \
232 #### Init scripts fun
233 SCRIPT_IN_FILES=messagebus.in \
234 messagebus-config.in \
238 if DBUS_INIT_SCRIPTS_RED_HAT
240 initddir=$(sysconfdir)/rc.d/init.d
249 if DBUS_INIT_SCRIPTS_SLACKWARE
251 initddir=$(sysconfdir)/rc.d/
260 if DBUS_INIT_SCRIPTS_CYGWIN
273 systemdsystemunit_DATA = \
280 EXTRA_DIST=$(CONFIG_IN_FILES) $(SCRIPT_IN_FILES)