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