Merge tag 'v3.10.72' 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_block.o \
11                 gator_events_irq.o \
12                 gator_events_meminfo.o \
13                 gator_events_mmapped.o \
14                 gator_events_net.o \
15                 gator_events_perf_pmu.o \
16                 gator_events_sched.o \
17
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_MIDGARD)
22     CONFIG_GATOR_MALI_4XXMP := n
23     CONFIG_GATOR_MALI_MIDGARD := y
24   else
25     CONFIG_GATOR_MALI_4XXMP := y
26     CONFIG_GATOR_MALI_MIDGARD := n
27   endif
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)
31   endif
32 endif
33
34 ifeq ($(CONFIG_GATOR_WITH_MALI_SUPPORT),y)
35   ifeq ($(CONFIG_GATOR_MALI_MIDGARD),y)
36     gator-y +=  gator_events_mali_midgard.o \
37                 gator_events_mali_midgard_hw.o
38     include $(src)/mali_midgard.mk
39   else
40     gator-y +=  gator_events_mali_4xx.o
41   endif
42   gator-y +=    gator_events_mali_common.o
43
44   ifneq ($(CONFIG_GATOR_MALI_PATH),)
45     ccflags-y += -I$(CONFIG_GATOR_MALI_PATH)
46   endif
47   ccflags-$(CONFIG_GATOR_MALI_4XXMP) += -DMALI_SUPPORT=MALI_4xx
48   ccflags-$(CONFIG_GATOR_MALI_MIDGARD) += -DMALI_SUPPORT=MALI_MIDGARD
49 endif
50
51 # GATOR_TEST controls whether to include (=1) or exclude (=0) test code.
52 GATOR_TEST ?= 0
53 EXTRA_CFLAGS += -DGATOR_TEST=$(GATOR_TEST)
54
55 # Should the original or new block_rq_complete API be used?
56 OLD_BLOCK_RQ_COMPLETE := $(shell grep -A3 block_rq_complete $(srctree)/include/trace/events/block.h | grep nr_bytes -q; echo $$?)
57 EXTRA_CFLAGS += -DOLD_BLOCK_RQ_COMPLETE=$(OLD_BLOCK_RQ_COMPLETE)
58
59 gator-$(CONFIG_ARM) +=  gator_events_armv6.o \
60                         gator_events_armv7.o \
61                         gator_events_l2c-310.o \
62                         gator_events_scorpion.o
63
64 gator-$(CONFIG_ARM64) +=
65
66 else
67
68 all:
69         @echo
70         @echo "usage:"
71         @echo "      make -C <kernel_build_dir> M=\`pwd\` ARCH=arm CROSS_COMPILE=<...> modules"
72         @echo
73         $(error)
74
75 clean:
76         rm -f *.o .*.cmd modules.order Module.symvers gator.ko gator.mod.c
77         rm -rf .tmp_versions
78
79 endif