On 06/08/2020 21.13, Paolo Bonzini wrote:
> Make it independent from the rules.mak, and clean up to use pattern rules.
> 
> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
> ---
>  pc-bios/s390-ccw/Makefile    | 105 
> ++++++++++++++++++++++++++++++++++---------
>  pc-bios/s390-ccw/netboot.mak |  62 -------------------------
>  2 files changed, 84 insertions(+), 83 deletions(-)
>  delete mode 100644 pc-bios/s390-ccw/netboot.mak

As Cornelia already mentioned in another mail, this does not work yet.
I'd also prefer if we could keep the netbook.mak stuff in that separate
file.

Maybe you could go with this minimal patch first - this seems to work
for me:

commit 7f265ef8253613d882bdeb8a89502d55923c0077
Author: Thomas Huth <th...@redhat.com>
Date:   Fri Aug 7 14:51:52 2020 +0200

    minimam pc-bios/s390-ccw/Makefile patch

diff a/pc-bios/s390-ccw/Makefile b/pc-bios/s390-ccw/Makefile
--- a/pc-bios/s390-ccw/Makefile
+++ b/pc-bios/s390-ccw/Makefile
@@ -3,10 +3,26 @@ all: build-all
        @true

 include ../../config-host.mak
-include $(SRC_PATH)/rules.mak

+quiet-command = $(if $(V),$1,$(if $(2),@printf "  %-7s %s\n" $2 $3 &&
$1, @$1))
+cc-option = $(if $(shell $(CC) $1 -S -o /dev/null -xc /dev/null
>/dev/null \
+             2>&1 && echo OK), $1, $2)
+
+VPATH_SUFFIXES = %.c %.h %.S %.m %.mak %.sh %.rc Kconfig% %.json.in
+set-vpath = $(if $1,$(foreach PATTERN,$(VPATH_SUFFIXES),$(eval vpath
$(PATTERN) $1)))
 $(call set-vpath, $(SRC_PATH)/pc-bios/s390-ccw)

+# Flags for dependency generation
+QEMU_DGFLAGS = -MMD -MP -MT $@ -MF $(@D)/$(*F).d
+
+%.o: %.c
+       $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) \
+              -c -o $@ $<,"CC","$(TARGET_DIR)$@")
+
+%.o: %.S
+       $(call quiet-command,$(CCAS) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) \
+              -c -o $@ $<,"CCAS","$(TARGET_DIR)$@")
+
 .PHONY : all clean build-all

 OBJECTS = start.o main.o bootmap.o jump2ipl.o sclp.o menu.o \

Thomas


Reply via email to