patch-2.1.51 linux/arch/ppc/Makefile

Next file: linux/arch/ppc/boot/Makefile
Previous file: linux/arch/mips/sni/setup.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.50/linux/arch/ppc/Makefile linux/arch/ppc/Makefile
@@ -12,29 +12,30 @@
 #
 # Copyright (C) 1994 by Linus Torvalds
 # Changes for PPC by Gary Thomas
-# Modified by Cort Dougan
+# Modified by Cort Dougan and Paul Mackerras
 #
 
+ifeq ($(CONFIG_PMAC),y)
+KERNELBASE	=0xc0000000
+else
+KERNELBASE	=0x90000000
+endif
+
 # PowerPC (cross) tools
-SUFFIX		= 
-AS		= as$(SUFFIX)
-ASFLAGS		= 
-LD		= ld$(SUFFIX)
-LINKFLAGS	= -T arch/ppc/ld.script -Ttext 0x90000000 
-HOSTCC		= gcc
-CC		= gcc$(SUFFIX)
+ifneq ($(shell uname -m),ppc)
+CROSS_COMPILE 	=powerpc-eabi-
+endif
+
+ASFLAGS		=
+LINKFLAGS	= -T arch/ppc/vmlinux.lds -Ttext $(KERNELBASE) -Bstatic
 CFLAGSINC	= -D__KERNEL__ -I$(TOPDIR)/include -D__powerpc__
 CFLAGS		= $(CFLAGSINC) \
-		-Wstrict-prototypes -fomit-frame-pointer \
+		-Wall -Wstrict-prototypes -Wno-uninitialized \
 		-fno-builtin \
-		-finhibit-size-directive \
-		-O2 -fsigned-char -pipe -ffixed-r2 -mstring -mmultiple -msoft-float
-# -fverbose-asm 
+		-fsigned-char \
+		-msoft-float \
+		-O2 -pipe
 CPP		= $(CC) -E $(CFLAGS)
-AR		= ar$(SUFFIX)
-RANLIB		= ranlib$(SUFFIX)
-STRIP		= strip$(SUFFIX)
-NM		= nm$(SUFFIX)
 
 ifdef CONFIG_601
 CFLAGS := $(CFLAGS) -mcpu=601 -DCPU=601
@@ -55,59 +56,38 @@
 ARCHIVES := arch/ppc/kernel/kernel.o arch/ppc/mm/mm.o arch/ppc/lib/lib.o $(ARCHIVES)
 CORE_FILES := arch/ppc/kernel/kernel.o arch/ppc/mm/mm.o arch/ppc/lib/lib.o $(CORE_FILES)
 
+ifdef CONFIG_XMON
+SUBDIRS += arch/ppc/xmon
+CORE_FILES += arch/ppc/xmon/x.o
+endif
+
+ifdef CONFIG_PMAC
+MAKEBOOT = $(MAKE) -C arch/$(ARCH)/coffboot
+else
+# PReP systems
 MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
+endif
 
 checks:
 	@$(MAKE) -C arch/$(ARCH)/kernel checks
 
-netboot: checks vmlinux
-	@$(MAKEBOOT) netboot
-
-znetboot: checks vmlinux
-	@$(MAKEBOOT) znetboot
-
-#rcpboot: checks vmlinux
-#	@$(MAKEBOOT) rcpboot
+BOOT_TARGETS = netboot znetboot zImage floppy install \
+	vmlinux.coff znetboot.initrd zImage.initrd
 
-zImage: checks vmlinux
-	@$(MAKEBOOT) zImage
+$(BOOT_TARGETS): checks vmlinux
+	@$(MAKEBOOT) $@
 
-floppy: checks vmlinux
-	@$(MAKEBOOT) floppy
-
-install: checks vmlinux
-	@$(MAKEBOOT) install
-
-vmlinux.coff : checks vmlinux
-	$(MAKE) -C arch/ppc/coffboot/ vmlinux.coff
-
-arch/ppc/kernel: dummy
-	$(MAKE) linuxsubdirs SUBDIRS=arch/ppc/kernel
-
-arch/ppc/mm: dummy
-	$(MAKE) linuxsubdirs SUBDIRS=arch/ppc/mm
-
-arch/ppc/lib: dummy
-	$(MAKE) linuxsubdirs SUBDIRS=arch/ppc/lib
-
-diffs:
-	arch/ppc/mkdiff
-
-tar:
-	arch/ppc/mktar
+tags:
+	etags */*.c include/{asm,linux}/*.h arch/ppc/kernel/*.{c,h}
 
 archclean:
-	rm -f arch/ppc/kernel/mk_defs arch/ppc/kernel/ppc_defs.h arch/ppc/kernel/checks TAGS
-	rm -f `find arch/ppc/ \( -name '*.[oas]' -o -name '*~' -o -name '#*#' \) -print`
-	rm -f `find include/asm-ppc/ \( -name '*.[oas]' -o -name '*~' -o -name '#*#' \) -print`
+	rm -f arch/ppc/kernel/mk_defs arch/ppc/kernel/ppc_defs.h
+	rm -f arch/ppc/kernel/checks
+	find arch/ppc/ -name '*.o' -exec /bin/rm -f '{}' \;
+	find arch/ppc/ -name '*~' -exec /bin/rm -f '{}' \;
+	find arch/ppc/ -name '*.a' -exec /bin/rm -f '{}' \;
 	@$(MAKEBOOT) clean
 
 archdep:
-	$(MAKE) -C arch/ppc/boot fastdep
-	$(MAKE) -C arch/ppc/kernel fastdep
-	$(MAKE) -C arch/ppc/mm fastdep
-	$(MAKE) -C arch/ppc/lib fastdep
-
-tags :
-	etags arch/ppc/*/*.c arch/ppc/*/*.S include/asm/* */*.c 
+	$(MAKEBOOT) fastdep
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov