blob: 27681f75a144a28945d98d115f7e973e93983075 [file] [log] [blame]
Patrick Georgi3e8ef102019-11-22 16:54:17 +01001# SPDX-License-Identifier: GPL-2.0-or-later
2
3# Early configuration of coreboot specific changes
4Kconfig ?= src/Kconfig
5
6# Include verbatim Makefile
7include $(dir $(lastword $(MAKEFILE_LIST)))Makefile
8
9# Extend Linux kconfig build rules
10
11# Support mingw by shipping our own regex implementation
12_OS=$(shell uname -s |cut -c-7)
13regex-objs=
14ifeq ($(_OS),MINGW32)
15 regex-objs=regex.o
16endif
17$(objk)/regex.o: $(srck)/regex.c
18 $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) -DHAVE_STRING_H -c -o $@ $<
19
20conf-objs += $(regex-objs)
21mconf-objs += $(regex-objs)
22
23# Provide tool to convert kconfig output into Ada format
24$(objk)/toada: $(objk)/toada.o
25 $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) -o $@ $^
26$(objk)/toada.o: $(srck)/toada.c
27 $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) -c -o $@ $<