1b462fcd5SAlexander Grafall: build-all 2b462fcd5SAlexander Graf# Dummy command so that make thinks it has done something 3b462fcd5SAlexander Graf @true 4b462fcd5SAlexander Graf 5b462fcd5SAlexander Grafinclude ../../config-host.mak 6b462fcd5SAlexander Grafinclude $(SRC_PATH)/rules.mak 7b462fcd5SAlexander Graf 8b462fcd5SAlexander Graf$(call set-vpath, $(SRC_PATH)/pc-bios/s390-ccw) 9b462fcd5SAlexander Graf 10b462fcd5SAlexander Graf.PHONY : all clean build-all 11b462fcd5SAlexander Graf 129a848adfSThomas HuthOBJECTS = start.o main.o bootmap.o jump2ipl.o sclp.o menu.o \ 13efa47d36SJason J. Herne virtio.o virtio-scsi.o virtio-blkdev.o libc.o cio.o dasd-ipl.o 149a848adfSThomas Huth 15c86c03cfSChristian BorntraegerQEMU_CFLAGS := $(filter -W%, $(QEMU_CFLAGS)) 16c86c03cfSChristian BorntraegerQEMU_CFLAGS += -ffreestanding -fno-delete-null-pointer-checks -msoft-float 17c86c03cfSChristian BorntraegerQEMU_CFLAGS += -march=z900 -fPIE -fno-strict-aliasing 1863c93facSThomas HuthQEMU_CFLAGS += -fno-asynchronous-unwind-tables 19c86c03cfSChristian BorntraegerQEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS), -fno-stack-protector) 20d884c86dSThomas HuthLDFLAGS += -Wl,-pie -nostdlib 21b462fcd5SAlexander Graf 223e4415a7SThomas Huthbuild-all: s390-ccw.img s390-netboot.img 23b462fcd5SAlexander Graf 24b462fcd5SAlexander Grafs390-ccw.elf: $(OBJECTS) 250bdb12c7SPeter Maydell $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $(OBJECTS),"BUILD","$(TARGET_DIR)$@") 26b462fcd5SAlexander Graf 27c68f4503SGreg KurzSTRIP ?= strip 28c68f4503SGreg Kurz 29b462fcd5SAlexander Grafs390-ccw.img: s390-ccw.elf 30c68f4503SGreg Kurz $(call quiet-command,$(STRIP) --strip-unneeded $< -o $@,"STRIP","$(TARGET_DIR)$@") 31d884c86dSThomas Huth 32d884c86dSThomas Huth$(OBJECTS): Makefile 33b462fcd5SAlexander Graf 343e4415a7SThomas Huthifneq ($(wildcard $(SRC_PATH)/roms/SLOF/lib/libnet),) 353e4415a7SThomas Huthinclude $(SRC_PATH)/pc-bios/s390-ccw/netboot.mak 363e4415a7SThomas Huthelse 373e4415a7SThomas Huths390-netboot.img: 383e4415a7SThomas Huth @echo "s390-netboot.img not built since roms/SLOF/ is not available." 393e4415a7SThomas Huthendif 403e4415a7SThomas Huth 41*1c9f6550SThomas HuthALL_OBJS = $(sort $(OBJECTS) $(NETOBJS) $(LIBCOBJS) $(LIBNETOBJS)) 42*1c9f6550SThomas Huth-include $(ALL_OBJS:%.o=%.d) 43*1c9f6550SThomas Huth 44b462fcd5SAlexander Grafclean: 4588b3739aSEric Farman rm -f *.o *.d *.img *.elf *~ *.a 46