cachepc-qemu

Fork of AMDESE/qemu with changes for cachepc side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-qemu
Log | Files | Refs | Submodules | LICENSE | sfeed.txt

netboot.mak (2322B)


      1
      2SLOF_DIR := $(SRC_PATH)/roms/SLOF
      3
      4NETOBJS := start.o sclp.o cio.o virtio.o virtio-net.o jump2ipl.o netmain.o
      5
      6LIBC_INC := -nostdinc -I$(SLOF_DIR)/lib/libc/include
      7LIBNET_INC := -I$(SLOF_DIR)/lib/libnet
      8
      9NETLDFLAGS := $(LDFLAGS) -Wl,-Ttext=0x7800000
     10
     11$(NETOBJS): QEMU_CFLAGS += $(LIBC_INC) $(LIBNET_INC)
     12
     13s390-netboot.elf: $(NETOBJS) libnet.a libc.a
     14	$(call quiet-command,$(CC) $(NETLDFLAGS) -o $@ $^,"BUILD","$(TARGET_DIR)$@")
     15
     16s390-netboot.img: s390-netboot.elf
     17	$(call quiet-command,$(STRIP) --strip-unneeded $< -o $@,"STRIP","$(TARGET_DIR)$@")
     18
     19# libc files:
     20
     21LIBC_CFLAGS = $(QEMU_CFLAGS) $(CFLAGS) $(LIBC_INC) $(LIBNET_INC) \
     22	      -MMD -MP -MT $@ -MF $(@:%.o=%.d)
     23
     24CTYPE_OBJS = isdigit.o isxdigit.o toupper.o
     25%.o : $(SLOF_DIR)/lib/libc/ctype/%.c
     26	$(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@")
     27
     28STRING_OBJS = strcat.o strchr.o strrchr.o strcpy.o strlen.o strncpy.o \
     29	      strcmp.o strncmp.o strcasecmp.o strncasecmp.o strstr.o \
     30	      memset.o memcpy.o memmove.o memcmp.o
     31%.o : $(SLOF_DIR)/lib/libc/string/%.c
     32	$(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@")
     33
     34STDLIB_OBJS = atoi.o atol.o strtoul.o strtol.o rand.o malloc.o free.o
     35%.o : $(SLOF_DIR)/lib/libc/stdlib/%.c
     36	$(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@")
     37
     38STDIO_OBJS = sprintf.o snprintf.o vfprintf.o vsnprintf.o vsprintf.o fprintf.o \
     39	     printf.o putc.o puts.o putchar.o stdchnls.o fileno.o
     40%.o : $(SLOF_DIR)/lib/libc/stdio/%.c
     41	$(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@")
     42
     43sbrk.o: $(SLOF_DIR)/slof/sbrk.c
     44	$(call quiet-command,$(CC) $(LIBC_CFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@")
     45
     46LIBCOBJS := $(STRING_OBJS) $(CTYPE_OBJS) $(STDLIB_OBJS) $(STDIO_OBJS) sbrk.o
     47
     48libc.a: $(LIBCOBJS)
     49	$(call quiet-command,$(AR) -rc $@ $^,"AR","$(TARGET_DIR)$@")
     50
     51# libnet files:
     52
     53LIBNETOBJS := args.o dhcp.o dns.o icmpv6.o ipv6.o tcp.o udp.o bootp.o \
     54	      dhcpv6.o ethernet.o ipv4.o ndp.o tftp.o pxelinux.o
     55LIBNETCFLAGS = $(QEMU_CFLAGS) $(CFLAGS) $(LIBC_INC) $(LIBNET_INC) \
     56	       -DDHCPARCH=0x1F -MMD -MP -MT $@ -MF $(@:%.o=%.d)
     57
     58%.o : $(SLOF_DIR)/lib/libnet/%.c
     59	$(call quiet-command,$(CC) $(LIBNETCFLAGS) -c -o $@ $<,"CC","$(TARGET_DIR)$@")
     60
     61libnet.a: $(LIBNETOBJS)
     62	$(call quiet-command,$(AR) -rc $@ $^,"AR","$(TARGET_DIR)$@")