[Intel-gfx] [PACTH i-g-t v5 05/13] tools/Makefile: Don't build tools that depend on libdrm_intel

robert.foss at collabora.com robert.foss at collabora.com
Wed Jul 27 17:17:39 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>
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>
---
 tools/Android.mk       |  5 +++++
 tools/Makefile.am      |  5 +++++
 tools/Makefile.sources | 16 ++++++----------
 3 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/tools/Android.mk b/tools/Android.mk
index 5f64184..306a4b5 100644
--- a/tools/Android.mk
+++ b/tools/Android.mk
@@ -67,6 +67,11 @@ ifneq ("${ANDROID_HAS_CAIRO}", "1")
     skip_tools_list += intel_residency
 endif
 
+ifeq ($(HAVE_LIBDRM_INTEL),true)
+    bin_PROGRAMS += $(LIBDRM_INTEL_BIN)
+    intel_error_decode_LDFLAGS = -lz
+endif
+
 tools_list := $(filter-out $(skip_tools_list),$(bin_PROGRAMS))
 
 $(foreach item,$(tools_list),$(eval $(call add_tool,$(item))))
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 5f45144..f8ac0d8 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -1,5 +1,10 @@
 include Makefile.sources
 
+if HAVE_LIBDRM_INTEL
+	bin_PROGRAMS += $(LIBDRM_INTEL_BIN)
+	intel_error_decode_LDFLAGS = -lz
+endif
+
 SUBDIRS = null_state_gen registers
 
 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib
diff --git a/tools/Makefile.sources b/tools/Makefile.sources
index 5d5958d..07d8d9b 100644
--- a/tools/Makefile.sources
+++ b/tools/Makefile.sources
@@ -13,11 +13,8 @@ bin_PROGRAMS = 				\
 	intel_bios_reader 		\
 	intel_display_crc		\
 	intel_display_poller		\
-	intel_dump_decode 		\
-	intel_error_decode 		\
 	intel_forcewaked		\
 	intel_gpu_frequency		\
-	intel_framebuffer_dump 		\
 	intel_firmware_decode		\
 	intel_gpu_time 			\
 	intel_gpu_top 			\
@@ -27,7 +24,6 @@ bin_PROGRAMS = 				\
 	intel_lid			\
 	intel_opregion_decode		\
 	intel_panel_fitter		\
-	intel_perf_counters		\
 	intel_reg_checker 		\
 	intel_residency			\
 	intel_stepping 			\
@@ -35,8 +31,12 @@ bin_PROGRAMS = 				\
 
 dist_bin_SCRIPTS = intel_gpu_abrt
 
-intel_dump_decode_SOURCES = 	\
-	intel_dump_decode.c
+LIBDRM_INTEL_BIN =		\
+	intel_dump_decode	\
+	intel_error_decode	\
+	intel_framebuffer_dump	\
+	intel_perf_counters	\
+	$(NULL)
 
 intel_reg_SOURCES =		\
 	intel_reg.c		\
@@ -44,10 +44,6 @@ intel_reg_SOURCES =		\
 	intel_reg_spec.c	\
 	intel_reg_spec.h
 
-intel_error_decode_SOURCES =	\
-	intel_error_decode.c
-intel_error_decode_LDFLAGS = -lz
-
 intel_bios_reader_SOURCES =	\
 	intel_bios_reader.c	\
 	intel_bios.h
-- 
2.7.4



More information about the Intel-gfx mailing list