913e1718cd
It just doesn't work to have files depend on their parent directory: As soon as the files are written, the time stamp of the directory changes, too. This led to spurious updates of cbfstool and rmodtool, and related "permission denied" errors when linker and build system ran into each other. Change-Id: I44a7d7b4b1d47a1567ece1f57dfd6745d05ee651 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-on: http://review.coreboot.org/6276 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
48 lines
1.4 KiB
Makefile
48 lines
1.4 KiB
Makefile
cbfsobj :=
|
|
cbfsobj += cbfstool.o
|
|
cbfsobj += common.o
|
|
cbfsobj += compress.o
|
|
cbfsobj += cbfs_image.o
|
|
cbfsobj += cbfs-mkstage.o
|
|
cbfsobj += cbfs-mkpayload.o
|
|
cbfsobj += elfheaders.o
|
|
cbfsobj += xdr.o
|
|
cbfsobj += fit.o
|
|
# LZMA
|
|
cbfsobj += lzma.o
|
|
cbfsobj += LzFind.o
|
|
cbfsobj += LzmaDec.o
|
|
cbfsobj += LzmaEnc.o
|
|
# linux as payload
|
|
cbfsobj += linux_trampoline.o
|
|
cbfsobj += cbfs-payload-linux.o
|
|
|
|
rmodobj += rmodtool.o
|
|
rmodobj += rmodule.o
|
|
rmodobj += common.o
|
|
rmodobj += elfheaders.o
|
|
rmodobj += xdr.o
|
|
|
|
ifeq ($(shell uname -s | cut -c-7 2>/dev/null), MINGW32)
|
|
TOOLFLAGS+=-mno-ms-bitfields
|
|
endif
|
|
|
|
$(objutil)/cbfstool/%.o: $(top)/util/cbfstool/%.c
|
|
printf " HOSTCC $(subst $(objutil)/,,$(@))\n"
|
|
$(HOSTCC) $(TOOLFLAGS) $(HOSTCFLAGS) -c -o $@ $<
|
|
|
|
$(objutil)/cbfstool/%.o: $(top)/util/cbfstool/lzma/%.c
|
|
printf " HOSTCC $(subst $(objutil)/,,$(@))\n"
|
|
$(HOSTCC) $(TOOLFLAGS) $(HOSTCFLAGS) -c -o $@ $<
|
|
|
|
$(objutil)/cbfstool/%.o: $(top)/util/cbfstool/lzma/C/%.c
|
|
printf " HOSTCC $(subst $(objutil)/,,$(@))\n"
|
|
$(HOSTCC) $(TOOLFLAGS) $(HOSTCFLAGS) -c -o $@ $<
|
|
|
|
$(objutil)/cbfstool/cbfstool: $(addprefix $(objutil)/cbfstool/,$(cbfsobj))
|
|
printf " HOSTCC $(subst $(objutil)/,,$(@)) (link)\n"
|
|
$(HOSTCC) $(TOOLFLAGS) -o $@ $(addprefix $(objutil)/cbfstool/,$(cbfsobj))
|
|
|
|
$(objutil)/cbfstool/rmodtool: $(addprefix $(objutil)/cbfstool/,$(rmodobj))
|
|
printf " HOSTCC $(subst $(objutil)/,,$(@)) (link)\n"
|
|
$(HOSTCC) $(TOOLFLAGS) -o $@ $(addprefix $(objutil)/cbfstool/,$(rmodobj))
|