diff options
Diffstat (limited to 'driver/Makefile')
-rw-r--r-- | driver/Makefile | 61 |
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 | ||
6 | obj-m := gator.o | 6 | CONFIG_GATOR ?= m |
7 | obj-$(CONFIG_GATOR) := gator.o | ||
7 | 8 | ||
8 | gator-y := gator_main.o \ | 9 | gator-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 \ | |
16 | gator-y += gator_events_mmaped.o | ||
17 | 17 | ||
18 | # Convert the old GATOR_WITH_MALI_SUPPORT to the new kernel flags | ||
18 | ifneq ($(GATOR_WITH_MALI_SUPPORT),) | 19 | ifneq ($(GATOR_WITH_MALI_SUPPORT),) |
19 | ifeq ($(GATOR_WITH_MALI_SUPPORT),MALI_T6xx) | 20 | CONFIG_GATOR_WITH_MALI_SUPPORT := y |
20 | gator-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 |
22 | include $(M)/mali_t6xx.mk | 23 | CONFIG_GATOR_MALI_T6XX := y |
23 | else | 24 | else |
24 | gator-y += gator_events_mali_4xx.o | 25 | CONFIG_GATOR_MALI_4XXMP := y |
25 | endif | 26 | CONFIG_GATOR_MALI_T6XX := n |
26 | gator-y += gator_events_mali_common.o | 27 | endif |
27 | EXTRA_CFLAGS += -DMALI_SUPPORT=$(GATOR_WITH_MALI_SUPPORT) | 28 | EXTRA_CFLAGS += -DMALI_SUPPORT=$(GATOR_WITH_MALI_SUPPORT) |
28 | ifneq ($(GATOR_MALI_INTERFACE_STYLE),) | 29 | ifneq ($(GATOR_MALI_INTERFACE_STYLE),) |
29 | EXTRA_CFLAGS += -DGATOR_MALI_INTERFACE_STYLE=$(GATOR_MALI_INTERFACE_STYLE) | 30 | EXTRA_CFLAGS += -DGATOR_MALI_INTERFACE_STYLE=$(GATOR_MALI_INTERFACE_STYLE) |
31 | endif | ||
30 | endif | 32 | endif |
33 | |||
34 | ifeq ($(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 | ||
31 | endif | 49 | endif |
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 | ||
43 | gator-$(CONFIG_ARM64) += gator_events_ccn-504.o | 61 | gator-$(CONFIG_ARM64) += gator_events_ccn-504.o |
44 | 62 | ||
45 | $(obj)/gator_main.o: gator_events.h | ||
46 | |||
47 | clean-files := gator_events.h | ||
48 | |||
49 | chk_events.h = : | ||
50 | quiet_chk_events.h = echo ' CHK $@' | ||
51 | silent_chk_events.h = : | ||
52 | gator_events.h: FORCE | ||
53 | @$($(quiet)chk_events.h) | ||
54 | $(Q)cd $(obj) ; $(CONFIG_SHELL) $(obj)/gator_events.sh $@ | ||
55 | |||
56 | else | 63 | else |
57 | 64 | ||
58 | all: | 65 | all: |
@@ -63,7 +70,7 @@ all: | |||
63 | $(error) | 70 | $(error) |
64 | 71 | ||
65 | clean: | 72 | clean: |
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 | ||
69 | endif | 76 | endif |