summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArkadiusz Hiler <arkadiusz.hiler@intel.com>2017-04-12 09:42:47 +0200
committerArkadiusz Hiler <arkadiusz.hiler@intel.com>2017-06-07 13:28:16 +0300
commit53e7f53d6b040b32083bb71b72d1d4fbf8c9a575 (patch)
tree8c3454f1c294e509b7018bd9bab47598b80cac46
parent4fe47f4541a2bb64f4189759bfb62155011f6061 (diff)
Android.mk: Fix libkmod use
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> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
-rw-r--r--benchmarks/Android.mk2
-rw-r--r--lib/Android.mk1
-rw-r--r--lib/igt_kmod.h4
-rw-r--r--tests/Android.mk4
-rw-r--r--tools/Android.mk2
5 files changed, 11 insertions, 2 deletions
diff --git a/benchmarks/Android.mk b/benchmarks/Android.mk
index c0fa09ff..faa73b71 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 eb72f84a..0596e4a4 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 fd307a45..6a7584f1 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 c67ddbd4..b664dff2 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 0602e8c6..a8e649ba 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