powerpc: merge ppc signal.c and ppc64 signal32.c
[safe/jmp/linux-2.6] / arch / powerpc / Makefile
index 92751ca..a5f2eb5 100644 (file)
@@ -51,6 +51,8 @@ OLDARCH       := ppc
 SZ     := 32
 endif
 
+UTS_MACHINE := $(OLDARCH)
+
 ifeq ($(HAS_BIARCH),y)
 override AS    += -a$(SZ)
 override LD    += -m elf$(SZ)ppc
@@ -112,18 +114,16 @@ CFLAGS += $(cpu-as-y)
 # Default to the common case.
 KBUILD_DEFCONFIG := common_defconfig
 
-head-y                         := arch/powerpc/kernel/head.o
+head-y                         := arch/powerpc/kernel/head_32.o
 head-$(CONFIG_PPC64)           := arch/powerpc/kernel/head_64.o
 head-$(CONFIG_8xx)             := arch/powerpc/kernel/head_8xx.o
 head-$(CONFIG_4xx)             := arch/powerpc/kernel/head_4xx.o
 head-$(CONFIG_44x)             := arch/powerpc/kernel/head_44x.o
 head-$(CONFIG_FSL_BOOKE)       := arch/powerpc/kernel/head_fsl_booke.o
 
-ifeq ($(CONFIG_PPC32),y)
 head-$(CONFIG_6xx)             += arch/powerpc/kernel/idle_6xx.o
-head-$(CONFIG_POWER4)          += arch/powerpc/kernel/idle_power4.o
+head-$(CONFIG_PPC64)           += arch/powerpc/kernel/entry_64.o
 head-$(CONFIG_PPC_FPU)         += arch/powerpc/kernel/fpu.o
-endif
 
 core-y                         += arch/powerpc/kernel/ \
                                   arch/$(OLDARCH)/kernel/ \
@@ -131,7 +131,6 @@ core-y                              += arch/powerpc/kernel/ \
                                   arch/powerpc/lib/ \
                                   arch/powerpc/sysdev/ \
                                   arch/powerpc/platforms/
-core-$(CONFIG_PPC32)           += arch/ppc/syslib/
 core-$(CONFIG_MATH_EMULATION)  += arch/ppc/math-emu/
 core-$(CONFIG_XMON)            += arch/powerpc/xmon/
 core-$(CONFIG_APUS)            += arch/ppc/amiga/
@@ -141,21 +140,31 @@ drivers-$(CONFIG_CPM2)            += arch/ppc/8260_io/
 
 drivers-$(CONFIG_OPROFILE)     += arch/powerpc/oprofile/
 
-BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm
-
-.PHONY: $(BOOT_TARGETS)
-
-all: uImage zImage
+defaultimage-$(CONFIG_PPC32)   := uImage zImage
+defaultimage-$(CONFIG_PPC_ISERIES) := vmlinux
+defaultimage-$(CONFIG_PPC_PSERIES) := zImage
+KBUILD_IMAGE := $(defaultimage-y)
+all: $(KBUILD_IMAGE)
 
 CPPFLAGS_vmlinux.lds   := -Upowerpc
 
 # All the instructions talk about "make bzImage".
 bzImage: zImage
 
+BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm
+
+.PHONY: $(BOOT_TARGETS)
+
 boot := arch/$(OLDARCH)/boot
 
+# urk
+ifeq ($(CONFIG_PPC64),y)
 $(BOOT_TARGETS): vmlinux
-       $(Q)$(MAKE) ARCH=$(OLDARCH) $(build)=$(boot) $@
+       $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
+else
+$(BOOT_TARGETS): vmlinux
+       $(Q)$(MAKE) ARCH=ppc $(build)=$(boot) $@
+endif
 
 uImage: vmlinux
        $(Q)$(MAKE) ARCH=$(OLDARCH) $(build)=$(boot)/images $(boot)/images/$@