Merge master.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild
[sfrench/cifs-2.6.git] / arch / ppc64 / Makefile
index 731b84758331bfc5fc790554265b8bf9a4eb8557..0a23aeacba885cf80e697d9c0a6e21317af5bc10 100644 (file)
@@ -49,12 +49,14 @@ NM          := $(NM) --synthetic
 
 endif
 
-CHECKFLAGS     += -m64 -D__powerpc__
+CHECKFLAGS     += -m64 -D__powerpc__ -D__powerpc64__
 
 LDFLAGS                := -m elf64ppc
 LDFLAGS_vmlinux        := -Bstatic -e $(KERNELLOAD) -Ttext $(KERNELLOAD)
 CFLAGS         += -msoft-float -pipe -mminimal-toc -mtraceback=none \
                   -mcall-aixdesc
+# Temporary hack until we have migrated to asm-powerpc
+CPPFLAGS       += -Iinclude3
 
 GCC_VERSION     := $(call cc-version)
 GCC_BROKEN_VEC := $(shell if [ $(GCC_VERSION) -lt 0400 ] ; then echo "y"; fi ;)
@@ -87,11 +89,12 @@ drivers-$(CONFIG_OPROFILE)  += arch/ppc64/oprofile/
 
 boot := arch/ppc64/boot
 
-boottarget-$(CONFIG_PPC_PSERIES) := zImage zImage.initrd
-boottarget-$(CONFIG_PPC_MAPLE) := zImage zImage.initrd
-boottarget-$(CONFIG_PPC_ISERIES) := vmlinux.sminitrd vmlinux.initrd vmlinux.sm
-boottarget-$(CONFIG_PPC_BPA) := zImage zImage.initrd
-$(boottarget-y): vmlinux
+boottargets-$(CONFIG_PPC_PSERIES) += zImage zImage.initrd
+boottargets-$(CONFIG_PPC_PMAC) += zImage.vmode zImage.initrd.vmode
+boottargets-$(CONFIG_PPC_MAPLE) += zImage zImage.initrd
+boottargets-$(CONFIG_PPC_ISERIES) += vmlinux.sminitrd vmlinux.initrd vmlinux.sm
+boottargets-$(CONFIG_PPC_BPA) += zImage zImage.initrd
+$(boottargets-y): vmlinux
        $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
 
 bootimage-$(CONFIG_PPC_PSERIES) := $(boot)/zImage
@@ -112,20 +115,20 @@ all: $(KBUILD_IMAGE)
 
 archclean:
        $(Q)$(MAKE) $(clean)=$(boot)
+       $(Q)rm -rf include3
 
-prepare: include/asm-ppc64/offsets.h
 
-arch/ppc64/kernel/asm-offsets.s: include/asm include/linux/version.h \
-                                  include/config/MARKER
-
-include/asm-ppc64/offsets.h: arch/ppc64/kernel/asm-offsets.s
-       $(call filechk,gen-asm-offsets)
+# Temporary hack until we have migrated to asm-powerpc
+include/asm: include3/asm
+include3/asm:
+       $(Q)if [ ! -d include3 ]; then mkdir -p include3; fi;
+       $(Q)ln -fsn $(srctree)/include/asm-powerpc include3/asm
 
 define archhelp
-  echo  '* zImage       - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
-  echo  '  zImage.initrd- Compressed kernel image with initrd attached,'
-  echo  '                 sourced from arch/$(ARCH)/boot/ramdisk.image.gz'
-  echo  '                 (arch/$(ARCH)/boot/zImage.initrd)'
+  echo  '  zImage.vmode        - Compressed kernel image (arch/$(ARCH)/boot/zImage.vmode)'
+  echo  '  zImage.initrd.vmode - Compressed kernel image with initrd attached,'
+  echo  '                        sourced from arch/$(ARCH)/boot/ramdisk.image.gz'
+  echo  '                        (arch/$(ARCH)/boot/zImage.initrd.vmode)'
+  echo  '  zImage              - zImage for pSeries machines'
+  echo  '  zImage.initrd       - zImage with initrd for pSeries machines'
 endef
-
-CLEAN_FILES += include/asm-ppc64/offsets.h