summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--util/amdfwtool/Makefile5
-rw-r--r--util/amdfwtool/Makefile.inc5
2 files changed, 8 insertions, 2 deletions
diff --git a/util/amdfwtool/Makefile b/util/amdfwtool/Makefile
index e9bc1ab761e7..9392f02fed07 100644
--- a/util/amdfwtool/Makefile
+++ b/util/amdfwtool/Makefile
@@ -14,7 +14,7 @@ TOOL_OBJ = $(TOOL_SRC:%.c=%.o)
HEADER=amdfwtool.h
TARGETS = amdfwread amdfwtool
WERROR=-Werror
-CFLAGS=-O2 -Wall -Wextra -Wshadow ${WERROR}
+CFLAGS :=-O2 -Wall -Wextra -Wshadow ${WERROR}
CFLAGS += -I $(top)/src/commonlib/bsd/include
CFLAGS += -D_GNU_SOURCE # memmem() from string.h
@@ -24,6 +24,9 @@ else
HOSTPKGCONFIG ?= pkg-config
endif
CFLAGS += $(shell $(HOSTPKGCONFIG) --cflags libcrypto)
+ifneq ($(.SHELLSTATUS),0)
+$(error "Ensure that pkg-config is installed.")
+endif
LDFLAGS += $(shell $(HOSTPKGCONFIG) --libs libcrypto)
all: $(TARGETS)
diff --git a/util/amdfwtool/Makefile.inc b/util/amdfwtool/Makefile.inc
index 067a137090b3..6a83cb926552 100644
--- a/util/amdfwtool/Makefile.inc
+++ b/util/amdfwtool/Makefile.inc
@@ -3,13 +3,16 @@
amdfwtoolobj = amdfwtool.o data_parse.o signed_psp.o handle_file.o
amdfwreadobj = amdfwread.o
-AMDFWTOOLCFLAGS=-O2 -Wall -Wextra -Wshadow -Werror
+AMDFWTOOLCFLAGS :=-O2 -Wall -Wextra -Wshadow -Werror
AMDFWTOOLCFLAGS += -I $(top)/src/commonlib/bsd/include
AMDFWTOOLCFLAGS += -D_GNU_SOURCE # memmem() from string.h
HOSTPKGCONFIG ?= pkg-config
AMDFWTOOLCFLAGS += $(shell $(HOSTPKGCONFIG) --cflags libcrypto)
+ifneq ($(.SHELLSTATUS),0)
+$(error "Ensure that pkg-config is installed.")
+endif
LDFLAGS += $(shell $(HOSTPKGCONFIG) --libs libcrypto)
$(objutil)/amdfwtool/%.o: $(top)/util/amdfwtool/%.c # $(HEADER)