Merge tag 'v3.10.19' into linux-linaro-lsk
[firefly-linux-kernel-4.4.55.git] / drivers / gator / Makefile
1 ifneq ($(KERNELRELEASE),)
2
3 # Uncomment the following line to enable kernel stack unwinding within gator, or update gator_backtrace.c
4 # EXTRA_CFLAGS +=       -DGATOR_KERNEL_STACK_UNWINDING
5
6 CONFIG_GATOR ?= m
7 obj-$(CONFIG_GATOR) := gator.o
8
9 gator-y :=      gator_main.o \
10                 gator_events_irq.o \
11                 gator_events_sched.o \
12                 gator_events_net.o \
13                 gator_events_block.o \
14                 gator_events_meminfo.o \
15                 gator_events_perf_pmu.o
16
17 gator-y +=      gator_events_mmaped.o
18
19 ifeq ($(CONFIG_GATOR_WITH_MALI_SUPPORT),y)
20
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
25 else
26 gator-y +=      gator_events_mali_4xx.o
27 endif
28 gator-y +=      gator_events_mali_common.o
29
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
33 endif
34
35 # GATOR_TEST controls whether to include (=1) or exclude (=0) test code. 
36 GATOR_TEST ?= 0
37 EXTRA_CFLAGS += -DGATOR_TEST=$(GATOR_TEST)
38
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
44
45 gator-$(CONFIG_ARM64) +=        gator_events_ccn-504.o
46
47 $(obj)/gator_main.o: $(obj)/gator_events.h
48
49 clean-files := gator_events.h
50
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
54 # $(srctree)
55
56        chk_events.h = :
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 $@)
62
63 else
64
65 all:
66         @echo
67         @echo "usage:"
68         @echo "      make -C <kernel_build_dir> M=\`pwd\` ARCH=arm CROSS_COMPILE=<...> modules"
69         @echo
70         $(error)
71
72 clean:
73         rm -f *.o .*.cmd gator_events.h modules.order Module.symvers gator.ko gator.mod.c
74         rm -rf .tmp_versions
75
76 endif