Merge tag 'pull-sp-20240412' of https://gitlab.com/rth7680/qemu into staging
[qemu/armbru.git] / pc-bios / vof / Makefile
blobd1eb6ced7ec919dc15e6911d6b528265945eab17
1 include config.mak
2 VPATH=$(SRC_DIR)
3 all: vof.bin
5 NULL :=
6 SPACE := $(NULL) #
7 TARGET_PREFIX := $(patsubst %/,%:$(SPACE),$(TARGET_DIR))
9 quiet-@ = $(if $(V),,@$(if $1,,printf "%s\n" "$(TARGET_PREFIX)$1" && ))
10 quiet-command = $(call quiet-@,$2 $@)$1
12 EXTRA_CFLAGS += -mcpu=power4
14 %.o: %.S
15 $(call quiet-command, $(CC) $(EXTRA_CFLAGS) -c -o $@ $<,Assembling)
17 %.o: %.c
18 $(call quiet-command, $(CC) $(EXTRA_CFLAGS) -c -fno-stack-protector -o $@ $<,Compiling)
20 vof.elf: entry.o main.o ci.o bootmem.o libc.o
21 $(call quiet-command, $(LD) -nostdlib -e_start -T$(SRC_DIR)/vof.lds -EB -o $@ $^,Linking)
23 %.bin: %.elf
24 $(call quiet-command, $(OBJCOPY) -O binary -j .text -j .data -j .toc -j .got2 $^ $@,Extracting raw object)
26 clean:
27 rm -f *.o vof.bin vof.elf *~
29 distclean: clean
31 .PHONY: all clean distclean