15571dc82SThomas Huth# To specify cross compiler prefix, use CROSS_PREFIX= 25571dc82SThomas Huth# $ make CROSS_PREFIX=s390x-linux-gnu- 35571dc82SThomas Huth 45571dc82SThomas Huth.PHONY: all clean 55571dc82SThomas Huthall: a-b-bios.h 65571dc82SThomas Huthfwdir=../../../pc-bios/s390-ccw 75571dc82SThomas Huth 85571dc82SThomas HuthCFLAGS+=-ffreestanding -fno-delete-null-pointer-checks -fPIE -Os \ 9*7a06a8feSAkihiko Odaki -msoft-float -march=z900 -fno-asynchronous-unwind-tables \ 10*7a06a8feSAkihiko Odaki -fno-stack-protector -Wl,-pie -Wl,--build-id=none -nostdlib 115571dc82SThomas Huth 125571dc82SThomas Hutha-b-bios.h: s390x.elf 135571dc82SThomas Huth echo "$$__note" > header.tmp 145571dc82SThomas Huth xxd -i $< | sed -e 's/.*int.*//' >> header.tmp 155571dc82SThomas Huth mv header.tmp $@ 165571dc82SThomas Huth 175571dc82SThomas Huth# We use common-page-size=16 to avoid big padding in the ELF file 185571dc82SThomas Huths390x.elf: a-b-bios.c 195571dc82SThomas Huth $(CROSS_PREFIX)gcc $(CFLAGS) -I$(fwdir) $(fwdir)/start.S \ 205571dc82SThomas Huth $(fwdir)/sclp.c -Wl,-zcommon-page-size=16 -o $@ $< 215571dc82SThomas Huth $(CROSS_PREFIX)strip $@ 225571dc82SThomas Huth 235571dc82SThomas Huthclean: 245571dc82SThomas Huth @rm -rf *.elf *.o 25