Every time we run make in a v3 tree, lar, lzma, nrv2b and the option

table get rebuilt unconditionally due to slightly incorrect
dependencies.
That's wasteful and may hide other dependency bugs.
Fix the lar, lzma, nrv2b and option table dependencies.

This trims down recompilation time a lot. The only remaining stuff being
rebuilt is:
~/corebootv3-better_dependencies> make
  CP      build/config.h
  GEN     build/build.h
  LAR     build/coreboot.rom
  PAYLOAD none (as specified by user)
  CP      build/bios.bin
  DONE

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>


git-svn-id: svn://coreboot.org/repository/coreboot-v3@984 f3766cd6-281f-0410-b1cd-43a5c92072e9
This commit is contained in:
Carl-Daniel Hailfinger 2008-11-06 13:59:14 +00:00
parent f3e9e1dd35
commit 9bf25a9c08
4 changed files with 12 additions and 11 deletions

View file

@ -19,16 +19,17 @@
##
LAROBJ := lar.o stream.o lib.o
LARDIR := lardir
LARDIR := $(obj)/util/lar/
COMPRESSOR := $(LZMA_OBJ) $(obj)/util/lzma/lzma-compress.o
LARDIR += lzmadir
LARDIR += $(obj)/util/lzma/
COMPRESSOR += $(obj)/util/nrv2b/nrv2b-compress.o
LARDIR += nrv2bdir
LARDIR += $(obj)/util/nrv2b/
LAROBJ_ABS := $(patsubst %,$(obj)/util/lar/%,$(LAROBJ))
lardir:
$(obj)/util/lar/:
$(Q)printf " BUILD LAR\n"
$(Q)mkdir -p $(obj)/util/lar

View file

@ -23,13 +23,13 @@ LZMA_OBJ += $(obj)/util/lzma/RangeCoderBit.o $(obj)/util/lzma/StreamUtils.o
LZMA_OBJ += $(obj)/util/lzma/OutBuffer.o $(obj)/util/lzma/Alloc.o
LZMA_OBJ += $(obj)/util/lzma/CRC.o
$(obj)/util/lzma/lzma: lzmadir $(LZMA_OBJ) $(obj)/util/lzma/minilzma.o
$(obj)/util/lzma/lzma: $(obj)/util/lzma/ $(LZMA_OBJ) $(obj)/util/lzma/minilzma.o
$(Q)$(HOSTCXX) $(HOSTCXXFLAGS) -o $@ $(LZMA_OBJ) $(obj)/util/lzma/minilzma.o
$(obj)/util/lzma/lzma-compress.o: $(src)/util/lzma/minilzma.cc
$(Q)$(HOSTCXX) $(HOSTCXXFLAGS) -o $@ -c -DCOMPACT $<
lzmadir:
$(obj)/util/lzma/:
$(Q)printf " BUILD LZMA\n"
$(Q)mkdir -p $(obj)/util/lzma/

View file

@ -19,15 +19,15 @@
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
##
$(obj)/util/nrv2b/nrv2b: nrv2bdir $(src)/util/nrv2b/nrv2b.c
$(obj)/util/nrv2b/nrv2b: $(obj)/util/nrv2b/ $(src)/util/nrv2b/nrv2b.c
$(Q)printf " HOSTCC $(subst $(shell pwd)/,,$(@))\n"
$(Q)$(HOSTCC) $(HOSTCFLAGS) -DENCODE -DDECODE -DMAIN -DVERBOSE -DNDEBUG -DBITSIZE=32 -DENDIAN=0 -o $@ $(src)/util/nrv2b/nrv2b.c
$(obj)/util/nrv2b/nrv2b-compress.o: nrv2bdir $(src)/util/nrv2b/nrv2b.c
$(obj)/util/nrv2b/nrv2b-compress.o: $(obj)/util/nrv2b/ $(src)/util/nrv2b/nrv2b.c
$(Q)printf " HOSTCC $(subst $(shell pwd)/,,$(@))\n"
$(Q)$(HOSTCC) $(HOSTCFLAGS) -DENCODE -DDECODE -DVERBOSE -DCOMPACT -DNDEBUG -DBITSIZE=32 -DENDIAN=0 -c -o $@ $(src)/util/nrv2b/nrv2b.c
nrv2bdir:
$(obj)/util/nrv2b/:
$(Q)printf " BUILD NRV2B\n"
$(Q)mkdir -p $(obj)/util/nrv2b/

View file

@ -21,11 +21,11 @@
OPTIONS_OBJ := $(obj)/util/options/build_opt_tbl.o
$(obj)/util/options/build_opt_tbl: optionsdir $(OPTIONS_OBJ)
$(obj)/util/options/build_opt_tbl: $(obj)/util/options/ $(OPTIONS_OBJ)
$(Q)printf " HOSTCC $(subst $(shell pwd)/,,$(@))\n"
$(Q)$(HOSTCC) $(HOSTCFLAGS) -o $@ $(OPTIONS_OBJ)
optionsdir:
$(obj)/util/options/:
$(Q)mkdir -p $(obj)/util/options/
$(obj)/util/options/%.o: $(src)/util/options/%.c