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_power.o \
15 gator_events_perf_pmu.o
17 gator-y += gator_events_mmaped.o
19 ifneq ($(GATOR_WITH_MALI_SUPPORT),)
20 ifeq ($(GATOR_WITH_MALI_SUPPORT),MALI_T6xx)
21 gator-y += gator_events_mali_t6xx.o
22 else
23 gator-y += gator_events_mali.o
24 endif
25 EXTRA_CFLAGS += -DMALI_SUPPORT=$(GATOR_WITH_MALI_SUPPORT)
26 endif
28 gator-$(CONFIG_ARM) += gator_events_armv6.o \
29 gator_events_armv7.o \
30 gator_events_l2c-310.o \
31 gator_events_scorpion.o
33 $(obj)/gator_main.o: gator_events.h
35 clean-files := gator_events.h
37 chk_events.h = :
38 quiet_chk_events.h = echo ' CHK $@'
39 silent_chk_events.h = :
40 gator_events.h: FORCE
41 @$($(quiet)chk_events.h)
42 $(Q)cd $(obj) ; $(CONFIG_SHELL) $(obj)/gator_events.sh $@
44 else
46 all:
47 @echo
48 @echo "usage:"
49 @echo " make -C <kernel_build_dir> M=\`pwd\` ARCH=arm CROSS_COMPILE=<...> modules"
50 @echo
51 $(error)
53 clean:
54 rm -f *.o .*.cmd gator_events.h modules.order Module.symvers gator.ko gator.mod.c
56 endif