2005-10-29 Robert McQueen <robot101@debian.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$(EXEEXT)
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 dbus-bus-introspect.xml: $(top_builddir)/bus/dbus-daemon$(EXEEXT) dbus-launch$(EXEEXT) dbus-send$(EXEEXT) $(top_builddir)/bus/dbus-daemon$(EXEEXT) Makefile
26         DBUS_TOP_BUILDDIR=$(top_builddir) $(srcdir)/run-with-tmp-session-bus.sh ./dbus-send --print-reply=literal --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.Introspectable.Introspect > dbus-bus-introspect.xml.tmp && mv dbus-bus-introspect.xml.tmp dbus-bus-introspect.xml
27 endif
28
29 bin_PROGRAMS=dbus-send $(GLIB_TOOLS) dbus-launch dbus-cleanup-sockets $(GTK_TOOLS)
30
31 dbus_send_SOURCES=                              \
32         dbus-print-message.c                    \
33         dbus-print-message.h                    \
34         dbus-send.c
35
36 dbus_monitor_SOURCES=                           \
37         dbus-monitor.c                          \
38         dbus-print-message.c                    \
39         dbus-print-message.h
40
41 dbus_launch_SOURCES=                            \
42         dbus-launch.c
43
44 dbus_cleanup_sockets_SOURCES=                   \
45         dbus-cleanup-sockets.c
46
47 dbus_viewer_SOURCES=                            \
48         dbus-names-model.c                      \
49         dbus-names-model.h                      \
50         dbus-tree-view.c                        \
51         dbus-tree-view.h                        \
52         dbus-viewer.c
53
54 dbus_send_LDADD= $(top_builddir)/dbus/libdbus-1.la
55 dbus_monitor_LDADD= $(top_builddir)/glib/libdbus-glib-1.la
56 dbus_launch_LDADD= $(DBUS_X_LIBS)
57 dbus_viewer_LDADD= $(top_builddir)/glib/libdbus-gtool.la $(DBUS_GTK_THREADS_LIBS) $(DBUS_GLIB_TOOL_LIBS)
58
59 man_MANS = dbus-send.1 dbus-monitor.1 dbus-launch.1 dbus-cleanup-sockets.1
60 EXTRA_DIST = $(man_MANS) run-with-tmp-session-bus.sh
61 CLEANFILES =                            \
62         run-with-tmp-session-bus.conf   \
63         dbus-bus-introspect.xml         \
64         dbus-glib-bindings.h