BLT -> MOD : CONFIG_IOSCHED_AS
[linux-2.6.git] / arch / parisc / Makefile
index 201156c..9b7e424 100644 (file)
 # Modified for PA-RISC Linux by Paul Lahaie, Alex deVries, 
 # Mike Shaver, Helge Deller and Martin K. Petersen
 #
-NM             = sh arch/parisc/nm
-ifdef CONFIG_PARISC64
-CROSS_COMPILE  := hppa64-linux-
+NM             = sh $(srctree)/arch/parisc/nm
+CHECKFLAGS     += -D__hppa__=1
+
+ifdef CONFIG_64BIT
+CROSS_COMPILE  := $(shell if [ -x /usr/bin/hppa64-linux-gnu-gcc ]; then \
+                       echo hppa64-linux-gnu-; else echo hppa64-linux-; fi)
 UTS_MACHINE    := parisc64
+CHECKFLAGS     += -D__LP64__=1 -m64
 else
 MACHINE := $(subst 64,,$(shell uname -m))
 ifneq ($(MACHINE),parisc)
@@ -31,13 +35,23 @@ FINAL_LD=$(CROSS_COMPILE)ld --warn-common --warn-section-align
 
 OBJCOPY_FLAGS =-O binary -R .note -R .comment -S
 
+GCC_VERSION     := $(call cc-version)
+ifneq ($(shell if [ -z $(GCC_VERSION) ] ; then echo "bad"; fi ;),)
+$(error Sorry, couldn't find ($(cc-version)).)
+endif
+ifneq ($(shell if [ $(GCC_VERSION) -lt 0303 ] ; then echo "bad"; fi ;),)
+$(error Sorry, your compiler is too old ($(GCC_VERSION)).  GCC v3.3 or above is required.)
+endif
+
 cflags-y       := -pipe
 
 # These flags should be implied by an hppa-linux configuration, but they
 # are not in gcc 3.2.
 cflags-y       += -mno-space-regs -mfast-indirect-calls
 
-# No fixed-point multiply
+# Currently we save and restore fpregs on all kernel entry/interruption paths.
+# If that gets optimized, we might need to disable the use of fpregs in the
+# kernel.
 cflags-y       += -mdisable-fpregs
 
 # Without this, "ld -r" results in .text sections that are too big
@@ -48,10 +62,10 @@ cflags-y    += -ffunction-sections
 cflags-$(CONFIG_PA7100)                += -march=1.1 -mschedule=7100
 cflags-$(CONFIG_PA7200)                += -march=1.1 -mschedule=7200
 cflags-$(CONFIG_PA7100LC)      += -march=1.1 -mschedule=7100LC
+cflags-$(CONFIG_PA7300LC)      += -march=1.1 -mschedule=7300
 cflags-$(CONFIG_PA8X00)                += -march=2.0 -mschedule=8000
 
 head-y                 := arch/parisc/kernel/head.o 
-head-$(CONFIG_PARISC64)        := arch/parisc/kernel/head64.o
 
 CFLAGS += $(cflags-y)
 
@@ -63,8 +77,12 @@ libs-y       += arch/parisc/lib/ `$(CC) -print-libgcc-file-name`
 
 drivers-$(CONFIG_OPROFILE)             += arch/parisc/oprofile/
 
+PALO := $(shell if which palo; then : ; \
+       elif [ -x /sbin/palo ]; then echo /sbin/palo; \
+       fi)
+
 palo: vmlinux
-       @if [ $$(palo -f /dev/null >/dev/null 2>&1 ; echo $$?) != 2 ]; then \
+       @if [ -x $PALO ]; then \
                echo 'ERROR: Please install palo first (apt-get install palo)';\
                echo 'or build it from source and install it somewhere in your $$PATH';\
                false; \
@@ -76,7 +94,7 @@ palo: vmlinux
                echo 'WARNING: the "lifimage" file is now placed in this directory by default!'; \
                false; \
        fi
-       palo -f ./palo.conf
+       $(PALO) -f ./palo.conf
 
 oldpalo: vmlinux
        export TOPDIR=`pwd`; \
@@ -85,18 +103,20 @@ oldpalo: vmlinux
 # Shorthands for known targets not supported by parisc, use palo as default
 Image zImage bzImage: palo
 
-prepare: include/asm-parisc/offsets.h
-
-arch/parisc/kernel/asm-offsets.s: include/asm include/linux/version.h \
-                                  include/config/MARKER
+kernel_install: vmlinux
+       sh $(src)/arch/parisc/install.sh \
+                       $(KERNELRELEASE) $< System.map "$(INSTALL_PATH)"
 
-include/asm-parisc/offsets.h: arch/parisc/kernel/asm-offsets.s
-       $(call filechk,gen-asm-offsets)
+install: kernel_install modules_install
 
-CLEAN_FILES    += lifimage include/asm-parisc/offsets.h
+CLEAN_FILES    += lifimage
 MRPROPER_FILES += palo.conf
 
 define archhelp
        @echo  '* vmlinux       - Uncompressed kernel image (./vmlinux)'
        @echo  '  palo          - Bootable image (./lifimage)'
+       @echo  '  install       - Install kernel using'
+       @echo  '                  (your) ~/bin/installkernel or'
+       @echo  '                  (distribution) /sbin/installkernel or'
+       @echo  '                  copy to $$(INSTALL_PATH)'
 endef