2 configdir=$(sysconfdir)/dbus-1
4 INCLUDES=-I$(top_srcdir) $(DBUS_BUS_CFLAGS) @PIE_CFLAGS@ \
5 -DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\" \
19 XML_SOURCES=config-loader-libxml.c
22 XML_SOURCES=config-loader-expat.c
25 if DBUS_BUS_ENABLE_KQUEUE
26 DIR_WATCH_SOURCE=dir-watch-kqueue.c
28 if DBUS_BUS_ENABLE_INOTIFY
29 DIR_WATCH_SOURCE=dir-watch-inotify.c
31 if DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX
32 DIR_WATCH_SOURCE=dir-watch-dnotify.c
34 DIR_WATCH_SOURCE=dir-watch-default.c
42 activation-exit-codes.h \
47 config-parser-common.c \
48 config-parser-common.h \
75 dbus_daemon_SOURCES= \
80 $(top_builddir)/dbus/libdbus-convenience.la \
84 dbus_daemon_LDFLAGS=@R_DYNAMIC_LDFLAG@ @SECTION_LDFLAGS@ @PIE_LDFLAGS@
86 LAUNCH_HELPER_SOURCES= \
88 config-parser-common.c \
89 config-parser-common.h \
90 config-parser-trivial.c \
91 config-parser-trivial.h \
96 activation-exit-codes.h \
100 ## This is the installed launch helper with the setuid checks
101 dbus_daemon_launch_helper_SOURCES= \
102 activation-helper-bin.c \
103 $(LAUNCH_HELPER_SOURCES)
105 dbus_daemon_launch_helper_LDADD= \
106 $(top_builddir)/dbus/libdbus-convenience.la \
107 $(DBUS_LAUNCHER_LIBS)
109 dbus_daemon_launch_helper_LDFLAGS=@R_DYNAMIC_LDFLAG@ @SECTION_LDFLAGS@
111 ## we build another binary so we can do the launch testing without root privs.
112 ## DO NOT INSTALL THIS FILE
113 dbus_daemon_launch_helper_test_SOURCES= \
114 activation-helper-bin.c \
115 $(LAUNCH_HELPER_SOURCES)
117 dbus_daemon_launch_helper_test_LDADD= \
118 $(top_builddir)/dbus/libdbus-convenience.la \
119 $(DBUS_LAUNCHER_LIBS)
121 dbus_daemon_launch_helper_test_LDFLAGS=@R_DYNAMIC_LDFLAG@ @SECTION_LDFLAGS@
122 dbus_daemon_launch_helper_test_CPPFLAGS= \
123 -DACTIVATION_LAUNCHER_TEST
125 ## we build yet another binary so we can do the OOM tests
126 ## DO NOT INSTALL THIS FILE
127 bus_test_launch_helper_SOURCES= \
128 test-launch-helper.c \
129 $(LAUNCH_HELPER_SOURCES)
131 bus_test_launch_helper_LDADD= \
132 $(top_builddir)/dbus/libdbus-convenience.la \
133 $(DBUS_LAUNCHER_LIBS)
135 bus_test_launch_helper_LDFLAGS=@R_DYNAMIC_LDFLAG@ @SECTION_LDFLAGS@
136 bus_test_launch_helper_CPPFLAGS= \
137 -DACTIVATION_LAUNCHER_TEST \
138 -DACTIVATION_LAUNCHER_DO_OOM
141 extra_noinst_programs=
144 extra_tests+=bus-test-launch-helper
145 extra_noinst_programs+=dbus-daemon-launch-helper dbus-daemon-launch-helper-test dbus-daemon
148 extra_inst_programs+=dbus-daemon
151 ## note that TESTS has special meaning (stuff to use in make check)
152 ## so if adding tests not to be run in make check, don't add them to
155 TESTS_ENVIRONMENT=DBUS_TEST_DATA=$(top_builddir)/test/data DBUS_TEST_HOMEDIR=$(top_builddir)/dbus DBUS_FATAL_WARNINGS=1 DBUS_BLOCK_ON_ABORT=1
156 TESTS=bus-test bus-test-system $(extra_tests)
161 ## we use noinst_PROGRAMS not check_PROGRAMS so that we build
162 ## even when not doing "make check"
163 noinst_PROGRAMS=$(TESTS) $(extra_noinst_programs)
164 bin_PROGRAMS=$(extra_inst_programs)
166 bus_test_system_SOURCES= \
168 config-parser-common.c \
169 config-parser-common.h \
170 config-parser-trivial.c \
171 config-parser-trivial.h \
176 bus_test_system_LDADD=$(top_builddir)/dbus/libdbus-convenience.la $(DBUS_BUS_LIBS)
177 bus_test_system_LDFLAGS=@R_DYNAMIC_LDFLAG@
183 bus_test_LDADD=$(top_builddir)/dbus/libdbus-convenience.la $(DBUS_BUS_LIBS)
184 bus_test_LDFLAGS=@R_DYNAMIC_LDFLAG@
186 ## mop up the gcov files
188 /bin/rm *.bb *.bbg *.da *.gcov || true
191 rm -f $(DESTDIR)$(DBUS_DAEMONDIR)/dbus-daemon$(EXEEXT)
192 rm -f $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper$(EXEEXT)
195 $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus
196 $(mkinstalldirs) $(DESTDIR)$(configdir)/system.d
197 $(mkinstalldirs) $(DESTDIR)$(configdir)/session.d
198 $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services
199 $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/system-services
201 if test '!' -d $(DESTDIR)$(DBUS_DAEMONDIR); then \
202 $(mkinstalldirs) $(DESTDIR)$(DBUS_DAEMONDIR); \
203 chmod 755 $(DESTDIR)$(DBUS_DAEMONDIR); \
205 $(INSTALL_PROGRAM) dbus-daemon$(EXEEXT) $(DESTDIR)$(DBUS_DAEMONDIR)
206 $(mkinstalldirs) $(DESTDIR)$(libexecdir)/dbus-1
207 if test -f dbus-daemin-launch-helper$(EXEEXT) ; then \
208 $(INSTALL_PROGRAM) dbus-daemon-launch-helper$(EXEEXT) $(DESTDIR)$(libexecdir); \
209 if test `id -u` -eq 0; then \
210 chown root:$(DBUS_USER) $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper; \
211 chmod 4750 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper; \
213 echo "Not installing $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper binary setuid!"; \
214 echo "You'll need to manually set permissions to root:$(DBUS_USER) and permissions 4750"; \
219 #### Init scripts fun
220 SCRIPT_IN_FILES=messagebus.in \
224 if DBUS_INIT_SCRIPTS_RED_HAT
226 initddir=$(sysconfdir)/rc.d/init.d
235 if DBUS_INIT_SCRIPTS_SLACKWARE
237 initddir=$(sysconfdir)/rc.d/
245 MAN_IN_FILES=dbus-daemon.1.in
246 man_MANS = dbus-daemon.1
250 EXTRA_DIST=$(CONFIG_IN_FILES) $(SCRIPT_IN_FILES) $(man_MANS) $(MAN_IN_FILES)