cbfstool/Makefile*: Use LDFLAGS
instead of LINKFLAGS
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>
This commit is contained in:
parent
58649b058b
commit
6548ae9f99
util/cbfstool
@ -7,7 +7,7 @@ CFLAGS += -std=c99 -Werror -Wall -Wextra
|
|||||||
CFLAGS += -Wcast-qual -Wmissing-prototypes -Wredundant-decls -Wshadow
|
CFLAGS += -Wcast-qual -Wmissing-prototypes -Wredundant-decls -Wshadow
|
||||||
CFLAGS += -Wstrict-prototypes -Wwrite-strings
|
CFLAGS += -Wstrict-prototypes -Wwrite-strings
|
||||||
CPPFLAGS += -D_POSIX_C_SOURCE=200809L # strdup() from string.h
|
CPPFLAGS += -D_POSIX_C_SOURCE=200809L # strdup() from string.h
|
||||||
LINKFLAGS += -g3
|
LDFLAGS += -g3
|
||||||
|
|
||||||
CBFSTOOL_BINARY:=$(obj)/cbfstool
|
CBFSTOOL_BINARY:=$(obj)/cbfstool
|
||||||
CBFSTOOL_COMMON:=common.o cbfs_image.o compress.o fit.o
|
CBFSTOOL_COMMON:=common.o cbfs_image.o compress.o fit.o
|
||||||
@ -30,7 +30,7 @@ all: .dependencies $(CBFSTOOL_BINARY) $(RMODTOOL_BINARY)
|
|||||||
|
|
||||||
$(obj)/%: $(obj)/%.o
|
$(obj)/%: $(obj)/%.o
|
||||||
mkdir -p $(dir $@)
|
mkdir -p $(dir $@)
|
||||||
$(HOSTCC) $(LINKFLAGS) -o $@ $^ $(LDLIBS)
|
$(HOSTCC) $(LDFLAGS) -o $@ $^ $(LDLIBS)
|
||||||
$(obj)/%.o: %.c
|
$(obj)/%.o: %.c
|
||||||
mkdir -p $(dir $@)
|
mkdir -p $(dir $@)
|
||||||
$(HOSTCC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
|
$(HOSTCC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
|
||||||
|
@ -28,7 +28,7 @@ TOOLCFLAGS ?= -std=c99 -Werror -Wall -Wextra
|
|||||||
TOOLCFLAGS += -Wcast-qual -Wmissing-prototypes -Wredundant-decls -Wshadow
|
TOOLCFLAGS += -Wcast-qual -Wmissing-prototypes -Wredundant-decls -Wshadow
|
||||||
TOOLCFLAGS += -Wstrict-prototypes -Wwrite-strings
|
TOOLCFLAGS += -Wstrict-prototypes -Wwrite-strings
|
||||||
TOOLCPPFLAGS ?= -D_POSIX_C_SOURCE=200809L # strdup() from string.h
|
TOOLCPPFLAGS ?= -D_POSIX_C_SOURCE=200809L # strdup() from string.h
|
||||||
TOOLLINKFLAGS ?=
|
TOOLLDFLAGS ?=
|
||||||
|
|
||||||
ifeq ($(shell uname -s | cut -c-7 2>/dev/null), MINGW32)
|
ifeq ($(shell uname -s | cut -c-7 2>/dev/null), MINGW32)
|
||||||
TOOLFLAGS+=-mno-ms-bitfields
|
TOOLFLAGS+=-mno-ms-bitfields
|
||||||
@ -48,11 +48,11 @@ $(objutil)/cbfstool/%.o: $(top)/util/cbfstool/lzma/C/%.c
|
|||||||
|
|
||||||
$(objutil)/cbfstool/cbfstool: $(addprefix $(objutil)/cbfstool/,$(cbfsobj))
|
$(objutil)/cbfstool/cbfstool: $(addprefix $(objutil)/cbfstool/,$(cbfsobj))
|
||||||
printf " HOSTCC $(subst $(objutil)/,,$(@)) (link)\n"
|
printf " HOSTCC $(subst $(objutil)/,,$(@)) (link)\n"
|
||||||
$(HOSTCC) $(TOOLLINKFLAGS) -o $@ $(addprefix $(objutil)/cbfstool/,$(cbfsobj))
|
$(HOSTCC) $(TOOLLDFLAGS) -o $@ $(addprefix $(objutil)/cbfstool/,$(cbfsobj))
|
||||||
|
|
||||||
$(objutil)/cbfstool/rmodtool: $(addprefix $(objutil)/cbfstool/,$(rmodobj))
|
$(objutil)/cbfstool/rmodtool: $(addprefix $(objutil)/cbfstool/,$(rmodobj))
|
||||||
printf " HOSTCC $(subst $(objutil)/,,$(@)) (link)\n"
|
printf " HOSTCC $(subst $(objutil)/,,$(@)) (link)\n"
|
||||||
$(HOSTCC) $(TOOLLINKFLAGS) -o $@ $(addprefix $(objutil)/cbfstool/,$(rmodobj))
|
$(HOSTCC) $(TOOLLDFLAGS) -o $@ $(addprefix $(objutil)/cbfstool/,$(rmodobj))
|
||||||
|
|
||||||
# Tolerate lzma sdk warnings
|
# Tolerate lzma sdk warnings
|
||||||
$(objutil)/cbfstool/LzmaEnc.o: TOOLCFLAGS += -Wno-sign-compare -Wno-cast-qual
|
$(objutil)/cbfstool/LzmaEnc.o: TOOLCFLAGS += -Wno-sign-compare -Wno-cast-qual
|
||||||
|
Loading…
x
Reference in New Issue
Block a user