diff options
author | Karthikeyan Ramasubramanian <kramasub@google.com> | 2023-09-29 17:35:22 +0000 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-10-10 13:41:07 +0000 |
commit | ff63106decc6ee78dacea8598dc048a6a4495832 (patch) | |
tree | 1f5ccbd1a7ccfaa50cc50fee8761a4b85cfd7afb /util/amdfwtool/Makefile | |
parent | e486082dfb1658b0916915bc944c1d3266862423 (diff) |
util/amdfwtool: Check for pkg-config presence
Check for pkg-config presence and fail out with actionable message.
BUG=b:302521446
TEST=Build successfully with working pkg-config and failed build with no
pkg-config
Change-Id: I5d604145c919e7f71680d1e095dc68cb21868319
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78191
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Diffstat (limited to 'util/amdfwtool/Makefile')
-rw-r--r-- | util/amdfwtool/Makefile | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/util/amdfwtool/Makefile b/util/amdfwtool/Makefile index e9bc1ab761..9392f02fed 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) |