2005-01-26 Havoc Pennington <hp@redhat.com>
[platform/upstream/dbus.git] / dbus / Makefile.am
1
2 INCLUDES=-I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) -DDBUS_COMPILATION
3
4 if HAVE_GLIB
5 DBUS_GLIB_BUILT_INCLUDES=                       \
6         dbus-glib-error-enum.h
7
8 GLIB_INCLUDES=                                  \
9         dbus-glib.h                             \
10         dbus-glib-lowlevel.h                    \
11         $(DBUS_GLIB_BUILT_INCLUDES)
12
13 dbus-glib-error-enum.h: dbus-protocol.h make-dbus-glib-error-enum.sh
14         $(srcdir)/make-dbus-glib-error-enum.sh dbus-protocol.h $@
15
16 endif
17
18 dbusincludedir=$(includedir)/dbus-1.0/dbus
19 dbusarchincludedir=$(libdir)/dbus-1.0/include/dbus
20
21 lib_LTLIBRARIES=libdbus-1.la
22
23 dbusinclude_HEADERS=                            \
24         dbus.h                                  \
25         dbus-address.h                          \
26         dbus-bus.h                              \
27         dbus-connection.h                       \
28         dbus-errors.h                           \
29         dbus-macros.h                           \
30         dbus-memory.h                           \
31         dbus-message.h                          \
32         dbus-pending-call.h                     \
33         dbus-protocol.h                         \
34         dbus-server.h                           \
35         dbus-shared.h                           \
36         dbus-threads.h                          \
37         dbus-types.h                            \
38         $(GLIB_INCLUDES)
39
40 dbusarchinclude_HEADERS=                        \
41         dbus-arch-deps.h
42
43 ### source code that goes in the installed client library
44 ### and is specific to library functionality
45 DBUS_LIB_SOURCES=                               \
46         dbus-address.c                          \
47         dbus-auth.c                             \
48         dbus-auth.h                             \
49         dbus-auth-script.c                      \
50         dbus-auth-script.h                      \
51         dbus-bus.c                              \
52         dbus-connection.c                       \
53         dbus-connection-internal.h              \
54         dbus-errors.c                           \
55         dbus-keyring.c                          \
56         dbus-keyring.h                          \
57         dbus-marshal-header.c                   \
58         dbus-marshal-header.h                   \
59         dbus-marshal-recursive.c                \
60         dbus-marshal-recursive.h                \
61         dbus-marshal-validate.c                 \
62         dbus-marshal-validate.h                 \
63         dbus-message.c                          \
64         dbus-message-internal.h                 \
65         dbus-message-private.h                  \
66         dbus-object-tree.c                      \
67         dbus-object-tree.h                      \
68         dbus-pending-call.c                     \
69         dbus-resources.c                        \
70         dbus-resources.h                        \
71         dbus-server.c                           \
72         dbus-server-debug-pipe.c                \
73         dbus-server-debug-pipe.h                \
74         dbus-server-protected.h                 \
75         dbus-server-unix.c                      \
76         dbus-server-unix.h                      \
77         dbus-sha.c                              \
78         dbus-sha.h                              \
79         dbus-timeout.c                          \
80         dbus-timeout.h                          \
81         dbus-threads.c                          \
82         dbus-transport.c                        \
83         dbus-transport.h                        \
84         dbus-transport-protected.h              \
85         dbus-transport-unix.c                   \
86         dbus-transport-unix.h                   \
87         dbus-watch.c                            \
88         dbus-watch.h
89
90 ##      dbus-md5.c                              \
91 ##      dbus-md5.h                              \
92
93 ### source code that goes in the installed client library
94 ### AND is generic utility functionality used by the 
95 ### daemon or test programs (all symbols in here should 
96 ### be underscore-prefixed)
97 DBUS_SHARED_SOURCES=                            \
98         dbus-dataslot.c                         \
99         dbus-dataslot.h                         \
100         dbus-hash.c                             \
101         dbus-hash.h                             \
102         dbus-internals.c                        \
103         dbus-internals.h                        \
104         dbus-list.c                             \
105         dbus-list.h                             \
106         dbus-marshal-basic.c                    \
107         dbus-marshal-basic.h                    \
108         dbus-memory.c                           \
109         dbus-mempool.c                          \
110         dbus-mempool.h                          \
111         dbus-string.c                           \
112         dbus-string.h                           \
113         dbus-string-private.h                   \
114         dbus-sysdeps.c                          \
115         dbus-sysdeps.h                          \
116         dbus-userdb.c                           \
117         dbus-userdb.h
118
119 ### source code that is generic utility functionality used
120 ### by the bus daemon or test apps, but is NOT included
121 ### in the D-BUS client library (all symbols in here 
122 ### should be underscore-prefixed but don't really need 
123 ### to be unless they move to DBUS_SHARED_SOURCES later)
124 DBUS_UTIL_SOURCES=                              \
125         dbus-auth-util.c                        \
126         dbus-mainloop.c                         \
127         dbus-mainloop.h                         \
128         dbus-marshal-recursive-util.c           \
129         dbus-marshal-validate-util.c            \
130         dbus-message-factory.c                  \
131         dbus-message-factory.h                  \
132         dbus-message-util.c                     \
133         dbus-spawn.c                            \
134         dbus-spawn.h                            \
135         dbus-string-util.c                      \
136         dbus-sysdeps-util.c                     \
137         dbus-test.c                             \
138         dbus-test.h                             \
139         dbus-userdb-util.c
140
141 libdbus_1_la_SOURCES=                           \
142         $(DBUS_LIB_SOURCES)                     \
143         $(DBUS_SHARED_SOURCES)
144
145 libdbus_convenience_la_SOURCES=                 \
146         $(DBUS_LIB_SOURCES)                     \
147         $(DBUS_SHARED_SOURCES)                  \
148         $(DBUS_UTIL_SOURCES)
149
150 BUILT_SOURCES=$(dbusarchinclude_HEADERS) $(DBUS_GLIB_BUILT_INCLUDES)
151 EXTRA_DIST=dbus-arch-deps.h.in make-dbus-glib-error-enum.sh
152 CLEANFILES=$(DBUS_GLIB_BUILT_INCLUDES)
153
154 ## this library is the same as libdbus, but exports all the symbols
155 ## and is only used for static linking within the dbus package.
156 noinst_LTLIBRARIES=libdbus-convenience.la
157
158 libdbus_1_la_LIBADD= $(DBUS_CLIENT_LIBS)
159 ## don't export symbols that start with "_" (we use this 
160 ## convention for internal symbols)
161 libdbus_1_la_LDFLAGS= -export-symbols-regex "^[^_].*"
162
163 ## note that TESTS has special meaning (stuff to use in make check)
164 ## so if adding tests not to be run in make check, don't add them to 
165 ## TESTS
166 if DBUS_BUILD_TESTS
167 TESTS_ENVIRONMENT=DBUS_TEST_DATA=$(top_builddir)/test/data DBUS_TEST_HOMEDIR=$(top_builddir)/dbus
168 TESTS=dbus-test
169 else
170 TESTS=
171 endif
172
173 ## we use noinst_PROGRAMS not check_PROGRAMS so that we build 
174 ## even when not doing "make check"
175 noinst_PROGRAMS=$(TESTS)
176
177 dbus_test_SOURCES=                              \
178         dbus-test-main.c
179
180 dbus_test_LDADD=libdbus-convenience.la
181
182 ## mop up the gcov files
183 clean-local:
184         /bin/rm *.bb *.bbg *.da *.gcov .libs/*.da .libs/*.bbg || true