summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util/amdfwtool/Makefile2
-rw-r--r--util/amdfwtool/Makefile.inc1
-rw-r--r--util/amdfwtool/amdfwtool.h1
3 files changed, 4 insertions, 0 deletions
diff --git a/util/amdfwtool/Makefile b/util/amdfwtool/Makefile
index bdc3dc3432..e0ce3b76ab 100644
--- a/util/amdfwtool/Makefile
+++ b/util/amdfwtool/Makefile
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: BSD-3-Clause
+top ?= $(abspath ../..)
HOSTCC ?= cc
READ_SRC = amdfwread.c
@@ -10,6 +11,7 @@ HEADER=amdfwtool.h
TARGETS = amdfwread amdfwtool
WERROR=-Werror
CFLAGS=-O2 -Wall -Wextra -Wshadow ${WERROR}
+CFLAGS += -I $(top)/src/commonlib/bsd/include
all: $(TARGETS)
diff --git a/util/amdfwtool/Makefile.inc b/util/amdfwtool/Makefile.inc
index 4b7db76e4d..d45d273c45 100644
--- a/util/amdfwtool/Makefile.inc
+++ b/util/amdfwtool/Makefile.inc
@@ -3,6 +3,7 @@
amdfwtoolobj = amdfwtool.o data_parse.o
AMDFWTOOLCFLAGS=-O2 -Wall -Wextra -Wshadow -Werror
+AMDFWTOOLCFLAGS += -I $(top)/src/commonlib/bsd/include
$(objutil)/amdfwtool/%.o: $(top)/util/amdfwtool/%.c # $(HEADER)
$(HOSTCC) $(AMDFWTOOLCFLAGS) $(HOSTCFLAGS) -c -o $@ $<
diff --git a/util/amdfwtool/amdfwtool.h b/util/amdfwtool/amdfwtool.h
index 027a8f30f3..6b13edcb79 100644
--- a/util/amdfwtool/amdfwtool.h
+++ b/util/amdfwtool/amdfwtool.h
@@ -3,6 +3,7 @@
#ifndef _AMD_FW_TOOL_H_
#define _AMD_FW_TOOL_H_
+#include <commonlib/bsd/compiler.h>
#include <stdint.h>
#include <stdbool.h>