diff options
author | Jon Medhurst <tixy@linaro.org> | 2012-04-10 18:41:18 +0100 |
---|---|---|
committer | Zach Pfeffer <zach.pfeffer@linaro.org> | 2012-04-10 13:35:04 -0500 |
commit | 43519dca0af26a2810bbbd6c389928979d9d896c (patch) | |
tree | 94dc47adcdb79157596de62a8b64831caf756a98 | |
parent | e29875dce1ecf114e7e4b8ae601a1ffa4d87b310 (diff) |
tasks/kernel.mk: Conditionally build out-of-tree gator module
For the linux-linaro tree the Gator module will be in the kernel
tree. Therefore make the rule for building the out-of-tree module
conditional on the presence of the external source code.
This change doesn't attempt to handle in-tree gator modules built with
TARGET_GATOR_WITH_MALI_SUPPORT. We will leave that until we have such a
case as the linux-linaro single tree may lead to some consolidation of
Mali drivers.
Change-Id: I03facdc6cae768409887f9a6cb46b28e2ae96fec
Signed-off-by: Jon Medhurst <tixy@linaro.org>
-rw-r--r-- | tasks/kernel.mk | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tasks/kernel.mk b/tasks/kernel.mk index 23a0f50..3413e22 100644 --- a/tasks/kernel.mk +++ b/tasks/kernel.mk @@ -49,6 +49,7 @@ GATOR_EXTRA_CFLAGS += -DMALI_SUPPORT=$(TARGET_GATOR_WITH_MALI_SUPPORT) -I$(KERNE GATOR_EXTRA_MAKE_ARGS += GATOR_WITH_MALI_SUPPORT=$(TARGET_GATOR_WITH_MALI_SUPPORT) endif +ifneq ($(realpath $(TOP)/external/gator/driver),) gator_driver: android_kernel_modules $(INSTALLED_KERNEL_TARGET) $(ACP) cd $(TOP)/external/gator/driver &&\ if [ -e $(KERNEL_TOOLS_PREFIX)ld.bfd ]; then LD=$(KERNEL_TOOLS_PREFIX)ld.bfd; else LD=$(KERNEL_TOOLS_PREFIX)ld; fi && \ @@ -56,6 +57,10 @@ gator_driver: android_kernel_modules $(INSTALLED_KERNEL_TARGET) $(ACP) $(MAKE) O=$(KERNEL_OUT) ARCH=arm CROSS_COMPILE=$(KERNEL_TOOLS_PREFIX) LD=$$LD EXTRA_CFLAGS="$(EXTRA_CFLAGS) -fno-pic $(GATOR_EXTRA_CFLAGS)" KCFLAGS="$(TARGET_EXTRA_CFLAGS) -fno-pic $(LOCAL_CFLAGS)" $(GATOR_EXTRA_MAKE_ARGS) -C $(KERNEL_PATH) M=`pwd` modules mkdir -p $(TARGET_OUT)/modules find $(TOP)/external/gator/driver/. -name "*.ko" -exec $(ACP) -fpt {} $(TARGET_OUT)/modules/ \; +else
+gator_driver: +endif + else gator_driver: endif |