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
6 obj-m := gator.o
8 gator-y := gator_main.o \
9 gator_events_irq.o \
10 gator_events_sched.o \
11 gator_events_net.o \
12 gator_events_block.o \
13 gator_events_meminfo.o \
14 gator_events_perf_pmu.o
16 gator-y += gator_events_mmaped.o
18 ifneq ($(GATOR_WITH_MALI_SUPPORT),)
19 ifeq ($(GATOR_WITH_MALI_SUPPORT),MALI_T6xx)
20 gator-y += gator_events_mali_t6xx.o \
21 gator_events_mali_t6xx_hw.o
22 include $(M)/mali_t6xx.mk
23 else
24 gator-y += gator_events_mali_400.o
25 endif
26 gator-y += gator_events_mali_common.o
27 EXTRA_CFLAGS += -DMALI_SUPPORT=$(GATOR_WITH_MALI_SUPPORT)
28 endif
30 gator-$(CONFIG_ARM) += gator_events_armv6.o \
31 gator_events_armv7.o \
32 gator_events_l2c-310.o \
33 gator_events_scorpion.o
35 $(obj)/gator_main.o: gator_events.h
37 clean-files := gator_events.h
39 chk_events.h = :
40 quiet_chk_events.h = echo ' CHK $@'
41 silent_chk_events.h = :
42 gator_events.h: FORCE
43 @$($(quiet)chk_events.h)
44 $(Q)cd $(obj) ; $(CONFIG_SHELL) $(obj)/gator_events.sh $@
46 else
48 all:
49 @echo
50 @echo "usage:"
51 @echo " make -C <kernel_build_dir> M=\`pwd\` ARCH=arm CROSS_COMPILE=<...> modules"
52 @echo
53 $(error)
55 clean:
56 rm -f *.o .*.cmd gator_events.h modules.order Module.symvers gator.ko gator.mod.c
58 endif