fix uml-2.6 (closes: #678)
[openwrt-10.03/.git] / include / kernel.mk
index b40f65f480dc9fa294c04184152014449ecb1eb0..db02ea2160e5727156d99da7e2fceeaf00b74f90 100644 (file)
@@ -1,3 +1,9 @@
+# 
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
 ifeq ($(DUMP),1)
   KERNEL:=<KERNEL>
   BOARD:=<BOARD>
@@ -22,6 +28,15 @@ LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \
        -e 's/armeb/arm/' \
 )
 
+ifneq (,$(findstring uml,$(BOARD)))
+  LINUX_KARCH:=um
+  KERNEL_CC:=$(HOSTCC)
+  KERNEL_CROSS:=
+else
+  KERNEL_CC:=$(TARGET_CC)
+  KERNEL_CROSS:=$(TARGET_CROSS)
+endif
+
 KERNEL_BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)
 LINUX_DIR := $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)