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 <martin@coreboot.org>
Change-Id: Icd0cfd3e2579c9016ebb616e371d1076a5a171b4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/50650
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
Martin Roth 2021-02-13 22:50:13 -07:00 committed by Patrick Georgi
parent 90baf6a403
commit d509076044
1 changed files with 10 additions and 1 deletions

View File

@ -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