2005-06-12 Colin Walters <walters@verbum.org>
[platform/upstream/dbus.git] / tools / Makefile.am
1 INCLUDES=-I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) $(DBUS_GLIB_CFLAGS) $(DBUS_X_CFLAGS) $(DBUS_GTK_THREADS_CFLAGS) -DDBUS_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\" -DDBUS_COMPILATION
2
3 if HAVE_GLIB
4 GLIB_TOOLS=dbus-monitor
5
6 nodist_libdbus_glib_HEADERS = dbus-glib-bindings.h
7 libdbus_glibdir = $(includedir)/dbus-1.0/dbus
8
9 dbus-glib-bindings.h: dbus-bus-introspect.xml $(top_builddir)/glib/dbus-binding-tool
10         $(top_builddir)/glib/dbus-binding-tool --mode=glib-client --output=dbus-glib-bindings.h dbus-bus-introspect.xml
11
12 BUILT_SOURCES = dbus-glib-bindings.h dbus-bus-introspect.xml
13
14 else
15 GLIB_TOOLS=
16 endif
17
18 if HAVE_GTK
19 GTK_TOOLS=dbus-viewer
20 else
21 GTK_TOOLS=
22 endif
23
24 if HAVE_GLIB
25 noinst_PROGRAMS = print-introspect
26
27 print_introspect_SOURCES = print-introspect.c
28 print_introspect_LDADD = $(top_builddir)/glib/libdbus-glib-1.la
29
30 dbus-bus-introspect.xml: $(top_builddir)/bus/dbus-daemon dbus-launch print-introspect $(top_builddir)/bus/dbus-daemon
31         DBUS_TOP_BUILDDIR=$(top_builddir) $(srcdir)/run-with-tmp-session-bus.sh ./print-introspect org.freedesktop.DBus /org/freedesktop/DBus > dbus-bus-introspect.xml.tmp && mv dbus-bus-introspect.xml.tmp dbus-bus-introspect.xml
32 endif
33
34 bin_PROGRAMS=dbus-send $(GLIB_TOOLS) dbus-launch dbus-cleanup-sockets $(GTK_TOOLS)
35
36 dbus_send_SOURCES=                              \
37         dbus-print-message.c                    \
38         dbus-print-message.h                    \
39         dbus-send.c
40
41 dbus_monitor_SOURCES=                           \
42         dbus-monitor.c                          \
43         dbus-print-message.c                    \
44         dbus-print-message.h
45
46 dbus_launch_SOURCES=                            \
47         dbus-launch.c
48
49 dbus_cleanup_sockets_SOURCES=                   \
50         dbus-cleanup-sockets.c
51
52 dbus_viewer_SOURCES=                            \
53         dbus-names-model.c                      \
54         dbus-names-model.h                      \
55         dbus-tree-view.c                        \
56         dbus-tree-view.h                        \
57         dbus-viewer.c
58
59 dbus_send_LDADD= $(top_builddir)/dbus/libdbus-1.la
60 dbus_monitor_LDADD= $(top_builddir)/glib/libdbus-glib-1.la
61 dbus_launch_LDADD= $(DBUS_X_LIBS)
62 dbus_viewer_LDADD= $(DBUS_GLIB_TOOL_LIBS) $(top_builddir)/glib/libdbus-gtool.la $(DBUS_GTK_THREADS_LIBS)
63
64 man_MANS = dbus-send.1 dbus-monitor.1 dbus-launch.1 dbus-cleanup-sockets.1
65 EXTRA_DIST = $(man_MANS) run-with-tmp-session-bus.sh
66 CLEANFILES =                            \
67         run-with-tmp-session-bus.conf   \
68         dbus-bus-introspect.xml         \
69         dbus-glib-bindings.h