diff options
author | Al Viro <viro@parcelfarce.linux.theplanet.co.uk> | 2005-05-05 16:15:29 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-05 16:36:36 -0700 |
commit | fd7aab9c1a4705ed45fe01a7ff108ce9823b0830 (patch) | |
tree | 5c4442c529709c915d1f75d96b65c23ceb34790b /arch | |
parent | 04fe392378c818fb60bd817495ecb266d2cebe68 (diff) |
[PATCH] uml: finish cross-build support
O=... builds support. Very easy, actually.
Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/um/Makefile | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/um/Makefile b/arch/um/Makefile index 642c75efcf0..e1be293befd 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -44,6 +44,11 @@ ifneq ($(MAKEFILES-INCL),) endif ARCH_INCLUDE := -I$(ARCH_DIR)/include +ifneq ($(KBUILD_SRC),) +ARCH_INCLUDE += -I$(ARCH_DIR)/include2 +ARCH_INCLUDE += -I$(srctree)/$(ARCH_DIR)/include +MRPROPER_DIRS += $(ARCH_DIR)/include2 +endif SYS_DIR := $(ARCH_DIR)/include/sysdep-$(SUBARCH) include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH) @@ -94,7 +99,12 @@ define archhelp echo ' find in the kernel root.' endef +ifneq ($(KBUILD_SRC),) +$(shell mkdir -p $(ARCH_DIR) && ln -fsn $(srctree)/$(ARCH_DIR)/Kconfig_$(SUBARCH) $(ARCH_DIR)/Kconfig_arch) +CLEAN_FILES += $(ARCH_DIR)/Kconfig_arch +else $(shell cd $(ARCH_DIR) && ln -sf Kconfig_$(SUBARCH) Kconfig_arch) +endif prepare: $(ARCH_SYMLINKS) $(SYS_HEADERS) $(GEN_HEADERS) @@ -143,20 +153,40 @@ archclean: $(SYMLINK_HEADERS): @echo ' SYMLINK $@' +ifneq ($(KBUILD_SRC),) + ln -fsn $(srctree)/include/asm-um/$(basename $(notdir $@))-$(SUBARCH)$(suffix $@) $@ +else $(Q)cd $(TOPDIR)/$(dir $@) ; \ ln -sf $(basename $(notdir $@))-$(SUBARCH)$(suffix $@) $(notdir $@) +endif include/asm-um/arch: @echo ' SYMLINK $@' +ifneq ($(KBUILD_SRC),) + $(Q)mkdir -p include/asm-um + $(Q)ln -fsn $(srctree)/include/asm-$(SUBARCH) include/asm-um/arch +else $(Q)cd $(TOPDIR)/include/asm-um && ln -sf ../asm-$(SUBARCH) arch +endif $(ARCH_DIR)/include/sysdep: @echo ' SYMLINK $@' +ifneq ($(KBUILD_SRC),) + $(Q)mkdir -p $(ARCH_DIR)/include + $(Q)mkdir -p $(ARCH_DIR)/include2 + $(Q)ln -fsn sysdep-$(SUBARCH) $(ARCH_DIR)/include/sysdep + $(Q)ln -fsn $(srctree)/$(ARCH_DIR)/include/sysdep-$(SUBARCH) $(ARCH_DIR)/include2/sysdep +else $(Q)cd $(ARCH_DIR)/include && ln -sf sysdep-$(SUBARCH) sysdep +endif $(ARCH_DIR)/os: @echo ' SYMLINK $@' +ifneq ($(KBUILD_SRC),) + $(Q)ln -fsn $(srctree)/$(ARCH_DIR)/os-$(OS) $(ARCH_DIR)/os +else $(Q)cd $(ARCH_DIR) && ln -sf os-$(OS) os +endif # Generated files define filechk_umlconfig |