vserver 1.9.5.x5
[linux-2.6.git] / arch / parisc / Makefile
1 #
2 # parisc/Makefile
3 #
4 # This file is included by the global makefile so that you can add your own
5 # architecture-specific flags and dependencies. Remember to do have actions
6 # for "archclean" and "archdep" for cleaning up and making dependencies for
7 # this architecture
8 #
9 # This file is subject to the terms and conditions of the GNU General Public
10 # License.  See the file "COPYING" in the main directory of this archive
11 # for more details.
12 #
13 # Copyright (C) 1994 by Linus Torvalds
14 # Portions Copyright (C) 1999 The Puffin Group
15 #
16 # Modified for PA-RISC Linux by Paul Lahaie, Alex deVries, 
17 # Mike Shaver, Helge Deller and Martin K. Petersen
18 #
19 NM              = sh $(srctree)/arch/parisc/nm
20 ifdef CONFIG_PARISC64
21 CROSS_COMPILE   := hppa64-linux-
22 UTS_MACHINE     := parisc64
23 else
24 MACHINE := $(subst 64,,$(shell uname -m))
25 ifneq ($(MACHINE),parisc)
26 CROSS_COMPILE   := hppa-linux-
27 endif
28 endif
29
30 FINAL_LD=$(CROSS_COMPILE)ld --warn-common --warn-section-align 
31
32 OBJCOPY_FLAGS =-O binary -R .note -R .comment -S
33
34 cflags-y        := -pipe
35
36 # These flags should be implied by an hppa-linux configuration, but they
37 # are not in gcc 3.2.
38 cflags-y        += -mno-space-regs -mfast-indirect-calls
39
40 # Currently we save and restore fpregs on all kernel entry/interruption paths.
41 # If that gets optimized, we might need to disable the use of fpregs in the
42 # kernel.
43 #cflags-y       += -mdisable-fpregs
44
45 # Without this, "ld -r" results in .text sections that are too big
46 # (> 0x40000) for branches to reach stubs.
47 cflags-y        += -ffunction-sections
48
49 # select which processor to optimise for
50 cflags-$(CONFIG_PA7100)         += -march=1.1 -mschedule=7100
51 cflags-$(CONFIG_PA7200)         += -march=1.1 -mschedule=7200
52 cflags-$(CONFIG_PA7100LC)       += -march=1.1 -mschedule=7100LC
53 cflags-$(CONFIG_PA7300LC)       += -march=1.1 -mschedule=7300
54 cflags-$(CONFIG_PA8X00)         += -march=2.0 -mschedule=8000
55
56 head-y                  := arch/parisc/kernel/head.o 
57
58 CFLAGS  += $(cflags-y)
59
60 kernel-y                        := mm/ kernel/ math-emu/ kernel/init_task.o
61 kernel-$(CONFIG_HPUX)           += hpux/
62
63 core-y  += $(addprefix arch/parisc/, $(kernel-y))
64 libs-y  += arch/parisc/lib/ `$(CC) -print-libgcc-file-name`
65
66 drivers-$(CONFIG_OPROFILE)              += arch/parisc/oprofile/
67
68 palo: vmlinux
69         @if [ $$(palo -f /dev/null >/dev/null 2>&1 ; echo $$?) != 2 ]; then \
70                 echo 'ERROR: Please install palo first (apt-get install palo)';\
71                 echo 'or build it from source and install it somewhere in your $$PATH';\
72                 false; \
73         fi
74         @if [ ! -f ./palo.conf ]; then \
75                 cp arch/parisc/defpalo.conf palo.conf; \
76                 echo 'A generic palo config file (./palo.conf) has been created for you.'; \
77                 echo 'You should check it and re-run "make palo".'; \
78                 echo 'WARNING: the "lifimage" file is now placed in this directory by default!'; \
79                 false; \
80         fi
81         palo -f ./palo.conf
82
83 oldpalo: vmlinux
84         export TOPDIR=`pwd`; \
85         unset STRIP LDFLAGS CPP CPPFLAGS AFLAGS CFLAGS CC LD; cd ../palo && make lifimage
86
87 # Shorthands for known targets not supported by parisc, use palo as default
88 Image zImage bzImage: palo
89
90 kernel_install: vmlinux
91         sh $(src)/arch/parisc/install.sh \
92                         $(KERNELRELEASE) $< System.map "$(INSTALL_PATH)"
93
94 install: kernel_install modules_install
95
96 prepare: include/asm-parisc/offsets.h
97
98 arch/parisc/kernel/asm-offsets.s: include/asm include/linux/version.h \
99                                    include/config/MARKER
100
101 include/asm-parisc/offsets.h: arch/parisc/kernel/asm-offsets.s
102         $(call filechk,gen-asm-offsets)
103
104 CLEAN_FILES     += lifimage include/asm-parisc/offsets.h
105 MRPROPER_FILES  += palo.conf
106
107 define archhelp
108         @echo  '* vmlinux       - Uncompressed kernel image (./vmlinux)'
109         @echo  '  palo          - Bootable image (./lifimage)'
110         @echo  '  install       - Install kernel using'
111         @echo  '                  (your) ~/bin/installkernel or'
112         @echo  '                  (distribution) /sbin/installkernel or'
113         @echo  '                  copy to $$(INSTALL_PATH)'
114 endef