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
17 gator-y += gator_events_mmaped.o
19 ifeq ($(CONFIG_GATOR_WITH_MALI_SUPPORT),y)
21 ifeq ($(CONFIG_GATOR_MALI_T6XX),y)
22 gator-y += gator_events_mali_t6xx.o \
23 gator_events_mali_t6xx_hw.o
24 include $(M)/mali_t6xx.mk
26 gator-y += gator_events_mali_4xx.o
28 gator-y += gator_events_mali_common.o
30 ccflags-y += -I$(CONFIG_GATOR_MALI_PATH)
31 ccflags-$(CONFIG_GATOR_MALI_400MP) += -DMALI_SUPPORT=MALI_400
32 ccflags-$(CONFIG_GATOR_MALI_T6XX) += -DMALI_SUPPORT=MALI_T6xx
35 # GATOR_TEST controls whether to include (=1) or exclude (=0) test code.
37 EXTRA_CFLAGS += -DGATOR_TEST=$(GATOR_TEST)
39 gator-$(CONFIG_ARM) += gator_events_armv6.o \
40 gator_events_armv7.o \
41 gator_events_ccn-504.o \
42 gator_events_l2c-310.o \
43 gator_events_scorpion.o
45 gator-$(CONFIG_ARM64) += gator_events_ccn-504.o
47 $(obj)/gator_main.o: $(obj)/gator_events.h
49 clean-files := gator_events.h
51 # Note, in the recipe below we use "cd $(srctree) && cd $(src)" rather than
52 # "cd $(srctree)/$(src)" because under DKMS $(src) is an absolute path, and we
53 # can't just use $(src) because for normal kernel builds this is relative to
57 quiet_chk_events.h = echo ' CHK $@'
58 silent_chk_events.h = :
59 $(obj)/gator_events.h: FORCE
60 @$($(quiet)chk_events.h)
61 $(Q)cd $(srctree) && cd $(src) ; $(CONFIG_SHELL) gator_events.sh $(abspath $@)
68 @echo " make -C <kernel_build_dir> M=\`pwd\` ARCH=arm CROSS_COMPILE=<...> modules"
73 rm -f *.o .*.cmd gator_events.h modules.order Module.symvers gator.ko gator.mod.c