This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / arch / s390 / Makefile
1 #
2 # s390/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 #
15
16 ifdef CONFIG_ARCH_S390_31
17 LDFLAGS         := -m elf_s390
18 CFLAGS          += -m31
19 AFLAGS          += -m31
20 UTS_MACHINE     := s390
21 endif
22
23 ifdef CONFIG_ARCH_S390X
24 LDFLAGS         := -m elf64_s390
25 MODFLAGS        += -fpic -D__PIC__
26 CFLAGS          += -m64
27 AFLAGS          += -m64
28 UTS_MACHINE     := s390x
29 endif
30
31 cflags-$(CONFIG_MARCH_G5)   += $(call check_gcc,-march=g5,)
32 cflags-$(CONFIG_MARCH_Z900) += $(call check_gcc,-march=z900,)
33 cflags-$(CONFIG_MARCH_Z990) += $(call check_gcc,-march=z990,)
34
35 CFLAGS          += $(cflags-y)
36 CFLAGS          += $(call check_gcc,-finline-limit=10000,)
37 CFLAGS          += -pipe -fno-strength-reduce -Wno-sign-compare 
38 CFLAGS          += -mbackchain
39
40 OBJCOPYFLAGS    := -O binary
41 LDFLAGS_vmlinux := -e start
42
43 head-$(CONFIG_ARCH_S390_31)     += arch/$(ARCH)/kernel/head.o
44 head-$(CONFIG_ARCH_S390X)       += arch/$(ARCH)/kernel/head64.o
45 head-y                          += arch/$(ARCH)/kernel/init_task.o
46
47 core-y          += arch/$(ARCH)/mm/ arch/$(ARCH)/kernel/ arch/$(ARCH)/crypto/ \
48                    arch/$(ARCH)/appldata/
49 libs-y          += arch/$(ARCH)/lib/
50 drivers-y       += drivers/s390/
51 drivers-$(CONFIG_MATHEMU) += arch/$(ARCH)/math-emu/
52
53 # must be linked after kernel
54 drivers-$(CONFIG_OPROFILE)      += arch/s390/oprofile/
55
56 boot            := arch/$(ARCH)/boot
57
58 all: image
59
60 # This is a white lie which helps to keep our spec simpler.
61 # No $(Q) or other trickery because nobody should use it outside of RPM builds.
62 bzImage: image
63         ln -s image arch/$(ARCH)/boot/bzImage
64
65 install: vmlinux
66         $(Q)$(MAKE) $(build)=$(boot) $@
67
68 image: vmlinux
69         $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
70
71 archclean:
72         $(Q)$(MAKE) $(clean)=$(boot)
73
74 prepare: include/asm-$(ARCH)/offsets.h
75
76 arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
77                                    include/config/MARKER
78
79 include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
80         $(call filechk,gen-asm-offsets)
81
82 CLEAN_FILES += include/asm-$(ARCH)/offsets.h
83
84 # Don't use tabs in echo arguments
85 define archhelp
86   echo  '* image           - Kernel image for IPL ($(boot)/image)'
87 endef