1 LOCAL_PATH := $(call my-dir)
3 include $(LOCAL_PATH)/Makefile.sources
6 # each igt test is a separate executable. define a function to build one of these tests
10 # specific to this test
11 LOCAL_SRC_FILES := $1.c
15 LOCAL_CFLAGS += ${IGT_LOCAL_CFLAGS}
16 LOCAL_C_INCLUDES = ${IGT_LOCAL_C_INCLUDES}
17 LOCAL_STATIC_LIBRARIES := ${IGT_LOCAL_STATIC_LIBRARIES}
18 LOCAL_SHARED_LIBRARIES := ${IGT_LOCAL_SHARED_LIBRARIES}
20 LOCAL_MODULE_TAGS := optional
21 # ask linker to define a specific symbol; we use this to identify IGT tests
22 LOCAL_LDFLAGS := -Wl,--defsym=$2=0
23 LOCAL_MODULE_PATH := $(ANDROID_PRODUCT_OUT)/$(TARGET_COPY_OUT_VENDOR)/intel/validation/core/igt
25 include $(BUILD_EXECUTABLE)
29 # some tests still do not build under android
31 skip_tests_list += testdisplay # needs glib.h
32 skip_tests_list += pm_rpm
34 # set local compilation flags for IGT tests
35 IGT_LOCAL_CFLAGS += -DHAVE_STRUCT_SYSINFO_TOTALRAM -DANDROID -UNDEBUG
36 IGT_LOCAL_CFLAGS += -include "check-ndebug.h" -std=c99
37 # FIXME: drop once Bionic correctly annotates "noreturn" on pthread_exit
38 IGT_LOCAL_CFLAGS += -Wno-error=return-type
39 # Excessive complaining for established cases. Rely on the Linux version warnings.
40 IGT_LOCAL_CFLAGS += -Wno-sign-compare
43 IGT_LOCAL_C_INCLUDES = $(LOCAL_PATH)/../lib
44 IGT_LOCAL_C_INCLUDES += ${ANDROID_BUILD_TOP}/external/PRIVATE/drm/include/drm
47 IGT_LOCAL_STATIC_LIBRARIES := libintel_gpu_tools
48 IGT_LOCAL_SHARED_LIBRARIES := libpciaccess libdrm libdrm_intel
50 # handle cairo requirements if it is enabled
51 ifeq ("${ANDROID_HAS_CAIRO}", "1")
52 IGT_LOCAL_C_INCLUDES += ${ANDROID_BUILD_TOP}/external/cairo-1.12.16/src
53 IGT_LOCAL_SHARED_LIBRARIES += libcairo
54 IGT_LOCAL_CFLAGS += -DANDROID_HAS_CAIRO=1
56 # the following tests depend on cairo, so skip them
74 IGT_LOCAL_CFLAGS += -DANDROID_HAS_CAIRO=0
77 # create two test lists, one for simple single tests, one for tests that have subtests
78 tests_list := $(filter-out $(skip_tests_list),$(TESTS_progs) $(HANG) $(TESTS_testsuite))
79 tests_list_M := $(filter-out $(skip_tests_list),$(TESTS_progs_M))
81 $(foreach item,$(tests_list),$(eval $(call add_test,$(item),"IGT_SINGLE_TEST")))
82 $(foreach item,$(tests_list_M),$(eval $(call add_test,$(item),"IGT_MULTI_TEST")))