[Intel-gfx] [RFC i-g-t v3 07/13] demos/Makefile: Don't build tools that depend on libdrm_intel.
robert.foss at collabora.com
robert.foss at collabora.com
Wed Jun 15 09:51:04 UTC 2016
From: Robert Foss <robert.foss at 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 at collabora.com>
---
demos/Android.mk | 5 ++++-
demos/Makefile.am | 8 +++++---
demos/Makefile.sources | 7 +++++++
3 files changed, 16 insertions(+), 4 deletions(-)
create mode 100644 demos/Makefile.sources
diff --git a/demos/Android.mk b/demos/Android.mk
index 7d06c9a..add2414 100644
--- a/demos/Android.mk
+++ b/demos/Android.mk
@@ -4,8 +4,11 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_SRC_FILES := intel_sprite_on.c
+LOCAL_SRC_FILES :=
+ifeq ($(HAVE_LIBDRM_INTEL),true)
+ LOCAL_SRC_FILES += $(LIBDRM_INTEL_BIN)
+endif
LOCAL_CFLAGS += -DHAVE_TERMIOS_H
LOCAL_CFLAGS += -DANDROID -UNDEBUG
diff --git a/demos/Makefile.am b/demos/Makefile.am
index f5725f4..48eb6c2 100644
--- a/demos/Makefile.am
+++ b/demos/Makefile.am
@@ -1,6 +1,8 @@
-bin_PROGRAMS = \
- intel_sprite_on \
- $(NULL)
+include Makefile.sources
+
+if HAVE_LIBDRM_INTEL
+ bin_PROGRAMS += $(LIBDRM_INTEL_BIN)
+endif
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib
AM_CFLAGS = $(DRM_CFLAGS) $(PCIACCESS_CFLAGS) $(CWARNFLAGS) \
diff --git a/demos/Makefile.sources b/demos/Makefile.sources
new file mode 100644
index 0000000..302f6d9
--- /dev/null
+++ b/demos/Makefile.sources
@@ -0,0 +1,7 @@
+bin_PROGRAMS = \
+ $(NULL)
+
+HAVE_LIBDRM_INTEL_BIN = \
+ intel_sprite_on \
+ $(NULL)
+
--
2.7.4
More information about the Intel-gfx
mailing list