Patrick Georgi | 3e8ef10 | 2019-11-22 16:54:17 +0100 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0-or-later |
| 2 | |
| 3 | # Early configuration of coreboot specific changes |
| 4 | Kconfig ?= src/Kconfig |
| 5 | |
| 6 | # Include verbatim Makefile |
| 7 | include $(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) |
| 13 | regex-objs= |
| 14 | ifeq ($(_OS),MINGW32) |
| 15 | regex-objs=regex.o |
| 16 | endif |
| 17 | $(objk)/regex.o: $(srck)/regex.c |
| 18 | $(HOSTCC) $(HOSTCFLAGS) $(HOST_EXTRACFLAGS) -DHAVE_STRING_H -c -o $@ $< |
| 19 | |
| 20 | conf-objs += $(regex-objs) |
| 21 | mconf-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 $@ $< |