1 configdir=$(sysconfdir)/dbus-1
2 dbus_daemon_execdir = $(DBUS_DAEMONDIR)
4 INCLUDES = -I$(top_srcdir) \
6 -DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\" \
9 # if assertions are enabled, improve backtraces
10 AM_LDFLAGS = @R_DYNAMIC_LDFLAG@
17 org.freedesktop.dbus-session.plist.in
23 if DBUS_ENABLE_LAUNCHD
24 agentdir=$(LAUNCHD_AGENT_DIR)
25 agent_DATA=org.freedesktop.dbus-session.plist
29 XML_SOURCES=config-loader-libxml.c
32 XML_SOURCES=config-loader-expat.c
35 if DBUS_BUS_ENABLE_KQUEUE
36 DIR_WATCH_SOURCE=dir-watch-kqueue.c
38 if DBUS_BUS_ENABLE_INOTIFY
39 DIR_WATCH_SOURCE=dir-watch-inotify.c
41 if DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX
42 DIR_WATCH_SOURCE=dir-watch-dnotify.c
44 DIR_WATCH_SOURCE=dir-watch-default.c
52 activation-exit-codes.h \
57 config-parser-common.c \
58 config-parser-common.h \
87 dbus_daemon_SOURCES= \
91 dbus_daemon_CPPFLAGS = -DDBUS_STATIC_BUILD
93 $(top_builddir)/dbus/libdbus-internal.la \
97 LAUNCH_HELPER_SOURCES= \
99 config-parser-common.c \
100 config-parser-common.h \
101 config-parser-trivial.c \
102 config-parser-trivial.h \
107 activation-exit-codes.h \
108 activation-helper.h \
111 ## This is the installed launch helper with the setuid checks
112 dbus_daemon_launch_helper_SOURCES= \
113 activation-helper-bin.c \
114 $(LAUNCH_HELPER_SOURCES)
116 dbus_daemon_launch_helper_CPPFLAGS = -DDBUS_STATIC_BUILD
117 dbus_daemon_launch_helper_LDADD= \
118 $(top_builddir)/dbus/libdbus-internal.la \
119 $(DBUS_LAUNCHER_LIBS)
121 ## we build another binary so we can do the launch testing without root privs.
122 ## DO NOT INSTALL THIS FILE
123 dbus_daemon_launch_helper_test_SOURCES= \
124 activation-helper-bin.c \
125 $(LAUNCH_HELPER_SOURCES)
127 dbus_daemon_launch_helper_test_LDADD= \
128 $(top_builddir)/dbus/libdbus-internal.la \
129 $(DBUS_LAUNCHER_LIBS)
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_CPPFLAGS= -DDBUS_STATIC_BUILD \
145 -DACTIVATION_LAUNCHER_TEST \
146 -DACTIVATION_LAUNCHER_DO_OOM
149 dbus_daemon_exec_PROGRAMS = dbus-daemon
151 libexec_PROGRAMS = dbus-daemon-launch-helper
154 ## Note that TESTS has special meaning (stuff to use in make check).
155 ## We don't actually want to run any of these tests until test/ has been
156 ## compiled, so we don't put them in TESTS here; we run them in test/
160 ## we use noinst_PROGRAMS not check_PROGRAMS so that we build
161 ## even when not doing "make check"
163 # run as a test by test/Makefile.am
164 noinst_PROGRAMS += bus-test bus-test-system
167 # run as a test by test/Makefile.am
168 noinst_PROGRAMS += bus-test-launch-helper
169 # this is used by the tests but is not,itself, a test
170 noinst_PROGRAMS += dbus-daemon-launch-helper-test
173 endif DBUS_BUILD_TESTS
175 bus_test_system_SOURCES= \
177 config-parser-common.c \
178 config-parser-common.h \
179 config-parser-trivial.c \
180 config-parser-trivial.h \
185 bus_test_system_CPPFLAGS = -DDBUS_STATIC_BUILD
186 bus_test_system_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS)
192 bus_test_CPPFLAGS = -DDBUS_STATIC_BUILD
193 bus_test_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS)
195 ## mop up the gcov files
197 /bin/rm *.bb *.bbg *.da *.gcov || true
200 $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus
201 $(mkinstalldirs) $(DESTDIR)$(configdir)/system.d
202 $(mkinstalldirs) $(DESTDIR)$(configdir)/session.d
203 $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services
204 $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/system-services
206 # Install dbus.socket as default implementation of a D-Bus stack.
207 # Deliberately not using $(LN_S) here: ln -fs is not universally portable,
208 # but neither is systemd, so it's OK to assume here that ln complies with SUS.
209 $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/dbus.target.wants
210 ln -fs ../dbus.socket $(DESTDIR)$(systemdsystemunitdir)/dbus.target.wants/dbus.socket
211 # Unconditionally enable D-Bus on systemd installations
212 $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants
213 ln -fs ../dbus.socket $(DESTDIR)$(systemdsystemunitdir)/sockets.target.wants/dbus.socket
214 $(mkinstalldirs) $(DESTDIR)$(systemdsystemunitdir)/multi-user.target.wants
215 ln -fs ../dbus.service $(DESTDIR)$(systemdsystemunitdir)/multi-user.target.wants/dbus.service
220 if test `id -u` -eq 0; then \
221 chown root:$(DBUS_USER) $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \
222 chmod 4750 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT); \
224 echo "Not installing $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper binary setuid!"; \
225 echo "You'll need to manually set permissions to root:$(DBUS_USER) and permissions 4750"; \
229 #### Init scripts fun
230 SCRIPT_IN_FILES=messagebus.in \
231 messagebus-config.in \
235 if DBUS_INIT_SCRIPTS_RED_HAT
237 initddir=$(sysconfdir)/rc.d/init.d
246 if DBUS_INIT_SCRIPTS_SLACKWARE
248 initddir=$(sysconfdir)/rc.d/
257 if DBUS_INIT_SCRIPTS_CYGWIN
270 systemdsystemunit_DATA = \
277 EXTRA_DIST=$(CONFIG_IN_FILES) $(SCRIPT_IN_FILES)