6548ae9f99
Commit 0e53931f
(cbfstool: Clean up in preparation for adding new
files) split out the flags and introduced the variable `LINKFLAGS`.
Rename it to `LDFLAGS` which is more commonly used.
Change-Id: Ib6299f8ef5cf30dbe05bfae36f30ae4371f0a738
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: http://review.coreboot.org/10064
Tested-by: build bot (Jenkins)
Reviewed-by: Sol Boucher <solb@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
58 lines
1.9 KiB
Makefile
58 lines
1.9 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 :=
|
|
rmodobj += rmodtool.o
|
|
rmodobj += rmodule.o
|
|
rmodobj += common.o
|
|
rmodobj += elfheaders.o
|
|
rmodobj += xdr.o
|
|
|
|
TOOLCFLAGS ?= -std=c99 -Werror -Wall -Wextra
|
|
TOOLCFLAGS += -Wcast-qual -Wmissing-prototypes -Wredundant-decls -Wshadow
|
|
TOOLCFLAGS += -Wstrict-prototypes -Wwrite-strings
|
|
TOOLCPPFLAGS ?= -D_POSIX_C_SOURCE=200809L # strdup() from string.h
|
|
TOOLLDFLAGS ?=
|
|
|
|
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) $(TOOLCPPFLAGS) $(TOOLCFLAGS) $(HOSTCFLAGS) -c -o $@ $<
|
|
|
|
$(objutil)/cbfstool/%.o: $(top)/util/cbfstool/lzma/%.c
|
|
printf " HOSTCC $(subst $(objutil)/,,$(@))\n"
|
|
$(HOSTCC) $(TOOLCPPFLAGS) $(TOOLCFLAGS) $(HOSTCFLAGS) -c -o $@ $<
|
|
|
|
$(objutil)/cbfstool/%.o: $(top)/util/cbfstool/lzma/C/%.c
|
|
printf " HOSTCC $(subst $(objutil)/,,$(@))\n"
|
|
$(HOSTCC) $(TOOLCPPFLAGS) $(TOOLCFLAGS) $(HOSTCFLAGS) -c -o $@ $<
|
|
|
|
$(objutil)/cbfstool/cbfstool: $(addprefix $(objutil)/cbfstool/,$(cbfsobj))
|
|
printf " HOSTCC $(subst $(objutil)/,,$(@)) (link)\n"
|
|
$(HOSTCC) $(TOOLLDFLAGS) -o $@ $(addprefix $(objutil)/cbfstool/,$(cbfsobj))
|
|
|
|
$(objutil)/cbfstool/rmodtool: $(addprefix $(objutil)/cbfstool/,$(rmodobj))
|
|
printf " HOSTCC $(subst $(objutil)/,,$(@)) (link)\n"
|
|
$(HOSTCC) $(TOOLLDFLAGS) -o $@ $(addprefix $(objutil)/cbfstool/,$(rmodobj))
|
|
|
|
# Tolerate lzma sdk warnings
|
|
$(objutil)/cbfstool/LzmaEnc.o: TOOLCFLAGS += -Wno-sign-compare -Wno-cast-qual
|