summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorMartin Roth <martin@coreboot.org>2021-02-14 15:04:12 -0700
committerPatrick Georgi <pgeorgi@google.com>2021-02-25 10:03:11 +0000
commit2ae89398aad0da6c6ea8ee2e0d9534e335ebf680 (patch)
tree46aa83d82474e3b29e3a59f82964246b34601290 /util
parent92f447aa929df28ecb41463032746ba54db3b526 (diff)
downloadcoreboot-2ae89398aad0da6c6ea8ee2e0d9534e335ebf680.tar.xz
util/cbmem: Update Makefiles
- Add a help target - Add the -Wshadow option - Add a way to disable -Werror Signed-off-by: Martin Roth <martin@coreboot.org> Change-Id: Icd4e5cf51d60254d274c6e5093285cd49ff1607a Reviewed-on: https://review.coreboot.org/c/coreboot/+/50849 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'util')
-rw-r--r--util/cbmem/Makefile11
1 files changed, 9 insertions, 2 deletions
diff --git a/util/cbmem/Makefile b/util/cbmem/Makefile
index e67efaedae..a170875574 100644
--- a/util/cbmem/Makefile
+++ b/util/cbmem/Makefile
@@ -7,7 +7,8 @@ CC ?= $(CROSS_COMPILE)gcc
INSTALL ?= /usr/bin/env install
PREFIX ?= /usr/local
CFLAGS ?= -O2
-CFLAGS += -Wall -Wextra -Wmissing-prototypes -Werror
+WERROR=-Werror
+CFLAGS += -Wall -Wextra -Wmissing-prototypes -Wshadow $(WERROR)
CPPFLAGS += -I . -I $(ROOT)/commonlib/include -I $(ROOT)/commonlib/bsd/include
CPPFLAGS += -include $(ROOT)/commonlib/bsd/include/commonlib/bsd/compiler.h
@@ -29,6 +30,12 @@ distclean: clean
.dependencies:
@$(CC) $(CFLAGS) $(CPPFLAGS) -MM *.c > .dependencies
-.PHONY: all clean distclean
+help:
+ @echo "${PROGRAM}: View machine's cbmem contents"
+ @echo "Targets: all, clean, distclean, help, install"
+ @echo "To disable warnings as errors, run make as:"
+ @echo " make all WERROR=\"\""
+
+.PHONY: all clean distclean install help
-include .dependencies