From d509076044a353f89f2d6751e0cb8ee923ba4b2f Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Sat, 13 Feb 2021 22:50:13 -0700 Subject: util/amdfwtool: Clean up Makefile - Add method to disable warnings as errors - Add help target - Add phony targets to .PHONY BUG=None TEST=make all; make help; make all WERROR="" Signed-off-by: Martin Roth Change-Id: Icd0cfd3e2579c9016ebb616e371d1076a5a171b4 Reviewed-on: https://review.coreboot.org/c/coreboot/+/50650 Tested-by: build bot (Jenkins) Reviewed-by: Arthur Heymans --- util/amdfwtool/Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/util/amdfwtool/Makefile b/util/amdfwtool/Makefile index 2fd128d895..7b7793535a 100644 --- a/util/amdfwtool/Makefile +++ b/util/amdfwtool/Makefile @@ -5,7 +5,8 @@ HOSTCC ?= cc SRC = amdfwtool.c data_parse.c OBJ = $(SRC:%.c=%.o) TARGET = amdfwtool -CFLAGS=-O2 -Wall -Wextra -Wshadow -Werror +WERROR=-Werror +CFLAGS=-O2 -Wall -Wextra -Wshadow ${WERROR} all: $(TARGET) @@ -19,3 +20,11 @@ clean: @rm -f $(TARGET) $(OBJ) distclean: clean + +help: + @echo "${TARGET}: Create AMD Firmware combination" + @echo "Targets: all, clean, distclean, help" + @echo "To disable warnings as errors, run make as:" + @echo " make all WERROR=\"\"" + +.PHONY: all clean distclean help -- cgit v1.2.3