1*fc8c745dSAlexey Kardashevskiyall: build-all 2*fc8c745dSAlexey Kardashevskiy 3*fc8c745dSAlexey Kardashevskiybuild-all: vof.bin 4*fc8c745dSAlexey Kardashevskiy 5*fc8c745dSAlexey KardashevskiyCROSS ?= 6*fc8c745dSAlexey KardashevskiyCC = $(CROSS)gcc 7*fc8c745dSAlexey KardashevskiyLD = $(CROSS)ld 8*fc8c745dSAlexey KardashevskiyOBJCOPY = $(CROSS)objcopy 9*fc8c745dSAlexey Kardashevskiy 10*fc8c745dSAlexey Kardashevskiy%.o: %.S 11*fc8c745dSAlexey Kardashevskiy $(CC) -m32 -mbig-endian -mcpu=power4 -c -o $@ $< 12*fc8c745dSAlexey Kardashevskiy 13*fc8c745dSAlexey Kardashevskiy%.o: %.c 14*fc8c745dSAlexey Kardashevskiy $(CC) -m32 -mbig-endian -mcpu=power4 -c -fno-stack-protector -o $@ $< 15*fc8c745dSAlexey Kardashevskiy 16*fc8c745dSAlexey Kardashevskiyvof.elf: entry.o main.o ci.o bootmem.o libc.o 17*fc8c745dSAlexey Kardashevskiy $(LD) -nostdlib -e_start -Tvof.lds -EB -o $@ $^ 18*fc8c745dSAlexey Kardashevskiy 19*fc8c745dSAlexey Kardashevskiy%.bin: %.elf 20*fc8c745dSAlexey Kardashevskiy $(OBJCOPY) -O binary -j .text -j .data -j .toc -j .got2 $^ $@ 21*fc8c745dSAlexey Kardashevskiy 22*fc8c745dSAlexey Kardashevskiyclean: 23*fc8c745dSAlexey Kardashevskiy rm -f *.o vof.bin vof.elf *~ 24