mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-08 16:36:14 +00:00
commit 743dc7997aa9f5210055896940d87c88983dcda6 breaks the build under Android because version.h is not created. This happens because the android make executes from the ANDROID_BUILD_TOP directory rather than from the directory containing the source files, so we need to differentiate between Android and linux builds. This is V2 of this patch based on Thomas Wood's suggestion. Signed-off-by: Tim Gore <tim.gore@intel.com> [Thomas: Fix distcheck issues] Signed-off-by: Thomas Wood <thomas.wood@intel.com>
51 lines
1.2 KiB
Makefile
51 lines
1.2 KiB
Makefile
LOCAL_PATH := $(call my-dir)
|
|
|
|
GPU_TOOLS_PATH := $(LOCAL_PATH)/..
|
|
IGT_LIB_PATH := $(LOCAL_PATH)
|
|
|
|
# FIXME: autogenerate this info #
|
|
$(GPU_TOOLS_PATH)/config.h:
|
|
@echo "updating config.h"
|
|
@echo '#define PACKAGE_VERSION "1.5"' >> $@ ; \
|
|
echo '#define TARGET_CPU_PLATFORM "android-ia"' >> $@ ;
|
|
|
|
include $(LOCAL_PATH)/Makefile.sources
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_GENERATED_SOURCES := \
|
|
$(IGT_LIB_PATH)/version.h \
|
|
$(GPU_TOOLS_PATH)/config.h
|
|
|
|
LOCAL_C_INCLUDES += \
|
|
$(LOCAL_PATH)/..
|
|
|
|
LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
|
|
|
|
LOCAL_CFLAGS += -DHAVE_LIBDRM_ATOMIC_PRIMITIVES
|
|
LOCAL_CFLAGS += -DHAVE_STRUCT_SYSINFO_TOTALRAM
|
|
LOCAL_CFLAGS += -DANDROID
|
|
LOCAL_CFLAGS += -std=c99
|
|
LOCAL_MODULE:= libintel_gpu_tools
|
|
|
|
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)
|
|
|