All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH i-g-t 08/13] Android.mk: Fix libkmod use
Date: Tue, 16 May 2017 15:24:57 +0200	[thread overview]
Message-ID: <20170516132502.9772-9-arkadiusz.hiler@intel.com> (raw)
In-Reply-To: <20170516132502.9772-1-arkadiusz.hiler@intel.com>

On Android libkmod.h is nested under libkmod directory, so we should
include appropriately.

Also we need to link with it.

Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
 benchmarks/Android.mk | 2 ++
 lib/Android.mk        | 1 +
 lib/igt_kmod.h        | 4 ++++
 tests/Android.mk      | 4 ++--
 tools/Android.mk      | 2 ++
 5 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/benchmarks/Android.mk b/benchmarks/Android.mk
index c0fa09f..faa73b7 100644
--- a/benchmarks/Android.mk
+++ b/benchmarks/Android.mk
@@ -18,6 +18,7 @@ define add_benchmark
     LOCAL_CFLAGS += -Wno-error=return-type
     # Excessive complaining for established cases. Rely on the Linux version warnings.
     LOCAL_CFLAGS += -Wno-sign-compare
+    LOCAL_LDFLAGS += -lkmod
 
     LOCAL_MODULE := $1_benchmark
     LOCAL_MODULE_TAGS := optional
@@ -26,6 +27,7 @@ define add_benchmark
     LOCAL_STATIC_LIBRARIES := libintel_gpu_tools
 
     LOCAL_SHARED_LIBRARIES := libpciaccess  \
+                              libkmod       \
                               libdrm        \
                               libdrm_intel
 
diff --git a/lib/Android.mk b/lib/Android.mk
index eb72f84..0596e4a 100644
--- a/lib/Android.mk
+++ b/lib/Android.mk
@@ -29,6 +29,7 @@ LOCAL_CFLAGS += -std=gnu99 -UNDEBUG
 LOCAL_MODULE:= libintel_gpu_tools
 
 LOCAL_SHARED_LIBRARIES := libpciaccess  \
+			  libkmod       \
 			  libdrm        \
 			  libdrm_intel
 
diff --git a/lib/igt_kmod.h b/lib/igt_kmod.h
index fd307a4..6a7584f 100644
--- a/lib/igt_kmod.h
+++ b/lib/igt_kmod.h
@@ -24,7 +24,11 @@
 #ifndef IGT_KMOD_H
 #define IGT_KMOD_H
 
+#ifdef ANDROID
+#include <libkmod/libkmod.h>
+#else
 #include <libkmod.h>
+#endif
 
 #include "igt_aux.h"
 
diff --git a/tests/Android.mk b/tests/Android.mk
index c67ddbd..b664dff 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -19,7 +19,7 @@ define add_test
 
     LOCAL_MODULE_TAGS := optional
     # ask linker to define a specific symbol; we use this to identify IGT tests
-    LOCAL_LDFLAGS := -Wl,--defsym=$2=0
+    LOCAL_LDFLAGS := -Wl,--defsym=$2=0 -lkmod
     LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/intel/validation/core/igt
 
     include $(BUILD_EXECUTABLE)
@@ -45,7 +45,7 @@ IGT_LOCAL_C_INCLUDES += ${ANDROID_BUILD_TOP}/external/PRIVATE/drm/include/drm
 
 # set local libraries
 IGT_LOCAL_STATIC_LIBRARIES := libintel_gpu_tools
-IGT_LOCAL_SHARED_LIBRARIES := libpciaccess libdrm libdrm_intel
+IGT_LOCAL_SHARED_LIBRARIES := libpciaccess libkmod libdrm libdrm_intel
 
 # handle cairo requirements if it is enabled
 ifeq ("${ANDROID_HAS_CAIRO}", "1")
diff --git a/tools/Android.mk b/tools/Android.mk
index 0602e8c..a8e649b 100644
--- a/tools/Android.mk
+++ b/tools/Android.mk
@@ -23,6 +23,7 @@ define add_tool
     LOCAL_CFLAGS += -Wno-error=return-type
     # Excessive complaining for established cases. Rely on the Linux version warnings.
     LOCAL_CFLAGS += -Wno-sign-compare
+    LOCAL_LDFLAGS += -lkmod
     ifeq ($($(1)_LDFLAGS),)
     else
         LOCAL_LDFLAGS += $($(1)_LDFLAGS)
@@ -38,6 +39,7 @@ define add_tool
     LOCAL_STATIC_LIBRARIES := libintel_gpu_tools
 
     LOCAL_SHARED_LIBRARIES := libpciaccess  \
+                              libkmod       \
                               libdrm        \
                               libdrm_intel
 
-- 
2.9.3

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

  parent reply	other threads:[~2017-05-16 13:25 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-16 13:24 [PATCH i-g-t v2 00/13] Fix IGTs for Android Arkadiusz Hiler
2017-05-16 13:24 ` [PATCH i-g-t 01/13] tests/drm_import_export: Include {i915_, }drm.h properly Arkadiusz Hiler
2017-05-16 13:24 ` [PATCH i-g-t 02/13] Make conditions on HAVE_UDEV consistent Arkadiusz Hiler
2017-05-16 13:24 ` [PATCH i-g-t 03/13] lib/igt_aux: Include unistd.h for gettid() on Android Arkadiusz Hiler
2017-05-16 13:24 ` [PATCH i-g-t 04/13] lib/igt_aux: Make procps optional Arkadiusz Hiler
2017-05-16 13:50   ` Chris Wilson
2017-05-16 13:24 ` [PATCH i-g-t 05/13] chamelium: Fix build issues on Android Arkadiusz Hiler
2017-05-16 14:06   ` Michal Wajdeczko
2017-05-18 11:48     ` [PATCH] " Arkadiusz Hiler
2017-05-18 12:08       ` Michal Wajdeczko
2017-05-16 13:24 ` [PATCH i-g-t 06/13] tools/Android.mk: Add guc_logger and l3_parity skip list Arkadiusz Hiler
2017-05-18  8:07   ` Petri Latvala
2017-05-18 11:54     ` [PATCH i-g-t v2] tools/Android.mk: Add guc_logger and l3_parity to " Arkadiusz Hiler
2017-05-16 13:24 ` [PATCH i-g-t 07/13] tests/Android.mk: Add perf " Arkadiusz Hiler
2017-05-16 13:51   ` Chris Wilson
2017-05-16 13:24 ` Arkadiusz Hiler [this message]
2017-05-16 13:24 ` [PATCH i-g-t 09/13] Android.mk: Filter out *.h from src files Arkadiusz Hiler
2017-05-16 13:24 ` [PATCH i-g-t 10/13] Android.mk: Use drm stubs Arkadiusz Hiler
2017-05-16 13:25 ` [PATCH i-g-t 11/13] tools/Android.mk: Fix zlib inclusion Arkadiusz Hiler
2017-05-16 13:25 ` [PATCH i-g-t 12/13] tests/gem_exec_nop: Disable headless subtest on cairoless Android Arkadiusz Hiler
2017-05-16 13:25 ` [PATCH i-g-t 13/13] tests/gem_exec_nop: Rename signal() to fence_signal() Arkadiusz Hiler
2017-05-16 13:48   ` Chris Wilson
2017-05-18  8:09 ` [PATCH i-g-t v2 00/13] Fix IGTs for Android Petri Latvala
2017-05-18 11:55   ` [PATCH i-g-t v2 00/13] Fix IGTs for Android\ Arkadiusz Hiler

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=20170516132502.9772-9-arkadiusz.hiler@intel.com \
    --to=arkadiusz.hiler@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.