aboutsummaryrefslogtreecommitdiff
path: root/util/amdfwtool/Makefile.inc
diff options
context:
space:
mode:
authorZheng Bao <zheng.bao@amd.com>2020-09-29 17:32:36 +0800
committerFelix Held <felix-coreboot@felixheld.de>2020-10-05 08:37:28 +0000
commit7698a552027831a25c4c7c8d543d779ecd63e391 (patch)
treedcb2082bf12b995285327413c33ae898b60ad43e /util/amdfwtool/Makefile.inc
parent8725c0af0949e004f642786b106a4f1da49064ff (diff)
amdfwtool: Clean up the Makefile of amdfwtool
Add Makefile.inc to compliant with other tools. Makefile is kept for building amdfwtool by typing make in the folder. Change-Id: I3688d93de4459f5f838955892086b4b9bf30a9b8 Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/45286 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'util/amdfwtool/Makefile.inc')
-rw-r--r--util/amdfwtool/Makefile.inc12
1 files changed, 12 insertions, 0 deletions
diff --git a/util/amdfwtool/Makefile.inc b/util/amdfwtool/Makefile.inc
new file mode 100644
index 0000000000..2180fac361
--- /dev/null
+++ b/util/amdfwtool/Makefile.inc
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: BSD-3-Clause
+
+amdfwtoolobj = amdfwtool.o
+
+AMDFWTOOLCFLAGS=-O2 -Wall -Wextra -Wshadow
+
+$(objutil)/amdfwtool/%.o: $(top)/util/amdfwtool/%.c # $(HEADER)
+ $(HOSTCC) $(AMDFWTOOLCFLAGS) $(HOSTCFLAGS) -DCONFIG_ROM_SIZE=$(CONFIG_ROM_SIZE) -c -o $@ $<
+
+$(objutil)/amdfwtool/amdfwtool: $(addprefix $(objutil)/amdfwtool/,$(amdfwtoolobj))
+ printf " AMDFWTOOL\n"
+ $(HOSTCC) $(addprefix $(objutil)/amdfwtool/,$(amdfwtoolobj)) -o $@