Merge remote-tracking branch 'remotes/jsnow-gitlab/tags/python-pull-request' into...
[qemu.git] / tests / migration / s390x / Makefile
1 # To specify cross compiler prefix, use CROSS_PREFIX=
2 # $ make CROSS_PREFIX=s390x-linux-gnu-
3
4 .PHONY: all clean
5 all: a-b-bios.h
6 fwdir=../../../pc-bios/s390-ccw
7
8 CFLAGS+=-ffreestanding -fno-delete-null-pointer-checks -fPIE -Os \
9 -msoft-float -march=z900 -fno-asynchronous-unwind-tables -Wl,-pie \
10 -Wl,--build-id=none -nostdlib
11
12 a-b-bios.h: s390x.elf
13 echo "$$__note" > header.tmp
14 xxd -i $< | sed -e 's/.*int.*//' >> header.tmp
15 mv header.tmp $@
16
17 # We use common-page-size=16 to avoid big padding in the ELF file
18 s390x.elf: a-b-bios.c
19 $(CROSS_PREFIX)gcc $(CFLAGS) -I$(fwdir) $(fwdir)/start.S \
20 $(fwdir)/sclp.c -Wl,-zcommon-page-size=16 -o $@ $<
21 $(CROSS_PREFIX)strip $@
22
23 clean:
24 @rm -rf *.elf *.o