[Mesa-dev] [PATCH 1/2] tools/rbug-gui: add it to the existing automake build

Emil Velikov emil.l.velikov at gmail.com
Mon Mar 16 05:31:00 PDT 2015


Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 Makefile.am                            |  3 ++-
 configure.ac                           | 15 +++++++++++++++
 src/gallium/Makefile.am                |  6 +++++-
 src/gallium/tools/rbug-gui/.gitignore  |  1 +
 src/gallium/tools/rbug-gui/Makefile.am | 27 +++++++++++++++++++++++++++
 5 files changed, 50 insertions(+), 2 deletions(-)
 create mode 100644 src/gallium/tools/rbug-gui/.gitignore
 create mode 100644 src/gallium/tools/rbug-gui/Makefile.am

diff --git a/Makefile.am b/Makefile.am
index f4f0912..91388b9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -32,7 +32,8 @@ AM_DISTCHECK_CONFIGURE_FLAGS = \
 	--enable-vdpau \
 	--enable-xa \
 	--enable-xvmc \
-	--with-egl-platforms=x11,wayland,drm
+	--with-egl-platforms=x11,wayland,drm \
+	--enable-gallium-rbug-gui
 
 ACLOCAL_AMFLAGS = -I m4
 
diff --git a/configure.ac b/configure.ac
index a3b0ebd..a9a0436 100644
--- a/configure.ac
+++ b/configure.ac
@@ -808,6 +808,12 @@ AC_ARG_ENABLE([gallium-tests],
     [enable_gallium_tests="$enableval"],
     [enable_gallium_tests=no])
 
+AC_ARG_ENABLE([gallium-rbug-gui],
+    [AS_HELP_STRING([--enable-gallium-rbug-gui],
+        [Enable the GUI tool for the Gallium Remote Debugger) @<:@default=disabled@:>@])],
+    [enable_gallium_rbug_gui="$enableval"],
+    [enable_gallium_rbug_gui=no])
+
 # Option for Gallium drivers
 
 # Keep this in sync with the --with-gallium-drivers help string default value
@@ -1987,6 +1993,14 @@ if test "x$enable_gallium_tests" = xyes; then
 fi
 AM_CONDITIONAL(HAVE_GALLIUM_TESTS, test "x$enable_gallium_tests" = xyes)
 
+if test "x$enable_gallium_rbug_gui" = xyes; then
+    if test -z "$with_gallium_drivers"; then
+        AC_MSG_ERROR([Building the rbug GUI requires gallium.])
+    fi
+    PKG_CHECK_MODULES(GTK, [gtkglext-1.0])
+fi
+AM_CONDITIONAL(HAVE_GALLIUM_RBUG_GUI, test "x$enable_gallium_rbug_gui" = xyes)
+
 dnl Directory for VDPAU libs
 AC_ARG_WITH([vdpau-libdir],
     [AS_HELP_STRING([--with-vdpau-libdir=DIR],
@@ -2399,6 +2413,7 @@ AC_CONFIG_FILES([Makefile
 		src/gallium/targets/xvmc/Makefile
 		src/gallium/tests/trivial/Makefile
 		src/gallium/tests/unit/Makefile
+		src/gallium/tools/rbug-gui/Makefile
 		src/gallium/winsys/freedreno/drm/Makefile
 		src/gallium/winsys/i915/drm/Makefile
 		src/gallium/winsys/intel/drm/Makefile
diff --git a/src/gallium/Makefile.am b/src/gallium/Makefile.am
index 652cb13..3688a74 100644
--- a/src/gallium/Makefile.am
+++ b/src/gallium/Makefile.am
@@ -178,8 +178,12 @@ EXTRA_DIST += \
 	state_trackers/wgl targets/libgl-gdi \
 	targets/graw-gdi targets/graw-null  targets/graw-xlib \
 	state_trackers/hgl targets/haiku-softpipe \
-	tools
+	tools/addr2line.sh tools/trace
 
+if HAVE_GALLIUM_RBUG_GUI
+SUBDIRS += \
+	tools/rbug-gui
+endif
 
 ##
 ## Gallium tests
diff --git a/src/gallium/tools/rbug-gui/.gitignore b/src/gallium/tools/rbug-gui/.gitignore
new file mode 100644
index 0000000..fb6cbdd
--- /dev/null
+++ b/src/gallium/tools/rbug-gui/.gitignore
@@ -0,0 +1 @@
+rbug-gui
diff --git a/src/gallium/tools/rbug-gui/Makefile.am b/src/gallium/tools/rbug-gui/Makefile.am
new file mode 100644
index 0000000..99c8b22
--- /dev/null
+++ b/src/gallium/tools/rbug-gui/Makefile.am
@@ -0,0 +1,27 @@
+include $(top_srcdir)/src/gallium/Automake.inc
+
+AM_CFLAGS = \
+	-I$(srcdir)/src \
+	$(GALLIUM_CFLAGS) \
+	$(VISIBILITY_CFLAGS) \
+	$(GTK_CFLAGS)
+
+noinst_PROGRAMS = rbug-gui
+
+rbug_gui_SOURCES = \
+	src/ask.c \
+	src/context.c \
+	src/draw.c \
+	src/main.c \
+	src/program.h \
+	src/rbug.c \
+	src/shader.c \
+	src/texture.c
+
+rbug_gui_LDADD = \
+	$(top_builddir)/src/gallium/auxiliary/libgallium.la \
+	$(top_builddir)/src/util/libmesautil.la \
+	$(GALLIUM_COMMON_LIB_DEPS) \
+	$(GTK_LIBS)
+
+EXTRA_DIST = README todo.txt res
-- 
2.3.1



More information about the mesa-dev mailing list