diff mbox

[RFC,i-g-t,4/9] demos/Makefile: Don't build tools that depend on libdrm_intel.

Message ID 1463785173-17557-5-git-send-email-robert.foss@collabora.com (mailing list archive)
State New, archived
Headers show

Commit Message

Robert Foss May 20, 2016, 10:59 p.m. UTC
From: Robert Foss <robert.foss@collabora.com>

Use the HAS_INTEL automake flag to avoid building tools that won't
compile unless libdrm_intel is available in the build system.

Signed-off-by: Robert Foss <robert.foss@collabora.com>
---
 demos/Makefile.am      | 5 ++---
 demos/Makefile.sources | 7 +++++++
 2 files changed, 9 insertions(+), 3 deletions(-)
 create mode 100644 demos/Makefile.sources
diff mbox

Patch

diff --git a/demos/Makefile.am b/demos/Makefile.am
index e6fbb3b..02409fe 100644
--- a/demos/Makefile.am
+++ b/demos/Makefile.am
@@ -1,6 +1,5 @@ 
-bin_PROGRAMS = 				\
-	intel_sprite_on			\
-	$(NULL)
+
+include Makefile.sources
 
 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib
 AM_CFLAGS = $(DRM_CFLAGS) $(PCIACCESS_CFLAGS) $(CWARNFLAGS) $(CAIRO_CFLAGS) $(LIBUNWIND_CFLAGS)
diff --git a/demos/Makefile.sources b/demos/Makefile.sources
new file mode 100644
index 0000000..98da30d
--- /dev/null
+++ b/demos/Makefile.sources
@@ -0,0 +1,7 @@ 
+bin_PROGRAMS =			\
+	$(NULL)
+
+if HAVE_INTEL
+	bin_PROGRAMS +=			\
+		intel_sprite_on		\
+endif