1 ## SPDX-License-Identifier: GPL-2.0-only
3 unexport $(COREBOOT_EXPORTS
)
9 srck
:= $(src
)/..
/..
/util
/kconfig
10 objk
:= $(src
)/build
/util
/kconfig
12 LIBPAYLOAD_DEFCONFIG ?
= $(src
)/..
/libpayload
/configs
/defconfig-tinycurses
14 PAYLOAD_DEPS
:= $(obj
)/config.h
16 OBJECTS
= cpuinfo_module.o cpuid.S.o pci_module.o coreboot_module.o \
17 nvram_module.o bootlog_module.o ramdump_module.o \
18 multiboot_module.o cbfs_module.o timestamps_module.o coreinfo.o
19 OBJS
= $(patsubst %,$(obj
)/%,$(OBJECTS
))
20 TARGET
= $(obj
)/coreinfo.elf
24 include ..
/libpayload
/Makefile.payload
26 ifeq ($(filter %clean,$(MAKECMDGOALS
)),)
27 export KERNELVERSION
:= 0.1.0
28 export KCONFIG_AUTOHEADER
:= $(obj
)/config.h
29 export KCONFIG_AUTOCONFIG
:= $(obj
)/auto.conf
30 export KCONFIG_DEPENDENCIES
:= $(obj
)/auto.conf.cmd
31 export KCONFIG_SPLITCONFIG
:= $(obj
)/config
32 export KCONFIG_TRISTATE
:= $(obj
)/tristate.conf
33 export KCONFIG_CONFIG
:= $(CURDIR
)/.config
34 export KCONFIG_NEGATIVES
:= 1
35 export KBUILD_KCONFIG
:= Kconfig
38 KBUILD_DEFCONFIG
:= configs
/defconfig
39 UNAME_RELEASE
:= $(shell uname
-r
)
40 HAVE_DOTCONFIG
:= $(wildcard .config
)
41 MAKEFLAGS
+= -rR
--no-print-directory
45 HOSTCFLAGS
:= -I
$(srck
) -I
$(objk
)
46 HOSTCXXFLAGS
:= -I
$(srck
) -I
$(objk
)
48 CFLAGS
+= -I
$(obj
) -I..
/..
/src
/commonlib
/include
50 ifneq ($(strip $(HAVE_DOTCONFIG
)),)
51 include $(src
)/.config
54 ifeq ($(CONFIG_LTO
),y
)
69 $(shell mkdir
-p
$(objk
)/lxdialog
$(KCONFIG_SPLITCONFIG
))
71 include $(srck
)/Makefile.mk
73 .PHONY
: $(PHONY
) prepare
all real-all defaultbuild