summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'driver/Makefile')
-rw-r--r--driver/Makefile61
1 files changed, 34 insertions, 27 deletions
diff --git a/driver/Makefile b/driver/Makefile
index 0d4ca68..3dc9d05 100644
--- a/driver/Makefile
+++ b/driver/Makefile
@@ -3,7 +3,8 @@ ifneq ($(KERNELRELEASE),)
3# Uncomment the following line to enable kernel stack unwinding within gator, or update gator_backtrace.c 3# Uncomment the following line to enable kernel stack unwinding within gator, or update gator_backtrace.c
4# EXTRA_CFLAGS += -DGATOR_KERNEL_STACK_UNWINDING 4# EXTRA_CFLAGS += -DGATOR_KERNEL_STACK_UNWINDING
5 5
6obj-m := gator.o 6CONFIG_GATOR ?= m
7obj-$(CONFIG_GATOR) := gator.o
7 8
8gator-y := gator_main.o \ 9gator-y := gator_main.o \
9 gator_events_irq.o \ 10 gator_events_irq.o \
@@ -11,23 +12,40 @@ gator-y := gator_main.o \
11 gator_events_net.o \ 12 gator_events_net.o \
12 gator_events_block.o \ 13 gator_events_block.o \
13 gator_events_meminfo.o \ 14 gator_events_meminfo.o \
14 gator_events_perf_pmu.o 15 gator_events_perf_pmu.o \
15 16 gator_events_mmapped.o \
16gator-y += gator_events_mmaped.o
17 17
18# Convert the old GATOR_WITH_MALI_SUPPORT to the new kernel flags
18ifneq ($(GATOR_WITH_MALI_SUPPORT),) 19ifneq ($(GATOR_WITH_MALI_SUPPORT),)
19ifeq ($(GATOR_WITH_MALI_SUPPORT),MALI_T6xx) 20 CONFIG_GATOR_WITH_MALI_SUPPORT := y
20gator-y += gator_events_mali_t6xx.o \ 21 ifeq ($(GATOR_WITH_MALI_SUPPORT),MALI_T6xx)
21 gator_events_mali_t6xx_hw.o 22 CONFIG_GATOR_MALI_4XXMP := n
22include $(M)/mali_t6xx.mk 23 CONFIG_GATOR_MALI_T6XX := y
23else 24 else
24gator-y += gator_events_mali_4xx.o 25 CONFIG_GATOR_MALI_4XXMP := y
25endif 26 CONFIG_GATOR_MALI_T6XX := n
26gator-y += gator_events_mali_common.o 27 endif
27EXTRA_CFLAGS += -DMALI_SUPPORT=$(GATOR_WITH_MALI_SUPPORT) 28 EXTRA_CFLAGS += -DMALI_SUPPORT=$(GATOR_WITH_MALI_SUPPORT)
28ifneq ($(GATOR_MALI_INTERFACE_STYLE),) 29 ifneq ($(GATOR_MALI_INTERFACE_STYLE),)
29EXTRA_CFLAGS += -DGATOR_MALI_INTERFACE_STYLE=$(GATOR_MALI_INTERFACE_STYLE) 30 EXTRA_CFLAGS += -DGATOR_MALI_INTERFACE_STYLE=$(GATOR_MALI_INTERFACE_STYLE)
31 endif
30endif 32endif
33
34ifeq ($(CONFIG_GATOR_WITH_MALI_SUPPORT),y)
35 ifeq ($(CONFIG_GATOR_MALI_T6XX),y)
36 gator-y += gator_events_mali_t6xx.o \
37 gator_events_mali_t6xx_hw.o
38 include $(src)/mali_t6xx.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_T6XX) += -DMALI_SUPPORT=MALI_T6xx
31endif 49endif
32 50
33# GATOR_TEST controls whether to include (=1) or exclude (=0) test code. 51# GATOR_TEST controls whether to include (=1) or exclude (=0) test code.
@@ -42,17 +60,6 @@ gator-$(CONFIG_ARM) += gator_events_armv6.o \
42 60
43gator-$(CONFIG_ARM64) += gator_events_ccn-504.o 61gator-$(CONFIG_ARM64) += gator_events_ccn-504.o
44 62
45$(obj)/gator_main.o: gator_events.h
46
47clean-files := gator_events.h
48
49 chk_events.h = :
50 quiet_chk_events.h = echo ' CHK $@'
51silent_chk_events.h = :
52gator_events.h: FORCE
53 @$($(quiet)chk_events.h)
54 $(Q)cd $(obj) ; $(CONFIG_SHELL) $(obj)/gator_events.sh $@
55
56else 63else
57 64
58all: 65all:
@@ -63,7 +70,7 @@ all:
63 $(error) 70 $(error)
64 71
65clean: 72clean:
66 rm -f *.o .*.cmd gator_events.h modules.order Module.symvers gator.ko gator.mod.c 73 rm -f *.o .*.cmd modules.order Module.symvers gator.ko gator.mod.c
67 rm -rf .tmp_versions 74 rm -rf .tmp_versions
68 75
69endif 76endif