intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: robert.foss@collabora.com
To: daniel.vetter@ffwll.ch, daniel.stone@collabora.com,
	marius.c.vlad@intel.com, tomeu.vizoso@collabora.com,
	emil.velikov@collabora.com, chris@chris-wilson.co.uk
Cc: intel-gfx@lists.freedesktop.org
Subject: [RFC i-g-t 4/7] tools/Makefile: Don't build tools that depend on libdrm_intel.
Date: Wed, 25 May 2016 14:18:53 -0400	[thread overview]
Message-ID: <1464200336-15671-5-git-send-email-robert.foss@collabora.com> (raw)
In-Reply-To: <1464200336-15671-1-git-send-email-robert.foss@collabora.com>

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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2016-05-25 18:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-25 18:18 [RFC i-g-t 0/7] Remove compile time depencencies on libdrm_intel robert.foss
2016-05-25 18:18 ` [RFC i-g-t 1/7] configure.ac: Test for libdrm_intel and build for it if present robert.foss
2016-05-25 21:50   ` Rémi Cardona
2016-05-25 18:18 ` [RFC i-g-t 2/7] configure.ac: Harmonize HAVE_XXX flag for all drm platforms to HAVE_LIBDRM_XXX robert.foss
2016-05-25 18:18 ` [RFC i-g-t 3/7] benchmarks/Makefile: Don't build benchmarks that depend on libdrm_intel robert.foss
2016-05-25 18:18 ` robert.foss [this message]
2016-05-25 18:18 ` [RFC i-g-t 5/7] tools/Makefile: Format whitespace robert.foss
2016-05-25 18:18 ` [RFC i-g-t 6/7] demos/Makefile: Don't build tools that depend on libdrm_intel robert.foss
2016-05-25 18:18 ` [RFC i-g-t 7/7] lib/stubs: Add stubs for intel_bufmgr robert.foss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1464200336-15671-5-git-send-email-robert.foss@collabora.com \
    --to=robert.foss@collabora.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.stone@collabora.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=emil.velikov@collabora.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=marius.c.vlad@intel.com \
    --cc=tomeu.vizoso@collabora.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).