blob: a957ec13b76c3d625926e59214af247627ae1414 [file] [log] [blame]
Rafael Barbalho09bcb0a2014-01-31 14:57:40 +00001LOCAL_PATH := $(call my-dir)
Oscar Mateo76c78c02013-11-12 11:50:45 +00002
Rafael Barbalho09bcb0a2014-01-31 14:57:40 +00003include $(LOCAL_PATH)/Makefile.sources
Oscar Mateo76c78c02013-11-12 11:50:45 +00004
5#================#
6
7define add_tool
8 include $(CLEAR_VARS)
9
Rafael Barbalho09bcb0a2014-01-31 14:57:40 +000010 LOCAL_SRC_FILES := $1.c
Oscar Mateo76c78c02013-11-12 11:50:45 +000011
12 LOCAL_CFLAGS += -DHAVE_TERMIOS_H
13 LOCAL_CFLAGS += -DHAVE_STRUCT_SYSINFO_TOTALRAM
Devon Davies67c80f82014-01-08 16:07:06 +000014 LOCAL_CFLAGS += -DANDROID -UNDEBUG
Oscar Mateo76c78c02013-11-12 11:50:45 +000015 LOCAL_CFLAGS += -std=c99
16 # FIXME: drop once Bionic correctly annotates "noreturn" on pthread_exit
17 LOCAL_CFLAGS += -Wno-error=return-type
18 # Excessive complaining for established cases. Rely on the Linux version warnings.
19 LOCAL_CFLAGS += -Wno-sign-compare
20
21 LOCAL_MODULE := $1
22 LOCAL_MODULE_TAGS := optional
23
Rafael Barbalho09bcb0a2014-01-31 14:57:40 +000024 LOCAL_STATIC_LIBRARIES := libintel_gpu_tools
25
Oscar Mateo76c78c02013-11-12 11:50:45 +000026 LOCAL_SHARED_LIBRARIES := libpciaccess \
27 libdrm \
28 libdrm_intel
29
30 include $(BUILD_EXECUTABLE)
31endef
32
33#================#
34
35skip_tools_list := \
36 intel_framebuffer_dump \
37 intel_reg_dumper \
38 intel_vga_read \
39 intel_vga_write
40
Tvrtko Ursulin4a9b70c2014-01-22 10:41:05 +000041tools_list := $(filter-out $(skip_tools_list),$(bin_PROGRAMS))
Oscar Mateo76c78c02013-11-12 11:50:45 +000042
43$(foreach item,$(tools_list),$(eval $(call add_tool,$(item))))