summaryrefslogtreecommitdiff
path: root/util/kconfig/Makefile.inc
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2019-11-22 16:54:17 +0100
committerPatrick Georgi <pgeorgi@google.com>2019-11-27 23:27:29 +0000
commit3e8ef1028dc92d2f06f20e7f80db70002ba84841 (patch)
tree9ac25cc48cd414d2f2b41eed511168f965c55326 /util/kconfig/Makefile.inc
parentd492f01bf16e28cc55e64462e98ba7c99b1bb336 (diff)
downloadcoreboot-3e8ef1028dc92d2f06f20e7f80db70002ba84841.tar.xz
util/kconfig: Move coreboot specific changes into Makefile.inc
This eases maintenance of our kconfig fork. Change-Id: Ia4bc0bf22e66457356b9f8fcbea9412792495bca Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37151 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'util/kconfig/Makefile.inc')
-rw-r--r--util/kconfig/Makefile.inc27
1 files changed, 27 insertions, 0 deletions
diff --git a/util/kconfig/Makefile.inc b/util/kconfig/Makefile.inc
new file mode 100644
index 0000000000..27681f75a1
--- /dev/null
+++ b/util/kconfig/Makefile.inc
@@ -0,0 +1,27 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+# Early configuration of coreboot specific changes
+Kconfig ?= src/Kconfig
+
+# Include verbatim Makefile
+include $(dir $(lastword $(MAKEFILE_LIST)))Makefile
+
+# Extend Linux kconfig build rules
+
+# Support mingw by shipping our own regex implementation
+_OS=$(shell uname -s |cut -c-7)
+regex-objs=
+ifeq ($(_OS),MINGW32)
+ regex-objs=regex.o
+endif
+$(objk)/regex.o: $(srck)/regex.c
+ $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) -DHAVE_STRING_H -c -o $@ $<
+
+conf-objs += $(regex-objs)
+mconf-objs += $(regex-objs)
+
+# Provide tool to convert kconfig output into Ada format
+$(objk)/toada: $(objk)/toada.o
+ $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) -o $@ $^
+$(objk)/toada.o: $(srck)/toada.c
+ $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) -c -o $@ $<