ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[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 install: vmlinux
61         $(Q)$(MAKE) $(build)=$(boot) $@
62
63 image: vmlinux
64         $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
65
66 archclean:
67         $(Q)$(MAKE) $(clean)=$(boot)
68
69 prepare: include/asm-$(ARCH)/offsets.h
70
71 arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
72                                    include/config/MARKER
73
74 include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
75         $(call filechk,gen-asm-offsets)
76
77 CLEAN_FILES += include/asm-$(ARCH)/offsets.h
78
79 # Don't use tabs in echo arguments
80 define archhelp
81   echo  '* image           - Kernel image for IPL ($(boot)/image)'
82 endef