1 ifneq ($(KERNELRELEASE),)
3 # Uncomment the following line to enable kernel stack unwinding within gator, or update gator_backtrace.c
4 # EXTRA_CFLAGS += -DGATOR_KERNEL_STACK_UNWINDING
7 obj-$(CONFIG_GATOR) := gator.o
9 gator-y := gator_main.o \
10 gator_events_block.o \
12 gator_events_meminfo.o \
13 gator_events_mmapped.o \
15 gator_events_perf_pmu.o \
16 gator_events_sched.o \
18 # Convert the old GATOR_WITH_MALI_SUPPORT to the new kernel flags
19 ifneq ($(GATOR_WITH_MALI_SUPPORT),)
20 CONFIG_GATOR_WITH_MALI_SUPPORT := y
21 ifeq ($(GATOR_WITH_MALI_SUPPORT),MALI_MIDGARD)
22 CONFIG_GATOR_MALI_4XXMP := n
23 CONFIG_GATOR_MALI_MIDGARD := y
25 CONFIG_GATOR_MALI_4XXMP := y
26 CONFIG_GATOR_MALI_MIDGARD := n
28 EXTRA_CFLAGS += -DMALI_SUPPORT=$(GATOR_WITH_MALI_SUPPORT)
29 ifneq ($(GATOR_MALI_INTERFACE_STYLE),)
30 EXTRA_CFLAGS += -DGATOR_MALI_INTERFACE_STYLE=$(GATOR_MALI_INTERFACE_STYLE)
34 ifeq ($(CONFIG_GATOR_WITH_MALI_SUPPORT),y)
35 ifeq ($(CONFIG_GATOR_MALI_MIDGARD),y)
36 gator-y += gator_events_mali_midgard.o \
37 gator_events_mali_midgard_hw.o
38 include $(src)/mali_midgard.mk
40 gator-y += gator_events_mali_4xx.o
42 gator-y += gator_events_mali_common.o
44 ifneq ($(CONFIG_GATOR_MALI_PATH),)
45 ccflags-y += -I$(CONFIG_GATOR_MALI_PATH)
47 ccflags-$(CONFIG_GATOR_MALI_4XXMP) += -DMALI_SUPPORT=MALI_4xx
48 ccflags-$(CONFIG_GATOR_MALI_MIDGARD) += -DMALI_SUPPORT=MALI_MIDGARD
51 # GATOR_TEST controls whether to include (=1) or exclude (=0) test code.
53 EXTRA_CFLAGS += -DGATOR_TEST=$(GATOR_TEST)
55 # Should the original or new block_rq_complete API be used?
56 OLD_BLOCK_RQ_COMPLETE := $(shell grep -A3 block_rq_complete $(srctree)/include/trace/events/block.h | grep nr_bytes -q; echo $$?)
57 EXTRA_CFLAGS += -DOLD_BLOCK_RQ_COMPLETE=$(OLD_BLOCK_RQ_COMPLETE)
59 gator-$(CONFIG_ARM) += gator_events_armv6.o \
60 gator_events_armv7.o \
61 gator_events_l2c-310.o \
62 gator_events_scorpion.o
64 gator-$(CONFIG_ARM64) +=
71 @echo " make -C <kernel_build_dir> M=\`pwd\` ARCH=arm CROSS_COMPILE=<...> modules"
76 rm -f *.o .*.cmd modules.order Module.symvers gator.ko gator.mod.c