d44f2f96f7
Use the flags passed to the configure script for the ppc cross compiler, which in fact default to those that are needed to get the 32-bit ISA. Add the endianness flag so that it remains possible to use a ppc64le compiler to compile VOF. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
23 lines
431 B
Makefile
23 lines
431 B
Makefile
include config.mak
|
|
VPATH=$(SRC_DIR)
|
|
all: vof.bin
|
|
|
|
EXTRA_CFLAGS += -mcpu=power4
|
|
|
|
%.o: %.S
|
|
$(CC) $(EXTRA_CFLAGS) -c -o $@ $<
|
|
|
|
%.o: %.c
|
|
$(CC) $(EXTRA_CFLAGS) -c -fno-stack-protector -o $@ $<
|
|
|
|
vof.elf: entry.o main.o ci.o bootmem.o libc.o
|
|
$(LD) -nostdlib -e_start -T$(SRC_DIR)/vof.lds -EB -o $@ $^
|
|
|
|
%.bin: %.elf
|
|
$(OBJCOPY) -O binary -j .text -j .data -j .toc -j .got2 $^ $@
|
|
|
|
clean:
|
|
rm -f *.o vof.bin vof.elf *~
|
|
|
|
.PHONY: all clean
|