e3df18451c
The .inc suffix is confusing to various tools as it's not specific to Makefiles. This means that editors don't recognize the files, and don't open them with highlighting and any other specific editor functionality. This issue is also seen in the release notes generation script where Makefiles get renamed before running cloc. The rest of the Makefiles will be renamed in following commits. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: Idaf69c6871d0bc1ee5e2e53157b8631c55eb3db9 Reviewed-on: https://review.coreboot.org/c/coreboot/+/80063 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
83 lines
1.8 KiB
Makefile
83 lines
1.8 KiB
Makefile
## SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
unexport $(COREBOOT_EXPORTS)
|
|
|
|
src := $(CURDIR)
|
|
obj := build
|
|
|
|
srctree := $(src)
|
|
srck := $(src)/../../util/kconfig
|
|
objk := $(src)/build/util/kconfig
|
|
|
|
LIBPAYLOAD_DEFCONFIG ?= $(src)/../libpayload/configs/defconfig-tinycurses
|
|
|
|
PAYLOAD_DEPS := $(obj)/config.h
|
|
|
|
OBJECTS = cpuinfo_module.o cpuid.S.o pci_module.o coreboot_module.o \
|
|
nvram_module.o bootlog_module.o ramdump_module.o \
|
|
multiboot_module.o cbfs_module.o timestamps_module.o coreinfo.o
|
|
OBJS = $(patsubst %,$(obj)/%,$(OBJECTS))
|
|
TARGET = $(obj)/coreinfo.elf
|
|
|
|
ARCH := x86_32
|
|
|
|
all: real-all
|
|
|
|
include ../libpayload/Makefile.payload
|
|
|
|
ifeq ($(filter %clean,$(MAKECMDGOALS)),)
|
|
export KERNELVERSION := 0.1.0
|
|
export KCONFIG_AUTOHEADER := $(obj)/config.h
|
|
export KCONFIG_AUTOCONFIG := $(obj)/auto.conf
|
|
export KCONFIG_DEPENDENCIES := $(obj)/auto.conf.cmd
|
|
export KCONFIG_SPLITCONFIG := $(obj)/config
|
|
export KCONFIG_TRISTATE := $(obj)/tristate.conf
|
|
export KCONFIG_CONFIG := $(CURDIR)/.config
|
|
export KCONFIG_NEGATIVES := 1
|
|
export KBUILD_KCONFIG := Kconfig
|
|
|
|
CONFIG_SHELL := sh
|
|
KBUILD_DEFCONFIG := configs/defconfig
|
|
UNAME_RELEASE := $(shell uname -r)
|
|
HAVE_DOTCONFIG := $(wildcard .config)
|
|
MAKEFLAGS += -rR --no-print-directory
|
|
|
|
HOSTCC ?= gcc
|
|
HOSTCXX ?= g++
|
|
HOSTCFLAGS := -I$(srck) -I$(objk)
|
|
HOSTCXXFLAGS := -I$(srck) -I$(objk)
|
|
|
|
CFLAGS += -I$(obj) -I../../src/commonlib/include
|
|
|
|
ifneq ($(strip $(HAVE_DOTCONFIG)),)
|
|
include $(src)/.config
|
|
real-all: $(TARGET)
|
|
|
|
ifeq ($(CONFIG_LTO),y)
|
|
CFLAGS += -flto
|
|
endif
|
|
|
|
else
|
|
real-all: config
|
|
endif
|
|
|
|
defaultbuild:
|
|
$(MAKE) olddefconfig
|
|
$(MAKE) all
|
|
|
|
$(obj)/config.h:
|
|
$(MAKE) oldconfig
|
|
|
|
$(shell mkdir -p $(objk)/lxdialog $(KCONFIG_SPLITCONFIG))
|
|
|
|
include $(srck)/Makefile.mk
|
|
|
|
.PHONY: $(PHONY) prepare all real-all defaultbuild
|
|
|
|
else
|
|
|
|
distclean: clean
|
|
rm -f .config*
|
|
|
|
.PHONY: distclean
|
|
endif
|