Rafael Barbalho | 09bcb0a | 2014-01-31 14:57:40 +0000 | [diff] [blame] | 1 | LOCAL_PATH := $(call my-dir) |
Oscar Mateo | 76c78c0 | 2013-11-12 11:50:45 +0000 | [diff] [blame] | 2 | |
Rafael Barbalho | 09bcb0a | 2014-01-31 14:57:40 +0000 | [diff] [blame] | 3 | include $(LOCAL_PATH)/Makefile.sources |
Oscar Mateo | 76c78c0 | 2013-11-12 11:50:45 +0000 | [diff] [blame] | 4 | |
| 5 | #================# |
| 6 | |
| 7 | define add_tool |
| 8 | include $(CLEAR_VARS) |
| 9 | |
Thomas Wood | 51576b7 | 2015-07-16 11:53:11 +0100 | [diff] [blame] | 10 | ifeq ($($(1)_SOURCES),) |
| 11 | LOCAL_SRC_FILES := $1.c |
| 12 | else |
| 13 | LOCAL_SRC_FILES := $($(1)_SOURCES) |
| 14 | endif |
Oscar Mateo | 76c78c0 | 2013-11-12 11:50:45 +0000 | [diff] [blame] | 15 | |
| 16 | LOCAL_CFLAGS += -DHAVE_TERMIOS_H |
| 17 | LOCAL_CFLAGS += -DHAVE_STRUCT_SYSINFO_TOTALRAM |
Devon Davies | 67c80f8 | 2014-01-08 16:07:06 +0000 | [diff] [blame] | 18 | LOCAL_CFLAGS += -DANDROID -UNDEBUG |
Tim Gore | a11117e | 2014-12-12 12:14:33 +0000 | [diff] [blame] | 19 | LOCAL_CFLAGS += -std=gnu99 |
Oscar Mateo | 76c78c0 | 2013-11-12 11:50:45 +0000 | [diff] [blame] | 20 | # FIXME: drop once Bionic correctly annotates "noreturn" on pthread_exit |
| 21 | LOCAL_CFLAGS += -Wno-error=return-type |
| 22 | # Excessive complaining for established cases. Rely on the Linux version warnings. |
| 23 | LOCAL_CFLAGS += -Wno-sign-compare |
| 24 | |
tgore | e599ff4 | 2014-03-28 12:54:59 +0000 | [diff] [blame] | 25 | LOCAL_C_INCLUDES = $(LOCAL_PATH)/../lib |
| 26 | LOCAL_C_INCLUDES += ${ANDROID_BUILD_TOP}/external/PRIVATE/drm/include/drm |
| 27 | |
Oscar Mateo | 76c78c0 | 2013-11-12 11:50:45 +0000 | [diff] [blame] | 28 | LOCAL_MODULE := $1 |
| 29 | LOCAL_MODULE_TAGS := optional |
| 30 | |
Rafael Barbalho | 09bcb0a | 2014-01-31 14:57:40 +0000 | [diff] [blame] | 31 | LOCAL_STATIC_LIBRARIES := libintel_gpu_tools |
| 32 | |
Oscar Mateo | 76c78c0 | 2013-11-12 11:50:45 +0000 | [diff] [blame] | 33 | LOCAL_SHARED_LIBRARIES := libpciaccess \ |
| 34 | libdrm \ |
| 35 | libdrm_intel |
| 36 | |
| 37 | include $(BUILD_EXECUTABLE) |
| 38 | endef |
| 39 | |
| 40 | #================# |
| 41 | |
| 42 | skip_tools_list := \ |
| 43 | intel_framebuffer_dump \ |
| 44 | intel_reg_dumper \ |
| 45 | intel_vga_read \ |
| 46 | intel_vga_write |
| 47 | |
Tvrtko Ursulin | 4a9b70c | 2014-01-22 10:41:05 +0000 | [diff] [blame] | 48 | tools_list := $(filter-out $(skip_tools_list),$(bin_PROGRAMS)) |
Oscar Mateo | 76c78c0 | 2013-11-12 11:50:45 +0000 | [diff] [blame] | 49 | |
| 50 | $(foreach item,$(tools_list),$(eval $(call add_tool,$(item)))) |