Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-2.12-pull-request...
[qemu/ar7.git] / pc-bios / s390-ccw / Makefile
blob1712c2d95daba0e7065e1870d3a4f383d27ba014
1 all: build-all
2 # Dummy command so that make thinks it has done something
3 @true
5 include ../../config-host.mak
6 include $(SRC_PATH)/rules.mak
8 $(call set-vpath, $(SRC_PATH)/pc-bios/s390-ccw)
10 .PHONY : all clean build-all
12 OBJECTS = start.o main.o bootmap.o sclp.o virtio.o virtio-scsi.o virtio-blkdev.o libc.o menu.o
13 QEMU_CFLAGS := $(filter -W%, $(QEMU_CFLAGS))
14 QEMU_CFLAGS += -ffreestanding -fno-delete-null-pointer-checks -msoft-float
15 QEMU_CFLAGS += -march=z900 -fPIE -fno-strict-aliasing
16 QEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS), -fno-stack-protector)
17 LDFLAGS += -Wl,-pie -nostdlib
19 build-all: s390-ccw.img s390-netboot.img
21 s390-ccw.elf: $(OBJECTS)
22 $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $(OBJECTS),"BUILD","$(TARGET_DIR)$@")
24 STRIP ?= strip
26 s390-ccw.img: s390-ccw.elf
27 $(call quiet-command,$(STRIP) --strip-unneeded $< -o $@,"STRIP","$(TARGET_DIR)$@")
29 $(OBJECTS): Makefile
31 ifneq ($(wildcard $(SRC_PATH)/roms/SLOF/lib/libnet),)
32 include $(SRC_PATH)/pc-bios/s390-ccw/netboot.mak
33 else
34 s390-netboot.img:
35 @echo "s390-netboot.img not built since roms/SLOF/ is not available."
36 endif
38 clean:
39 rm -f *.o *.d *.img *.elf *~ *.a