879a34c7fab799ab00a96abe0c8980d09b4cd910
[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 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-byteswap.c                 \
60         dbus-marshal-byteswap.h                 \
61         dbus-marshal-recursive.c                \
62         dbus-marshal-recursive.h                \
63         dbus-marshal-validate.c                 \
64         dbus-marshal-validate.h                 \
65         dbus-message.c                          \
66         dbus-message-internal.h                 \
67         dbus-message-private.h                  \
68         dbus-object-tree.c                      \
69         dbus-object-tree.h                      \
70         dbus-pending-call.c                     \
71         dbus-resources.c                        \
72         dbus-resources.h                        \
73         dbus-server.c                           \
74         dbus-server-debug-pipe.c                \
75         dbus-server-debug-pipe.h                \
76         dbus-server-protected.h                 \
77         dbus-server-unix.c                      \
78         dbus-server-unix.h                      \
79         dbus-sha.c                              \
80         dbus-sha.h                              \
81         dbus-signature.c                        \
82         dbus-signature.h                        \
83         dbus-timeout.c                          \
84         dbus-timeout.h                          \
85         dbus-threads-internal.h                 \
86         dbus-threads.c                          \
87         dbus-transport.c                        \
88         dbus-transport.h                        \
89         dbus-transport-protected.h              \
90         dbus-transport-unix.c                   \
91         dbus-transport-unix.h                   \
92         dbus-watch.c                            \
93         dbus-watch.h
94
95 ##      dbus-md5.c                              \
96 ##      dbus-md5.h                              \
97
98 ### source code that goes in the installed client library
99 ### AND is generic utility functionality used by the 
100 ### daemon or test programs (all symbols in here should 
101 ### be underscore-prefixed)
102 DBUS_SHARED_SOURCES=                            \
103         dbus-dataslot.c                         \
104         dbus-dataslot.h                         \
105         dbus-hash.c                             \
106         dbus-hash.h                             \
107         dbus-internals.c                        \
108         dbus-internals.h                        \
109         dbus-list.c                             \
110         dbus-list.h                             \
111         dbus-marshal-basic.c                    \
112         dbus-marshal-basic.h                    \
113         dbus-memory.c                           \
114         dbus-mempool.c                          \
115         dbus-mempool.h                          \
116         dbus-string.c                           \
117         dbus-string.h                           \
118         dbus-string-private.h                   \
119         dbus-sysdeps.c                          \
120         dbus-sysdeps.h                          \
121         dbus-userdb.c                           \
122         dbus-userdb.h
123
124 ### source code that is generic utility functionality used
125 ### by the bus daemon or test apps, but is NOT included
126 ### in the D-BUS client library (all symbols in here 
127 ### should be underscore-prefixed but don't really need 
128 ### to be unless they move to DBUS_SHARED_SOURCES later)
129 DBUS_UTIL_SOURCES=                              \
130         dbus-auth-util.c                        \
131         dbus-mainloop.c                         \
132         dbus-mainloop.h                         \
133         dbus-marshal-byteswap-util.c            \
134         dbus-marshal-recursive-util.c           \
135         dbus-marshal-validate-util.c            \
136         dbus-message-factory.c                  \
137         dbus-message-factory.h                  \
138         dbus-message-util.c                     \
139         dbus-spawn.c                            \
140         dbus-spawn.h                            \
141         dbus-string-util.c                      \
142         dbus-sysdeps-util.c                     \
143         dbus-test.c                             \
144         dbus-test.h                             \
145         dbus-userdb-util.c
146
147 libdbus_1_la_SOURCES=                           \
148         $(DBUS_LIB_SOURCES)                     \
149         $(DBUS_SHARED_SOURCES)
150
151 libdbus_convenience_la_SOURCES=                 \
152         $(DBUS_LIB_SOURCES)                     \
153         $(DBUS_SHARED_SOURCES)                  \
154         $(DBUS_UTIL_SOURCES)
155
156
157 BUILT_SOURCES=$(dbusarchinclude_HEADERS) $(DBUS_GLIB_BUILT_INCLUDES)
158 EXTRA_DIST=dbus-arch-deps.h.in make-dbus-glib-error-enum.sh
159 CLEANFILES=$(DBUS_GLIB_BUILT_INCLUDES)
160
161 ## this library is the same as libdbus, but exports all the symbols
162 ## and is only used for static linking within the dbus package.
163 noinst_LTLIBRARIES=libdbus-convenience.la
164
165 libdbus_1_la_LIBADD= $(DBUS_CLIENT_LIBS)
166 ## don't export symbols that start with "_" (we use this 
167 ## convention for internal symbols)
168 libdbus_1_la_LDFLAGS= -export-symbols-regex "^[^_].*" -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
169
170 ## note that TESTS has special meaning (stuff to use in make check)
171 ## so if adding tests not to be run in make check, don't add them to 
172 ## TESTS
173 if DBUS_BUILD_TESTS
174 TESTS_ENVIRONMENT=DBUS_TEST_DATA=$(top_builddir)/test/data DBUS_TEST_HOMEDIR=$(top_builddir)/dbus
175 TESTS=dbus-test
176 else
177 TESTS=
178 endif
179
180 ## we use noinst_PROGRAMS not check_PROGRAMS so that we build 
181 ## even when not doing "make check"
182 noinst_PROGRAMS=$(TESTS)
183
184 dbus_test_SOURCES=                              \
185         dbus-test-main.c
186
187 dbus_test_LDADD=libdbus-convenience.la
188
189 ## mop up the gcov files
190 clean-local:
191         /bin/rm *.bb *.bbg *.da *.gcov .libs/*.da .libs/*.bbg || true