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 \
11 gator_events_sched.o \
13 gator_events_block.o \
14 gator_events_meminfo.o \
15 gator_events_perf_pmu.o \
16 gator_events_mmapped.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_T6xx)
22 CONFIG_GATOR_MALI_4XXMP := n
23 CONFIG_GATOR_MALI_T6XX := y
25 CONFIG_GATOR_MALI_4XXMP := y
26 CONFIG_GATOR_MALI_T6XX := 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_T6XX),y)
36 gator-y += gator_events_mali_t6xx.o \
37 gator_events_mali_t6xx_hw.o
38 include $(src)/mali_t6xx.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_T6XX) += -DMALI_SUPPORT=MALI_T6xx
51 # GATOR_TEST controls whether to include (=1) or exclude (=0) test code.
53 EXTRA_CFLAGS += -DGATOR_TEST=$(GATOR_TEST)
55 gator-$(CONFIG_ARM) += gator_events_armv6.o \
56 gator_events_armv7.o \
57 gator_events_ccn-504.o \
58 gator_events_l2c-310.o \
59 gator_events_scorpion.o
61 gator-$(CONFIG_ARM64) += gator_events_ccn-504.o
68 @echo " make -C <kernel_build_dir> M=\`pwd\` ARCH=arm CROSS_COMPILE=<...> modules"
73 rm -f *.o .*.cmd modules.order Module.symvers gator.ko gator.mod.c