2003-09-29 Havoc Pennington <hp@pobox.com>
[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-1\"  -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-1
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         policy.c                                \
44         policy.h                                \
45         services.c                              \
46         services.h                              \
47         signals.c                               \
48         signals.h                               \
49         test.c                                  \
50         test.h                                  \
51         utils.c                                 \
52         utils.h                                 \
53         $(XML_SOURCES)
54
55 dbus_daemon_1_SOURCES=                          \
56         $(BUS_SOURCES)                          \
57         main.c                                  
58
59 dbus_daemon_1_LDADD=                                    \
60         $(EFENCE)                                       \
61         $(DBUS_BUS_LIBS)                                \
62         $(top_builddir)/dbus/libdbus-convenience.la
63
64 ## note that TESTS has special meaning (stuff to use in make check)
65 ## so if adding tests not to be run in make check, don't add them to 
66 ## TESTS
67 if DBUS_BUILD_TESTS
68 TESTS_ENVIRONMENT=DBUS_TEST_DATA=$(top_builddir)/test/data DBUS_TEST_HOMEDIR=$(top_builddir)/dbus
69 TESTS=bus-test 
70 else
71 TESTS=
72 endif
73
74 ## we use noinst_PROGRAMS not check_PROGRAMS so that we build 
75 ## even when not doing "make check"
76 noinst_PROGRAMS=$(TESTS)
77
78 bus_test_SOURCES=                               \
79         $(BUS_SOURCES)                          \
80         test-main.c
81
82 bus_test_LDADD=$(top_builddir)/dbus/libdbus-convenience.la $(DBUS_BUS_LIBS)
83
84 ## mop up the gcov files
85 clean-local:
86         /bin/rm *.bb *.bbg *.da *.gcov || true
87
88 install-data-hook:
89         $(mkinstalldirs) $(DESTDIR)/$(localstatedir)/run/dbus
90         $(mkinstalldirs) $(DESTDIR)/$(configdir)/system.d
91         $(mkinstalldirs) $(DESTDIR)/$(libdir)/dbus-1.0/services
92
93 #### Init scripts fun
94 SCRIPT_IN_FILES=messagebus.in
95
96 ## Red Hat start
97 if DBUS_INIT_SCRIPTS_RED_HAT
98
99 initddir=$(sysconfdir)/rc.d/init.d
100
101 initd_SCRIPTS=  \
102         messagebus
103
104 endif
105  ## Red Hat end
106
107 MAN_IN_FILES=dbus-daemon-1.1.in
108 man_MANS = dbus-daemon-1.1
109
110 #### Extra dist 
111
112 EXTRA_DIST=$(CONFIG_IN_FILES) $(SCRIPT_IN_FILES) $(man_MANS) $(MAN_IN_FILES)