aboutsummaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-05-17 13:18:01 -0400
committerIan Moffett <ian@osmora.org>2024-05-17 13:18:01 -0400
commitd164ed5baac60f21e0435ae49d20009ee8cd6dc1 (patch)
treefbb4b9ae732c7a3b99723fe4f34449db78a524f2 /Makefile.in
parent406d49ec0346e4c8a55109fd698e8364f16cfada (diff)
build: Introduce kconf for kernel configuration
The kernel will be configured by a per-arch config file. The config file for the AMD64 port exists at sys/arch/amd64/conf/GENERIC Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in30
1 files changed, 4 insertions, 26 deletions
diff --git a/Makefile.in b/Makefile.in
index 331554d..37f1e98 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,40 +1,18 @@
.SILENT:
-
-###############################
-# Feature stuff
-###############################
-override SPECTRE_MITIGATION = @SPECTRE_MITIGATION@
-override SERIAL_DEBUG = @SERIAL_DEBUG@
-
-ifeq ($(SPECTRE_MITIGATION), 1)
- override SPECTRE_FLAGS=-D__SPECTRE_MITIGATION
-else
- override SPECTRE_FLAGS=
-endif
-
-ifeq ($(SERIAL_DEBUG), 1)
- override SERIAL_DEBUG_FLAGS=-D__SERIAL_DEBUG
-else
- override SERIAL_DEBUG_FLAGS=
-endif
-
-
###############################
# CFLAGS, QEMU flags + misc
###############################
override ARCH = @ARCH@
override HYRA_VERSION = @PACKAGE_VERSION@
override PROMPT := printf "%s\t\t%s\n"
-override KERNEL_DEFINES = -DHYRA_VERSION="\"$(HYRA_VERSION)\""\
- -DHYRA_BUILDDATE="\"@HYRA_BUILDDATE@\""\
- -DHYRA_BUILDBRANCH="\"@HYRA_BUILDBRANCH@\""\
- -DHYRA_ARCH="\"@ARCH@\""\
- $(SPECTRE_FLAGS)\
- $(SERIAL_DEBUG_FLAGS)
override KERNEL_CFLAGS = @KERNEL_CFLAGS@ $(KERNEL_DEFINES)
override KERNEL_LDFLAGS = -nostdlib -znoexecstack -zmax-page-size=0x1000 -static -Tconf/link-$(ARCH).ld
override QEMU_FLAGS = @QEMU_FLAGS@
+override KERNEL_DEFINES = $ -DHYRA_VERSION="\"$(HYRA_VERSION)\""\
+ -DHYRA_BUILDDATE="\"@HYRA_BUILDDATE@\""\
+ -DHYRA_BUILDBRANCH="\"@HYRA_BUILDBRANCH@\""\
+ -DHYRA_ARCH="\"@ARCH@\"" $(shell cat sys/arch/$(ARCH)/conf/GENERIC | tools/kconf/kconf)
######################
# Binutils stuff