Rafael Barbalho | 005c333 | 2014-01-31 14:57:38 +0000 | [diff] [blame] | 1 | LOCAL_PATH := $(call my-dir) |
| 2 | |
Rafael Barbalho | bdb08f9 | 2014-01-31 14:57:39 +0000 | [diff] [blame] | 3 | GPU_TOOLS_PATH := $(LOCAL_PATH)/.. |
Tim Gore | 57bd860 | 2014-07-24 17:38:22 +0100 | [diff] [blame] | 4 | IGT_LIB_PATH := $(LOCAL_PATH) |
Rafael Barbalho | bdb08f9 | 2014-01-31 14:57:39 +0000 | [diff] [blame] | 5 | |
Rafael Barbalho | bdb08f9 | 2014-01-31 14:57:39 +0000 | [diff] [blame] | 6 | # FIXME: autogenerate this info # |
| 7 | $(GPU_TOOLS_PATH)/config.h: |
| 8 | @echo "updating config.h" |
| 9 | @echo '#define PACKAGE_VERSION "1.5"' >> $@ ; \ |
| 10 | echo '#define TARGET_CPU_PLATFORM "android-ia"' >> $@ ; |
| 11 | |
Rafael Barbalho | 005c333 | 2014-01-31 14:57:38 +0000 | [diff] [blame] | 12 | include $(LOCAL_PATH)/Makefile.sources |
| 13 | |
Rafael Barbalho | 005c333 | 2014-01-31 14:57:38 +0000 | [diff] [blame] | 14 | include $(CLEAR_VARS) |
| 15 | |
Rafael Barbalho | bdb08f9 | 2014-01-31 14:57:39 +0000 | [diff] [blame] | 16 | LOCAL_GENERATED_SOURCES := \ |
Tim Gore | 57bd860 | 2014-07-24 17:38:22 +0100 | [diff] [blame] | 17 | $(IGT_LIB_PATH)/version.h \ |
Rafael Barbalho | bdb08f9 | 2014-01-31 14:57:39 +0000 | [diff] [blame] | 18 | $(GPU_TOOLS_PATH)/config.h |
| 19 | |
Rafael Barbalho | 005c333 | 2014-01-31 14:57:38 +0000 | [diff] [blame] | 20 | LOCAL_C_INCLUDES += \ |
| 21 | $(LOCAL_PATH)/.. |
| 22 | |
Rafael Barbalho | 09bcb0a | 2014-01-31 14:57:40 +0000 | [diff] [blame] | 23 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH) |
Rafael Barbalho | 005c333 | 2014-01-31 14:57:38 +0000 | [diff] [blame] | 24 | |
| 25 | LOCAL_CFLAGS += -DHAVE_LIBDRM_ATOMIC_PRIMITIVES |
| 26 | LOCAL_CFLAGS += -DHAVE_STRUCT_SYSINFO_TOTALRAM |
Tim Gore | 07e9f3e | 2015-01-12 09:50:22 +0000 | [diff] [blame^] | 27 | LOCAL_CFLAGS += -DANDROID -DHAVE_LINUX_KD_H |
Tim Gore | a11117e | 2014-12-12 12:14:33 +0000 | [diff] [blame] | 28 | LOCAL_CFLAGS += -std=gnu99 |
Rafael Barbalho | 005c333 | 2014-01-31 14:57:38 +0000 | [diff] [blame] | 29 | LOCAL_MODULE:= libintel_gpu_tools |
| 30 | |
| 31 | LOCAL_SHARED_LIBRARIES := libpciaccess \ |
| 32 | libdrm \ |
| 33 | libdrm_intel |
| 34 | |
Tim Gore | 41cbe36 | 2014-05-12 13:39:00 +0100 | [diff] [blame] | 35 | ifeq ("${ANDROID_HAS_CAIRO}", "1") |
| 36 | skip_lib_list := |
| 37 | LOCAL_C_INCLUDES += $(ANDROID_BUILD_TOP)/external/cairo-1.12.16/src |
Tim Gore | 764772c | 2014-10-02 16:26:32 +0100 | [diff] [blame] | 38 | LOCAL_CFLAGS += -DANDROID_HAS_CAIRO=1 -DIGT_DATADIR=\".\" |
Tim Gore | 41cbe36 | 2014-05-12 13:39:00 +0100 | [diff] [blame] | 39 | else |
| 40 | skip_lib_list := \ |
| 41 | igt_kms.c \ |
| 42 | igt_kms.h \ |
| 43 | igt_fb.c |
| 44 | -DANDROID_HAS_CAIRO=0 |
| 45 | endif |
| 46 | |
| 47 | LOCAL_SRC_FILES := $(filter-out $(skip_lib_list),$(libintel_tools_la_SOURCES)) |
| 48 | |
Rafael Barbalho | 005c333 | 2014-01-31 14:57:38 +0000 | [diff] [blame] | 49 | include $(BUILD_STATIC_LIBRARY) |
| 50 | |