kernel: don't build for TARGET_NO_KERNEL targets

Change-Id: I14ad45c06922c0775e0574ddbcfcdc33353af465
diff --git a/build/tasks/kernel.mk b/build/tasks/kernel.mk
index 438dcaa..426af62 100644
--- a/build/tasks/kernel.mk
+++ b/build/tasks/kernel.mk
@@ -70,6 +70,7 @@
 #   NEED_KERNEL_MODULE_ROOT            = Optional, if true, install kernel
 #                                          modules in root instead of system
 
+ifneq ($(TARGET_NO_KERNEL),true)
 
 TARGET_AUTO_KDIR := $(shell echo $(TARGET_DEVICE_DIR) | sed -e 's/^device/kernel/g')
 
@@ -408,3 +409,5 @@
 
 .PHONY: kernel
 kernel: $(INSTALLED_KERNEL_TARGET)
+
+endif # TARGET_NO_KERNEL