Commit 0e08b4bd authored by Martin Schwidefsky's avatar Martin Schwidefsky Committed by Linus Torvalds

[PATCH] s390: Makefiles.

Makefile changes by Sam Ravnborg. Summary of changes:
o Added FORCE prerequisite in boot/Makefile
o Do not use shorthand targets when calling the boot/Makefile
o No longer use BOOT_IMAGE, not needed now
o Use kbuild clean infrastructure when cleaning up in boot
o Offset generation shrinked with one rule
o removed inclusion of Rules.make in all Makefiles
o no longer use the descend macro, use $(Q)$(MAKE) as replacement
parent 8b4ad80b
......@@ -20,36 +20,37 @@ LDFLAGS_BLOB := --format binary --oformat elf32-s390
CFLAGS += -pipe -fno-strength-reduce
HEAD := arch/s390/kernel/head.o arch/s390/kernel/init_task.o
HEAD := arch/$(ARCH)/kernel/head.o arch/$(ARCH)/kernel/init_task.o
core-y += arch/s390/mm/ arch/s390/kernel/
drivers-y += drivers/s390/
drivers-$(CONFIG_MATHEMU) += arch/s390/math-emu/
libs-y += arch/s390/lib/
core-y += arch/$(ARCH)/mm/ arch/$(ARCH)/kernel/
libs-y += arch/$(ARCH)/lib/
drivers-y += drivers/s390/
drivers-$(CONFIG_MATHEMU) += arch/$(ARCH)/math-emu/
makeboot =$(Q)$(MAKE) -f scripts/Makefile.build obj=arch/$(ARCH)/boot $(1)
all: image listing
makeboot = $(call descend,arch/$(ARCH)/boot,$(1))
BOOTIMAGE= arch/$(ARCH)/boot/image
listing image: vmlinux
$(call makeboot,arch/$(ARCH)/boot/$@)
listing install image: vmlinux
+@$(call makeboot,BOOTIMAGE=$(BOOTIMAGE) $@)
install: vmlinux
$(call makeboot, $@)
archmrproper:
archclean:
+@$(call makeboot,clean)
$(Q)$(MAKE) -f scripts/Makefile.clean obj=arch/$(ARCH)/boot
archmrproper:
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.tmp: arch/$(ARCH)/kernel/asm-offsets.s
@$(generate-asm-offsets.h) < $< > $@
include/asm-$(ARCH)/offsets.h: include/asm-$(ARCH)/offsets.h.tmp
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 \
......
......@@ -2,26 +2,21 @@
# Makefile for the linux s390-specific parts of the memory manager.
#
EXTRA_AFLAGS := -traditional
EXTRA_TARGETS := image listing
EXTRA_AFLAGS := -traditional
include $(TOPDIR)/Rules.make
quiet_cmd_listing = OBJDUMP $(echo_target)
cmd_listing = $(OBJDUMP) --disassemble --disassemble-all \
--disassemble-zeroes --reloc vmlinux > $@
quiet_cmd_listing = OBJDUMP $@
cmd_listing = $(OBJDUMP) --disassemble --disassemble-all \
--disassemble-zeroes --reloc vmlinux > $@
$(obj)/image: vmlinux
$(obj)/image: vmlinux FORCE
$(call if_changed,objcopy)
$(obj)/listing: vmlinux
$(obj)/listing: vmlinux FORCE
$(call if_changed,listing)
image: $(obj)/image
listing: $(obj)/listing
clean:
rm -f $(obj)/image $(obj)/listing
install: $(CONFIGURE) $(BOOTIMAGE)
sh -x $(obj)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map Kerntypes "$(INSTALL_PATH)"
install: $(CONFIGURE) $(obj)/image
sh -x $(obj)/install.sh $(KERNELRELEASE) $(obj)/image \
System.map Kerntypes "$(INSTALL_PATH)"
......@@ -321,6 +321,8 @@ CONFIG_CRYPTO=y
# CONFIG_CRYPTO_SHA256 is not set
# CONFIG_CRYPTO_DES is not set
# CONFIG_CRYPTO_BLOWFISH is not set
# CONFIG_CRYPTO_TWOFISH is not set
# CONFIG_CRYPTO_SERPENT is not set
# CONFIG_CRYPTO_TEST is not set
#
......
......@@ -17,5 +17,3 @@ obj-$(CONFIG_SMP) += smp.o
# Kernel debugging
#
obj-$(CONFIG_REMOTE_DEBUG) += gdb-stub.o #gdb-low.o
include $(TOPDIR)/Rules.make
......@@ -7,6 +7,3 @@ L_TARGET = lib.a
EXTRA_AFLAGS := -traditional
obj-y = delay.o memset.o strcmp.o strncpy.o uaccess.o
include $(TOPDIR)/Rules.make
......@@ -4,9 +4,5 @@
obj-$(CONFIG_MATHEMU) := math.o qrnnd.o
EXTRA_CFLAGS = -I. -I$(TOPDIR)/include/math-emu -w
EXTRA_AFLAGS := -traditional
include $(TOPDIR)/Rules.make
EXTRA_CFLAGS := -I$(src) -Iinclude/math-emu -w
EXTRA_AFLAGS := -traditional
......@@ -3,5 +3,3 @@
#
obj-y := init.o fault.o ioremap.o extable.o
include $(TOPDIR)/Rules.make
......@@ -21,35 +21,36 @@ LDFLAGS_BLOB := --format binary --oformat elf64-s390
CFLAGS += -pipe -fno-strength-reduce
HEAD := arch/s390x/kernel/head.o arch/s390x/kernel/init_task.o
HEAD := arch/$(ARCH)/kernel/head.o arch/$(ARCH)/kernel/init_task.o
core-y += arch/s390x/mm/ arch/s390x/kernel/
core-y += arch/$(ARCH)/mm/ arch/$(ARCH)/kernel/
libs-y += arch/$(ARCH)/lib/
drivers-y += drivers/s390/
libs-y += arch/s390x/lib/
makeboot =$(Q)$(MAKE) -f scripts/Makefile.build obj=arch/$(ARCH)/boot $(1)
all: image listing
makeboot = $(call descend,arch/$(ARCH)/boot,$(1))
BOOTIMAGE= arch/$(ARCH)/boot/image
listing image: vmlinux
$(call makeboot,arch/$(ARCH)/boot/$@)
listing install image: vmlinux
+@$(call makeboot,BOOTIMAGE=$(BOOTIMAGE) $@)
install: vmlinux
$(call makeboot, $@)
archmrproper:
archclean:
+@$(call makeboot,clean)
$(Q)$(MAKE) -f scripts/Makefile.clean obj=arch/$(ARCH)/boot
archmrproper:
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.tmp: arch/$(ARCH)/kernel/asm-offsets.s
@$(generate-asm-offsets.h) < $< > $@
include/asm-$(ARCH)/offsets.h: include/asm-$(ARCH)/offsets.h.tmp
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 \
......
......@@ -2,26 +2,21 @@
# Makefile for the linux s390-specific parts of the memory manager.
#
EXTRA_AFLAGS := -traditional
EXTRA_TARGETS := image listing
EXTRA_AFLAGS := -traditional
include $(TOPDIR)/Rules.make
quiet_cmd_listing = OBJDUMP $(echo_target)
cmd_listing = $(OBJDUMP) --disassemble --disassemble-all \
--disassemble-zeroes --reloc vmlinux > $@
quiet_cmd_listing = OBJDUMP $@
cmd_listing = $(OBJDUMP) --disassemble --disassemble-all \
--disassemble-zeroes --reloc vmlinux > $@
$(obj)/image: vmlinux
$(obj)/image: vmlinux FORCE
$(call if_changed,objcopy)
$(obj)/listing: vmlinux
$(obj)/listing: vmlinux FORCE
$(call if_changed,listing)
image: $(obj)/image
listing: $(obj)/listing
clean:
rm -f $(obj)/image $(obj)/listing
install: $(CONFIGURE) $(BOOTIMAGE)
sh -x $(obj)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map Kerntypes "$(INSTALL_PATH)"
install: $(CONFIGURE) $(obj)/image
sh -x $(obj)/install.sh $(KERNELRELEASE) $(obj)/image \
System.map Kerntypes "$(INSTALL_PATH)"
......@@ -382,6 +382,8 @@ CONFIG_CRYPTO=y
# CONFIG_CRYPTO_SHA256 is not set
# CONFIG_CRYPTO_DES is not set
# CONFIG_CRYPTO_BLOWFISH is not set
# CONFIG_CRYPTO_TWOFISH is not set
# CONFIG_CRYPTO_SERPENT is not set
# CONFIG_CRYPTO_TEST is not set
#
......
......@@ -24,8 +24,6 @@ obj-$(CONFIG_S390_SUPPORT) += linux32.o signal32.o ioctl32.o wrapper32.o \
exec32.o exec_domain32.o
obj-$(CONFIG_BINFMT_ELF32) += binfmt_elf32.o
include $(TOPDIR)/Rules.make
#
# This is just to get the dependencies...
#
......
......@@ -7,6 +7,3 @@ L_TARGET = lib.a
EXTRA_AFLAGS := -traditional
obj-y = delay.o memset.o strcmp.o strncpy.o uaccess.o
include $(TOPDIR)/Rules.make
#
# Makefile for the linux i386-specific parts of the memory manager.
# Makefile for the linux s390-specific parts of the memory manager.
#
obj-y := init.o fault.o ioremap.o extable.o
include $(TOPDIR)/Rules.make
......@@ -3,7 +3,7 @@
#
obj-y += s390mach.o sysinfo.o
obj-y += cio/ block/ char/ misc/ net/
obj-y += cio/ block/ char/ net/
drivers-y += drivers/s390/built-in.o
......
#
# S/390 miscellaneous devices
#
# placeholder for stuff to come...
include $(TOPDIR)/Rules.make
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment