intel-gpu-tools: Build tests needing cairo if ANDROID_HAS_CAIRO=1

Until now the tests that depended on libcairo were simply
skipped in the android build. Now that I have a cairo port
working, build these cairo dependent tests if ANDROID_HAS_CAIRO
is set to 1 in the environment.
For information on building cairo for IGT on Android see the
wiki at:

https://securewiki.ith.intel.com/display/GFXCore/IGT+Test+Suite+on+Android

Signed-off-by: Tim Gore <tim.gore@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Tim Gore
2014-05-12 13:39:00 +01:00
committed by Daniel Vetter
parent 0fee90b56d
commit 41cbe36bba
3 changed files with 59 additions and 35 deletions
+14 -9
View File
@@ -31,17 +31,8 @@ $(GPU_TOOLS_PATH)/config.h:
include $(LOCAL_PATH)/Makefile.sources
skip_lib_list := \
igt_kms.c \
igt_kms.h \
igt_fb.c
lib_list := $(filter-out $(skip_lib_list),$(libintel_tools_la_SOURCES))
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(lib_list)
LOCAL_GENERATED_SOURCES := \
$(GPU_TOOLS_PATH)/version.h \
$(GPU_TOOLS_PATH)/config.h
@@ -61,5 +52,19 @@ LOCAL_SHARED_LIBRARIES := libpciaccess \
libdrm \
libdrm_intel
ifeq ("${ANDROID_HAS_CAIRO}", "1")
skip_lib_list :=
LOCAL_C_INCLUDES += $(ANDROID_BUILD_TOP)/external/cairo-1.12.16/src
LOCAL_CFLAGS += -DANDROID_HAS_CAIRO=1
else
skip_lib_list := \
igt_kms.c \
igt_kms.h \
igt_fb.c
-DANDROID_HAS_CAIRO=0
endif
LOCAL_SRC_FILES := $(filter-out $(skip_lib_list),$(libintel_tools_la_SOURCES))
include $(BUILD_STATIC_LIBRARY)