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
16LD=$(CROSS_COMPILE)ld -m elf64_s390
17CPP=$(CC) -E
18OBJCOPY=$(CROSS_COMPILE)objcopy -O binary -R .note -R .comment -S
19LDFLAGS=-e start
20ifeq ($(CONFIG_SHARED_KERNEL),y)
21LINKFLAGS =-T $(TOPDIR)/arch/s390x/vmlinux-shared.lds $(LDFLAGS)
22else
23LINKFLAGS =-T $(TOPDIR)/arch/s390x/vmlinux.lds $(LDFLAGS)
24endif
25MODFLAGS += -fpic
26
27CFLAGS_PIPE := -pipe
28CFLAGS_NSR  := -fno-strength-reduce
29CFLAGS := $(CFLAGS) $(CFLAGS_PIPE) $(CFLAGS_NSR)
30
31HEAD := arch/s390x/kernel/head.o arch/s390x/kernel/init_task.o
32
33SUBDIRS := $(SUBDIRS) arch/s390x/mm arch/s390x/kernel arch/s390x/lib \
34           drivers/s390
35CORE_FILES := arch/s390x/mm/mm.o arch/s390x/kernel/kernel.o $(CORE_FILES)
36DRIVERS := $(DRIVERS) drivers/s390/io.o
37LIBS := $(TOPDIR)/arch/s390x/lib/lib.a $(LIBS) $(TOPDIR)/arch/s390x/lib/lib.a
38
39all: image listing
40
41listing: vmlinux
42	@$(MAKEBOOT) listing
43
44arch/s390x/kernel: dummy
45	$(MAKE) linuxsubdirs SUBDIRS=arch/s390x/kernel
46
47arch/s390x/mm: dummy
48	$(MAKE) linuxsubdirs SUBDIRS=arch/s390x/mm
49
50drivers/s390: dummy
51	$(MAKE) linuxsubdirs SUBDIRS=drivers/s390
52
53MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
54
55image: vmlinux
56	@$(MAKEBOOT) image
57
58install: vmlinux
59	@$(MAKEBOOT) BOOTIMAGE=image install
60
61archclean:
62	@$(MAKEBOOT) clean
63	$(MAKE) -C arch/$(ARCH)/kernel clean
64
65archmrproper:
66
67archdep:
68	@$(MAKEBOOT) dep
69