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