blob: 0339c247898c50629018e51c6a26102fe2b1ed38 [file] [log] [blame]
Alexander Grafb462fcd2013-04-22 21:03:39 +02001all: build-all
2# Dummy command so that make thinks it has done something
3 @true
4
5include ../../config-host.mak
6include $(SRC_PATH)/rules.mak
7
8$(call set-vpath, $(SRC_PATH)/pc-bios/s390-ccw)
9
10.PHONY : all clean build-all
11
Eugene (jno) Dvurechenski80ba3e22015-11-10 15:37:22 +010012OBJECTS = start.o main.o bootmap.o sclp-ascii.o virtio.o virtio-scsi.o
Christian Borntraegerc86c03c2016-08-15 12:20:49 +020013QEMU_CFLAGS := $(filter -W%, $(QEMU_CFLAGS))
14QEMU_CFLAGS += -ffreestanding -fno-delete-null-pointer-checks -msoft-float
15QEMU_CFLAGS += -march=z900 -fPIE -fno-strict-aliasing
16QEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS), -fno-stack-protector)
Thomas Huthd884c862015-03-09 11:12:53 +010017LDFLAGS += -Wl,-pie -nostdlib
Alexander Grafb462fcd2013-04-22 21:03:39 +020018
19build-all: s390-ccw.img
20
21s390-ccw.elf: $(OBJECTS)
Peter Maydell0bdb12c2016-10-04 17:27:21 +010022 $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $(OBJECTS),"BUILD","$(TARGET_DIR)$@")
Alexander Grafb462fcd2013-04-22 21:03:39 +020023
24s390-ccw.img: s390-ccw.elf
Peter Maydell0bdb12c2016-10-04 17:27:21 +010025 $(call quiet-command,strip --strip-unneeded $< -o $@,"STRIP","$(TARGET_DIR)$@")
Thomas Huthd884c862015-03-09 11:12:53 +010026
27$(OBJECTS): Makefile
Alexander Grafb462fcd2013-04-22 21:03:39 +020028
29clean:
Christian Borntraeger63288012013-04-23 01:23:05 +000030 rm -f *.o *.d *.img *.elf *~