1d695918fSPaolo Bonziniinclude config.mak 2d695918fSPaolo BonziniVPATH=$(SRC_DIR) 3d695918fSPaolo Bonziniall: vof.bin 4fc8c745dSAlexey Kardashevskiy 5*3cc70a99SPaolo BonziniNULL := 6*3cc70a99SPaolo BonziniSPACE := $(NULL) # 7*3cc70a99SPaolo BonziniTARGET_PREFIX := $(patsubst %/,%:$(SPACE),$(TARGET_DIR)) 8*3cc70a99SPaolo Bonzini 9*3cc70a99SPaolo Bonziniquiet-@ = $(if $(V),,@$(if $1,,printf "%s\n" "$(TARGET_PREFIX)$1" && )) 10*3cc70a99SPaolo Bonziniquiet-command = $(call quiet-@,$2 $@)$1 11*3cc70a99SPaolo Bonzini 12d44f2f96SPaolo BonziniEXTRA_CFLAGS += -mcpu=power4 13fc8c745dSAlexey Kardashevskiy 14fc8c745dSAlexey Kardashevskiy%.o: %.S 15*3cc70a99SPaolo Bonzini $(call quiet-command, $(CC) $(EXTRA_CFLAGS) -c -o $@ $<,Assembling) 16fc8c745dSAlexey Kardashevskiy 17fc8c745dSAlexey Kardashevskiy%.o: %.c 18*3cc70a99SPaolo Bonzini $(call quiet-command, $(CC) $(EXTRA_CFLAGS) -c -fno-stack-protector -o $@ $<,Compiling) 19fc8c745dSAlexey Kardashevskiy 20fc8c745dSAlexey Kardashevskiyvof.elf: entry.o main.o ci.o bootmem.o libc.o 21*3cc70a99SPaolo Bonzini $(call quiet-command, $(LD) -nostdlib -e_start -T$(SRC_DIR)/vof.lds -EB -o $@ $^,Linking) 22fc8c745dSAlexey Kardashevskiy 23fc8c745dSAlexey Kardashevskiy%.bin: %.elf 24*3cc70a99SPaolo Bonzini $(call quiet-command, $(OBJCOPY) -O binary -j .text -j .data -j .toc -j .got2 $^ $@,Extracting raw object) 25fc8c745dSAlexey Kardashevskiy 26fc8c745dSAlexey Kardashevskiyclean: 27fc8c745dSAlexey Kardashevskiy rm -f *.o vof.bin vof.elf *~ 28d695918fSPaolo Bonzini 29ff0102f6SPaolo Bonzinidistclean: clean 30ff0102f6SPaolo Bonzini 31ff0102f6SPaolo Bonzini.PHONY: all clean distclean 32