2 configdir=$(sysconfdir)/dbus-1
4 INCLUDES=-I$(top_srcdir) $(DBUS_BUS_CFLAGS) @PIE_CFLAGS@ \
5 -DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\" \
6 -DDAEMON_NAME=\"dbus-daemon\" -DDBUS_COMPILATION
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= \
81 $(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
140 ## note that TESTS has special meaning (stuff to use in make check)
141 ## so if adding tests not to be run in make check, don't add them to
144 TESTS_ENVIRONMENT=DBUS_TEST_DATA=$(top_builddir)/test/data DBUS_TEST_HOMEDIR=$(top_builddir)/dbus DBUS_FATAL_WARNINGS=1 DBUS_BLOCK_ON_ABORT=1
145 TESTS=bus-test bus-test-system bus-test-launch-helper
150 ## we use noinst_PROGRAMS not check_PROGRAMS so that we build
151 ## even when not doing "make check"
152 noinst_PROGRAMS=$(TESTS) dbus-daemon dbus-daemon-launch-helper-test dbus-daemon-launch-helper
154 bus_test_system_SOURCES= \
156 config-parser-common.c \
157 config-parser-common.h \
158 config-parser-trivial.c \
159 config-parser-trivial.h \
164 bus_test_system_LDADD=$(top_builddir)/dbus/libdbus-convenience.la $(DBUS_BUS_LIBS)
165 bus_test_system_LDFLAGS=@R_DYNAMIC_LDFLAG@
171 bus_test_LDADD=$(top_builddir)/dbus/libdbus-convenience.la $(DBUS_BUS_LIBS)
172 bus_test_LDFLAGS=@R_DYNAMIC_LDFLAG@
174 ## mop up the gcov files
176 /bin/rm *.bb *.bbg *.da *.gcov || true
179 rm -f $(DESTDIR)$(DBUS_DAEMONDIR)/dbus-daemon
180 rm -f $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper
183 if test '!' -d $(DESTDIR)$(DBUS_DAEMONDIR); then \
184 $(mkinstalldirs) $(DESTDIR)$(DBUS_DAEMONDIR); \
185 chmod 755 $(DESTDIR)$(DBUS_DAEMONDIR); \
187 $(INSTALL_PROGRAM) dbus-daemon $(DESTDIR)$(DBUS_DAEMONDIR)
188 $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run/dbus
189 $(mkinstalldirs) $(DESTDIR)$(configdir)/system.d
190 $(mkinstalldirs) $(DESTDIR)$(configdir)/session.d
191 $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/services
192 $(mkinstalldirs) $(DESTDIR)$(datadir)/dbus-1/system-services
193 $(mkinstalldirs) $(DESTDIR)$(libexecdir)/dbus-1
194 $(INSTALL_PROGRAM) dbus-daemon-launch-helper $(DESTDIR)$(libexecdir)
195 if test `id -u` -eq 0; then \
196 chown root:$(DBUS_USER) $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper; \
197 chmod 4750 $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper; \
199 echo "Not installing $(DESTDIR)$(libexecdir)/dbus-daemon-launch-helper binary setuid!"; \
200 echo "You'll need to manually set permissions to root:$(DBUS_USER) and permissions 4750"; \
203 #### Init scripts fun
204 SCRIPT_IN_FILES=messagebus.in \
208 if DBUS_INIT_SCRIPTS_RED_HAT
210 initddir=$(sysconfdir)/rc.d/init.d
219 if DBUS_INIT_SCRIPTS_SLACKWARE
221 initddir=$(sysconfdir)/rc.d/
229 MAN_IN_FILES=dbus-daemon.1.in
230 man_MANS = dbus-daemon.1
234 EXTRA_DIST=$(CONFIG_IN_FILES) $(SCRIPT_IN_FILES) $(man_MANS) $(MAN_IN_FILES)