From: Robert Foss <[email protected]>

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 <[email protected]>
---
 demos/Makefile.am      | 5 ++---
 demos/Makefile.sources | 7 +++++++
 2 files changed, 9 insertions(+), 3 deletions(-)
 create mode 100644 demos/Makefile.sources

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
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to