diff options
author | Tim Gore <tim.gore@intel.com> | 2014-05-12 13:39:00 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-05-12 18:56:31 +0200 |
commit | 41cbe36bba966fdc96d86031f2db5853e2c59ef4 (patch) | |
tree | 14b311b7ce7be2fe116b0659ce5ace12c91a122f /lib | |
parent | 0fee90b56df9a644b305f6cf37785b8284d410b3 (diff) |
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>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Android.mk | 23 | ||||
-rw-r--r-- | lib/igt_fb.h | 3 |
2 files changed, 16 insertions, 10 deletions
diff --git a/lib/Android.mk b/lib/Android.mk index d4ebef4a..5709aecc 100644 --- a/lib/Android.mk +++ b/lib/Android.mk @@ -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) diff --git a/lib/igt_fb.h b/lib/igt_fb.h index 7242f9bd..e8bb2a86 100644 --- a/lib/igt_fb.h +++ b/lib/igt_fb.h @@ -28,7 +28,8 @@ #ifndef __IGT_FB_H__ #define __IGT_FB_H__ -#ifndef ANDROID +/* cairo is assumed available on linux. On Android we check for ANDROID_HAS_CAIRO */ +#if (!defined(ANDROID)) || (defined(ANDROID) && ANDROID_HAS_CAIRO) #include <cairo.h> #else typedef struct _cairo_surface cairo_surface_t; |