[PATCH] BLOCK: Move extern declarations out of fs/*.c into header files [try #6]
[deliverable/linux.git] / arch / s390 / Makefile
CommitLineData
1da177e4
LT
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
347a8dc3 16ifndef CONFIG_64BIT
1da177e4
LT
17LDFLAGS := -m elf_s390
18CFLAGS += -m31
19AFLAGS += -m31
20UTS_MACHINE := s390
21STACK_SIZE := 8192
d310a35a 22CHECKFLAGS += -D__s390__
347a8dc3 23else
1da177e4
LT
24LDFLAGS := -m elf64_s390
25MODFLAGS += -fpic -D__PIC__
26CFLAGS += -m64
27AFLAGS += -m64
28UTS_MACHINE := s390x
29STACK_SIZE := 16384
d310a35a 30CHECKFLAGS += -D__s390__ -D__s390x__
1da177e4
LT
31endif
32
33cflags-$(CONFIG_MARCH_G5) += $(call cc-option,-march=g5)
34cflags-$(CONFIG_MARCH_Z900) += $(call cc-option,-march=z900)
35cflags-$(CONFIG_MARCH_Z990) += $(call cc-option,-march=z990)
0efa4703 36cflags-$(CONFIG_MARCH_Z9_109) += $(call cc-option,-march=z9-109)
1da177e4 37
cbbd1fa7
HC
38#
39# Prevent tail-call optimizations, to get clearer backtraces:
40#
41cflags-$(CONFIG_FRAME_POINTER) += -fno-optimize-sibling-calls
42
1da177e4
LT
43# old style option for packed stacks
44ifeq ($(call cc-option-yn,-mkernel-backchain),y)
45cflags-$(CONFIG_PACK_STACK) += -mkernel-backchain -D__PACK_STACK
46aflags-$(CONFIG_PACK_STACK) += -D__PACK_STACK
47cflags-$(CONFIG_SMALL_STACK) += -D__SMALL_STACK
48aflags-$(CONFIG_SMALL_STACK) += -D__SMALL_STACK
49ifdef CONFIG_SMALL_STACK
50STACK_SIZE := $(shell echo $$(($(STACK_SIZE)/2)) )
51endif
52endif
53
54# new style option for packed stacks
55ifeq ($(call cc-option-yn,-mpacked-stack),y)
56cflags-$(CONFIG_PACK_STACK) += -mpacked-stack -D__PACK_STACK
57aflags-$(CONFIG_PACK_STACK) += -D__PACK_STACK
58cflags-$(CONFIG_SMALL_STACK) += -D__SMALL_STACK
59aflags-$(CONFIG_SMALL_STACK) += -D__SMALL_STACK
60ifdef CONFIG_SMALL_STACK
61STACK_SIZE := $(shell echo $$(($(STACK_SIZE)/2)) )
62endif
63endif
64
65ifeq ($(call cc-option-yn,-mstack-size=8192 -mstack-guard=128),y)
66cflags-$(CONFIG_CHECK_STACK) += -mstack-size=$(STACK_SIZE)
67cflags-$(CONFIG_CHECK_STACK) += -mstack-guard=$(CONFIG_STACK_GUARD)
68endif
69
70ifeq ($(call cc-option-yn,-mwarn-dynamicstack),y)
71cflags-$(CONFIG_WARN_STACK) += -mwarn-dynamicstack
72cflags-$(CONFIG_WARN_STACK) += -mwarn-framesize=$(CONFIG_WARN_STACK_SIZE)
73endif
74
75CFLAGS += -mbackchain -msoft-float $(cflags-y)
1da177e4
LT
76CFLAGS += -pipe -fno-strength-reduce -Wno-sign-compare
77AFLAGS += $(aflags-y)
78
79OBJCOPYFLAGS := -O binary
80LDFLAGS_vmlinux := -e start
81
0ad775db 82head-y := arch/$(ARCH)/kernel/head.o arch/$(ARCH)/kernel/init_task.o
1da177e4
LT
83
84core-y += arch/$(ARCH)/mm/ arch/$(ARCH)/kernel/ arch/$(ARCH)/crypto/ \
24bbb1fa 85 arch/$(ARCH)/appldata/ arch/$(ARCH)/hypfs/
1da177e4
LT
86libs-y += arch/$(ARCH)/lib/
87drivers-y += drivers/s390/
88drivers-$(CONFIG_MATHEMU) += arch/$(ARCH)/math-emu/
89
90# must be linked after kernel
91drivers-$(CONFIG_OPROFILE) += arch/s390/oprofile/
92
93boot := arch/$(ARCH)/boot
94
95all: image
96
97install: vmlinux
98 $(Q)$(MAKE) $(build)=$(boot) $@
99
100image: vmlinux
101 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
102
103archclean:
104 $(Q)$(MAKE) $(clean)=$(boot)
105
1da177e4
LT
106# Don't use tabs in echo arguments
107define archhelp
108 echo '* image - Kernel image for IPL ($(boot)/image)'
109endef
This page took 0.157163 seconds and 5 git commands to generate.