[Intel-gfx] [RFC i-g-t 4/7] tools/Makefile: Don't build tools that depend on libdrm_intel.
robert.foss at collabora.com
robert.foss at collabora.com
Wed May 25 18:18:53 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>
---
tools/Android.mk | 8 ++++++++
tools/Makefile.am | 8 ++++++++
tools/Makefile.sources | 16 ++++++----------
3 files changed, 22 insertions(+), 10 deletions(-)
diff --git a/tools/Android.mk b/tools/Android.mk
index 5f64184..7c99432 100644
--- a/tools/Android.mk
+++ b/tools/Android.mk
@@ -67,6 +67,14 @@ ifneq ("${ANDROID_HAS_CAIRO}", "1")
skip_tools_list += intel_residency
endif
+ifeq ($(HAVE_LIBDRM_INTEL),true)
+ bin_PROGRAMS += $(LIBDRM_INTEL_BIN)
+
+ intel_dump_decode_SOURCES = intel_dump_decode.c
+ intel_error_decode_SOURCES = intel_error_decode.c
+ 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..bf2511d 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -1,5 +1,13 @@
include Makefile.sources
+if HAVE_LIBDRM_INTEL
+ bin_PROGRAMS += $(LIBDRM_INTEL_BIN)
+
+ intel_dump_decode_SOURCES = intel_dump_decode.c
+ intel_error_decode_SOURCES = intel_error_decode.c
+ 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