Derek Morton d524a964fc benckmarks/Android.mk: Fix building benchmarks for Android
The commit "benchmarks: Do not install to system-wide bin/" changed
the benchmark file list from bin_PROGRAMS to benchmarks_PROGRAMS.
However Android.mk was not updated, resulting in IGT failing to
build for Android.
This commit adds that change. It also adds LOCAL_MODULE_PATH to
specify where the built benchmarks should be put.

v2: I discovered that the existing definitions of LOCAL_MODULE_PATH
were creating what should have been an invalid path. Not sure how it
was ever working previously, but fixed now.

Signed-off-by: Derek Morton <derek.j.morton@intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
2015-08-13 11:28:22 +01:00

38 lines
1.0 KiB
Makefile

LOCAL_PATH := $(call my-dir)
include $(LOCAL_PATH)/Makefile.sources
#================#
define add_benchmark
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $1.c
LOCAL_CFLAGS += -DHAVE_STRUCT_SYSINFO_TOTALRAM
LOCAL_CFLAGS += -DANDROID -UNDEBUG -include "check-ndebug.h"
LOCAL_CFLAGS += -std=gnu99
# FIXME: drop once Bionic correctly annotates "noreturn" on pthread_exit
LOCAL_CFLAGS += -Wno-error=return-type
# Excessive complaining for established cases. Rely on the Linux version warnings.
LOCAL_CFLAGS += -Wno-sign-compare
LOCAL_MODULE := $1_benchmark
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/intel/validation/core/igt/benchmarks
LOCAL_STATIC_LIBRARIES := libintel_gpu_tools
LOCAL_SHARED_LIBRARIES := libpciaccess \
libdrm \
libdrm_intel
include $(BUILD_EXECUTABLE)
endef
#================#
benchmark_list := $(benchmarks_PROGRAMS)
$(foreach item,$(benchmark_list),$(eval $(call add_benchmark,$(item))))