@@ -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
@@ -29,6 +29,7 @@ LOCAL_CFLAGS += -std=gnu99 -UNDEBUG
LOCAL_MODULE:= libintel_gpu_tools
LOCAL_SHARED_LIBRARIES := libpciaccess \
+ libkmod \
libdrm \
libdrm_intel
@@ -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"
@@ -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")
@@ -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
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(-)