1 # SPDX-License-Identifier: GPL-2.0
3 # Makefile for the linux s390-specific parts of the memory manager.
10 KBUILD_AFLAGS
:= $(KBUILD_AFLAGS_DECOMPRESSOR
)
11 KBUILD_CFLAGS
:= $(KBUILD_CFLAGS_DECOMPRESSOR
)
14 # Use -march=z900 for als.c to be able to print an error
15 # message if the kernel is started on a machine which is too old
17 ifneq ($(CC_FLAGS_MARCH
),-march
=z900
)
18 AFLAGS_REMOVE_head.o
+= $(CC_FLAGS_MARCH
)
19 AFLAGS_head.o
+= -march
=z900
20 AFLAGS_REMOVE_mem.o
+= $(CC_FLAGS_MARCH
)
21 AFLAGS_mem.o
+= -march
=z900
22 CFLAGS_REMOVE_als.o
+= $(CC_FLAGS_MARCH
)
23 CFLAGS_als.o
+= -march
=z900
24 CFLAGS_REMOVE_sclp_early_core.o
+= $(CC_FLAGS_MARCH
)
25 CFLAGS_sclp_early_core.o
+= -march
=z900
28 CFLAGS_sclp_early_core.o
+= -I
$(srctree
)/drivers
/s390
/char
30 obj-y
:= head.o als.o ebcdic.o sclp_early_core.o mem.o
31 targets
:= bzImage startup.a
$(obj-y
)
34 OBJECTS
:= $(addprefix $(obj
)/,$(obj-y
))
36 $(obj
)/bzImage
: $(obj
)/compressed
/vmlinux FORCE
37 $(call if_changed
,objcopy
)
39 $(obj
)/compressed
/vmlinux
: $(obj
)/startup.a FORCE
40 $(Q
)$(MAKE
) $(build
)=$(obj
)/compressed
$@
43 cmd_ar
= rm -f
$@
; $(AR
) rcsTP
$(KBUILD_ARFLAGS
) $@
$(filter $(OBJECTS
), $^
)
45 $(obj
)/startup.a
: $(OBJECTS
) FORCE
48 install: $(CONFIGURE
) $(obj
)/bzImage
49 sh
-x
$(srctree
)/$(obj
)/install.sh
$(KERNELRELEASE
) $(obj
)/bzImage \
50 System.map
"$(INSTALL_PATH)"
53 chkbss-target
:= $(obj
)/startup.a
54 include $(srctree
)/arch
/s390
/scripts
/Makefile.chkbss