aboutsummaryrefslogtreecommitdiff
path: root/pc-bios/vof/Makefile
blob: aa1678c4d8897b360d3d90829d29ef31d4c80265 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
all: build-all

build-all: vof.bin

CROSS ?=
CC = $(CROSS)gcc
LD = $(CROSS)ld
OBJCOPY = $(CROSS)objcopy

%.o: %.S
	$(CC) -m32 -mbig-endian -mcpu=power4 -c -o $@ $<

%.o: %.c
	$(CC) -m32 -mbig-endian -mcpu=power4 -c -fno-stack-protector -o $@ $<

vof.elf: entry.o main.o ci.o bootmem.o libc.o
	$(LD) -nostdlib -e_start -Tvof.lds -EB -o $@ $^

%.bin: %.elf
	$(OBJCOPY) -O binary -j .text -j .data -j .toc -j .got2 $^ $@

clean:
	rm -f *.o vof.bin vof.elf *~