aboutsummaryrefslogtreecommitdiff
path: root/driver/Makefile
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),)
# Uncomment the following line to enable kernel stack unwinding within gator, or update gator_backtrace.c
# EXTRA_CFLAGS += -DGATOR_KERNEL_STACK_UNWINDING
-obj-m := gator.o
+CONFIG_GATOR ?= m
+obj-$(CONFIG_GATOR) := gator.o
gator-y := gator_main.o \
gator_events_irq.o \
@@ -11,23 +12,40 @@ gator-y := gator_main.o \
gator_events_net.o \
gator_events_block.o \
gator_events_meminfo.o \
- gator_events_perf_pmu.o
-
-gator-y += gator_events_mmaped.o
+ gator_events_perf_pmu.o \
+ gator_events_mmapped.o \
+# Convert the old GATOR_WITH_MALI_SUPPORT to the new kernel flags
ifneq ($(GATOR_WITH_MALI_SUPPORT),)
-ifeq ($(GATOR_WITH_MALI_SUPPORT),MALI_T6xx)
-gator-y += gator_events_mali_t6xx.o \
- gator_events_mali_t6xx_hw.o
-include $(M)/mali_t6xx.mk
-else
-gator-y += gator_events_mali_4xx.o
-endif
-gator-y += gator_events_mali_common.o
-EXTRA_CFLAGS += -DMALI_SUPPORT=$(GATOR_WITH_MALI_SUPPORT)
-ifneq ($(GATOR_MALI_INTERFACE_STYLE),)
-EXTRA_CFLAGS += -DGATOR_MALI_INTERFACE_STYLE=$(GATOR_MALI_INTERFACE_STYLE)
+ CONFIG_GATOR_WITH_MALI_SUPPORT := y
+ ifeq ($(GATOR_WITH_MALI_SUPPORT),MALI_T6xx)
+ CONFIG_GATOR_MALI_4XXMP := n
+ CONFIG_GATOR_MALI_T6XX := y
+ else
+ CONFIG_GATOR_MALI_4XXMP := y
+ CONFIG_GATOR_MALI_T6XX := n
+ endif
+ EXTRA_CFLAGS += -DMALI_SUPPORT=$(GATOR_WITH_MALI_SUPPORT)
+ ifneq ($(GATOR_MALI_INTERFACE_STYLE),)
+ EXTRA_CFLAGS += -DGATOR_MALI_INTERFACE_STYLE=$(GATOR_MALI_INTERFACE_STYLE)
+ endif
endif
+
+ifeq ($(CONFIG_GATOR_WITH_MALI_SUPPORT),y)
+ ifeq ($(CONFIG_GATOR_MALI_T6XX),y)
+ gator-y += gator_events_mali_t6xx.o \
+ gator_events_mali_t6xx_hw.o
+ include $(src)/mali_t6xx.mk
+ else
+ gator-y += gator_events_mali_4xx.o
+ endif
+ gator-y += gator_events_mali_common.o
+
+ ifneq ($(CONFIG_GATOR_MALI_PATH),)
+ ccflags-y += -I$(CONFIG_GATOR_MALI_PATH)
+ endif
+ ccflags-$(CONFIG_GATOR_MALI_4XXMP) += -DMALI_SUPPORT=MALI_4xx
+ ccflags-$(CONFIG_GATOR_MALI_T6XX) += -DMALI_SUPPORT=MALI_T6xx
endif
# GATOR_TEST controls whether to include (=1) or exclude (=0) test code.
@@ -42,17 +60,6 @@ gator-$(CONFIG_ARM) += gator_events_armv6.o \
gator-$(CONFIG_ARM64) += gator_events_ccn-504.o
-$(obj)/gator_main.o: gator_events.h
-
-clean-files := gator_events.h
-
- chk_events.h = :
- quiet_chk_events.h = echo ' CHK $@'
-silent_chk_events.h = :
-gator_events.h: FORCE
- @$($(quiet)chk_events.h)
- $(Q)cd $(obj) ; $(CONFIG_SHELL) $(obj)/gator_events.sh $@
-
else
all:
@@ -63,7 +70,7 @@ all:
$(error)
clean:
- rm -f *.o .*.cmd gator_events.h modules.order Module.symvers gator.ko gator.mod.c
+ rm -f *.o .*.cmd modules.order Module.symvers gator.ko gator.mod.c
rm -rf .tmp_versions
endif