2005-03-11 Colin Walters <walters@verbum.org>
[platform/upstream/dbus.git] / bus / Makefile.am
1
2 configdir=$(sysconfdir)/dbus-1
3
4 INCLUDES=-I$(top_srcdir) $(DBUS_BUS_CFLAGS)                             \
5         -DDAEMON_NAME=\"dbus-daemon\"  -DDBUS_COMPILATION               \
6         -DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\"        \
7         -DDBUS_SESSION_CONFIG_FILE=\""$(configdir)/session.conf"\"
8
9 EFENCE=
10
11 CONFIG_IN_FILES=                                \
12         session.conf.in                         \
13         system.conf.in
14
15 config_DATA=                                    \
16         session.conf                            \
17         system.conf
18
19 bin_PROGRAMS=dbus-daemon
20
21 if DBUS_USE_LIBXML
22 XML_SOURCES=config-loader-libxml.c
23 endif
24 if DBUS_USE_EXPAT
25 XML_SOURCES=config-loader-expat.c
26 endif
27
28 BUS_SOURCES=                                    \
29         activation.c                            \
30         activation.h                            \
31         bus.c                                   \
32         bus.h                                   \
33         config-parser.c                         \
34         config-parser.h                         \
35         connection.c                            \
36         connection.h                            \
37         desktop-file.c                          \
38         desktop-file.h                          \
39         dispatch.c                              \
40         dispatch.h                              \
41         driver.c                                \
42         driver.h                                \
43         expirelist.c                            \
44         expirelist.h                            \
45         policy.c                                \
46         policy.h                                \
47         selinux.h                               \
48         selinux.c                               \
49         services.c                              \
50         services.h                              \
51         signals.c                               \
52         signals.h                               \
53         test.c                                  \
54         test.h                                  \
55         utils.c                                 \
56         utils.h                                 \
57         $(XML_SOURCES)
58
59 dbus_daemon_SOURCES=                            \
60         $(BUS_SOURCES)                          \
61         main.c                                  
62
63 dbus_daemon_LDADD=                                      \
64         $(EFENCE)                                       \
65         $(DBUS_BUS_LIBS)                                \
66         $(top_builddir)/dbus/libdbus-convenience.la
67
68 ## note that TESTS has special meaning (stuff to use in make check)
69 ## so if adding tests not to be run in make check, don't add them to 
70 ## TESTS
71 if DBUS_BUILD_TESTS
72 TESTS_ENVIRONMENT=DBUS_TEST_DATA=$(top_builddir)/test/data DBUS_TEST_HOMEDIR=$(top_builddir)/dbus
73 TESTS=bus-test 
74 else
75 TESTS=
76 endif
77
78 ## we use noinst_PROGRAMS not check_PROGRAMS so that we build 
79 ## even when not doing "make check"
80 noinst_PROGRAMS=$(TESTS) print-introspect
81
82 bus_test_SOURCES=                               \
83         $(BUS_SOURCES)                          \
84         test-main.c
85
86 bus_test_LDADD=$(top_builddir)/dbus/libdbus-convenience.la $(DBUS_BUS_LIBS)
87
88 print_introspect_SOURCES = print-introspect.c
89 print_introspect_LDADD = $(top_builddir)/dbus/libdbus-convenience.la $(DBUS_BUS_LIBS)
90
91 run-with-tmp-session-bus.sh: dbus-daemon
92
93 all-local: dbus-bus-introspect.xml
94
95 dbus-bus-introspect.xml: $(srcdir)/run-with-tmp-session-bus.sh
96         DBUS_TOP_BUILDDIR=$(top_builddir) $(srcdir)/run-with-tmp-session-bus.sh ./print-introspect org.freedesktop.DBus /org/freedesktop/DBus > dbus-bus-introspect.xml.tmp && mv dbus-bus-introspect.xml.tmp dbus-bus-introspect.xml
97
98 ## mop up the gcov files
99 clean-local:
100         /bin/rm *.bb *.bbg *.da *.gcov || true
101         /bin/rm -f run-with-tmp-session-bus.conf
102
103 install-data-hook:
104         $(mkinstalldirs) $(DESTDIR)/$(localstatedir)/run/dbus
105         $(mkinstalldirs) $(DESTDIR)/$(configdir)/system.d
106         $(mkinstalldirs) $(DESTDIR)/$(datadir)/dbus-1/services
107
108 #### Init scripts fun
109 SCRIPT_IN_FILES=messagebus.in \
110                 rc.messagebus.in
111
112 ## Red Hat start
113 if DBUS_INIT_SCRIPTS_RED_HAT
114
115 initddir=$(sysconfdir)/rc.d/init.d
116
117 initd_SCRIPTS=  \
118         messagebus
119
120 endif
121  ## Red Hat end
122
123 ## Slackware start
124 if DBUS_INIT_SCRIPTS_SLACKWARE
125
126 initddir=$(sysconfdir)/rc.d/
127
128 initd_SCRIPTS=  \
129         rc.messagebus
130
131 endif
132 ## Slackware end
133
134 MAN_IN_FILES=dbus-daemon.1.in
135 man_MANS = dbus-daemon.1
136
137 #### Extra dist 
138
139 EXTRA_DIST=$(CONFIG_IN_FILES) $(SCRIPT_IN_FILES) $(man_MANS) $(MAN_IN_FILES) run-with-tmp-session-bus.sh