
# s390x/Makefile
#
# This file is included by the global makefile so that you can add your own
# architecture-specific flags and dependencies. Remember to do have actions
# for "archclean" and "archdep" for cleaning up and making dependencies for
# this architecture
#
# This file is subject to the terms and conditions of the GNU General Public
# License.  See the file "COPYING" in the main directory of this archive
# for more details.
#
# Copyright (C) 1994 by Linus Torvalds
#

LDFLAGS		:= -m elf64_s390
OBJCOPYFLAGS	:= -O binary
LDFLAGS_vmlinux := -e start
MODFLAGS += -fpic -D__PIC__
LDFLAGS_BLOB	:= --format binary --oformat elf64-s390

CFLAGS += -pipe -fno-strength-reduce

HEAD := arch/$(ARCH)/kernel/head.o arch/$(ARCH)/kernel/init_task.o

core-y		+= arch/$(ARCH)/mm/ arch/$(ARCH)/kernel/
libs-y		+= arch/$(ARCH)/lib/
drivers-y	+= drivers/s390/


makeboot =$(Q)$(MAKE) -f scripts/Makefile.build obj=arch/$(ARCH)/boot $(1)

all: image listing

listing image: vmlinux
	$(call makeboot,arch/$(ARCH)/boot/$@)

install: vmlinux
	$(call makeboot, $@)

archmrproper:
archclean:
	$(Q)$(MAKE) -f scripts/Makefile.clean obj=arch/$(ARCH)/boot


prepare: include/asm-$(ARCH)/offsets.h

arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
				   include/config/MARKER

include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
	@echo -n '  Generating $@'
	@$(generate-asm-offsets.h) < $< > $@.tmp
	@$(update-if-changed)

CLEAN_FILES += include/asm-$(ARCH)/offsets.h.tmp \
	       include/asm-$(ARCH)/offsets.h
