Remove dependency on config.mak and simplify Makefile.

Signed-off-by: Pierrick Bouvier <[email protected]>
---
 roms/Makefile     |  6 ++++++
 roms/vof/Makefile | 21 ++++++++-------------
 2 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/roms/Makefile b/roms/Makefile
index f15189a5409..84f22943d35 100644
--- a/roms/Makefile
+++ b/roms/Makefile
@@ -63,6 +63,7 @@ default help:
        @echo "  pxerom             -- update nic roms (bios only)"
        @echo "  efirom             -- update nic roms (bios+efi)"
        @echo "  slof               -- update slof.bin"
+       @echo "  vofrom             -- update vof.bin"
        @echo "  skiboot            -- update skiboot.lid"
        @echo "  u-boot.e500        -- update u-boot.e500"
        @echo "  u-boot.sam460      -- update u-boot.sam460"
@@ -136,6 +137,10 @@ slof:
        $(MAKE) -C SLOF CROSS=$(powerpc64_cross_prefix) qemu
        cp SLOF/boot_rom.bin ../pc-bios/slof.bin
 
+vofrom:
+       $(MAKE) -C vof
+       cp vof/vof.bin ../pc-bios/vof.bin
+
 u-boot.e500:
        $(MAKE) -C u-boot O=build-e500 qemu-ppce500_config
        $(MAKE) -C u-boot CROSS_COMPILE=$(powerpc_cross_prefix) \
@@ -217,6 +222,7 @@ clean:
        $(MAKE) -C edk2/BaseTools clean
        rm -rf 
edk2/Conf/{.cache,BuildEnv.sh,build_rule.txt,target.txt,tools_def.txt}
        $(MAKE) -C SLOF clean
+       $(MAKE) -C vof clean
        rm -rf u-boot/build-e500
        $(MAKE) -C u-boot-sam460ex distclean
        $(MAKE) -C skiboot clean
diff --git a/roms/vof/Makefile b/roms/vof/Makefile
index d1eb6ced7ec..d5dbb374356 100644
--- a/roms/vof/Makefile
+++ b/roms/vof/Makefile
@@ -1,27 +1,22 @@
-include config.mak
-VPATH=$(SRC_DIR)
 all: vof.bin
 
-NULL :=
-SPACE := $(NULL) #
-TARGET_PREFIX := $(patsubst %/,%:$(SPACE),$(TARGET_DIR))
-
-quiet-@ = $(if $(V),,@$(if $1,,printf "%s\n" "$(TARGET_PREFIX)$1" && ))
-quiet-command = $(call quiet-@,$2 $@)$1
-
+CROSS := $(or $(CROSS),powerpc-linux-gnu-)
+CC := $(CROSS)gcc
+LD := $(CROSS)ld
+OBJCOPY := $(CROSS)objcopy
 EXTRA_CFLAGS += -mcpu=power4
 
 %.o: %.S
-       $(call quiet-command, $(CC) $(EXTRA_CFLAGS) -c -o $@ $<,Assembling)
+       $(CC) $(EXTRA_CFLAGS) -c -o $@ $<
 
 %.o: %.c
-       $(call quiet-command, $(CC) $(EXTRA_CFLAGS) -c -fno-stack-protector -o 
$@ $<,Compiling)
+       $(CC) $(EXTRA_CFLAGS) -c -fno-stack-protector -o $@ $<
 
 vof.elf: entry.o main.o ci.o bootmem.o libc.o
-       $(call quiet-command, $(LD) -nostdlib -e_start -T$(SRC_DIR)/vof.lds -EB 
-o $@ $^,Linking)
+       $(LD) -nostdlib -e_start -Tvof.lds -EB -o $@ $^
 
 %.bin: %.elf
-       $(call quiet-command, $(OBJCOPY) -O binary -j .text -j .data -j .toc -j 
.got2 $^ $@,Extracting raw object)
+       $(OBJCOPY) -O binary -j .text -j .data -j .toc -j .got2 $^ $@
 
 clean:
        rm -f *.o vof.bin vof.elf *~
-- 
2.43.0


Reply via email to