summaryrefslogtreecommitdiff
path: root/src/sys
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-09-18 15:31:56 -0400
committerIan Moffett <ian@osmora.org>2025-09-18 15:31:56 -0400
commita84c4e18ed47d015d2abbaa2a4411a64a0ade18f (patch)
treed9e0f792c817465ef72a7e2627f911fa8a925ac1 /src/sys
parente633b7ef95c91ded3e849af0e622a4a98470ef0d (diff)
build: Allow each subsystem to have their own conf
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'src/sys')
-rw-r--r--src/sys/Makefile4
-rw-r--r--src/sys/arch/amd64/Makefile3
-rw-r--r--src/sys/os/Makefile3
3 files changed, 6 insertions, 4 deletions
diff --git a/src/sys/Makefile b/src/sys/Makefile
index 78c3762..8ab7999 100644
--- a/src/sys/Makefile
+++ b/src/sys/Makefile
@@ -10,11 +10,11 @@ all: os lib md
.PHONY: os
os:
- cd os; make CC=$(CC) LD=$(LD) AS=$(AS) TARGETDIR=$(TARGETDIR) CONF=$(CONF)
+ cd os; make CC=$(CC) LD=$(LD) AS=$(AS) TARGETDIR=$(TARGETDIR) TOOLS=$(TOOLS)
.PHONY: md
md:
- cd $(TARGETDIR); make CC=$(CC) LD=$(LD) AS=$(AS) CONF=$(CONF)
+ cd $(TARGETDIR); make CC=$(CC) LD=$(LD) AS=$(AS) TOOLS=$(TOOLS)
.PHONY: clean
clean:
diff --git a/src/sys/arch/amd64/Makefile b/src/sys/arch/amd64/Makefile
index 1eae962..a8561c5 100644
--- a/src/sys/arch/amd64/Makefile
+++ b/src/sys/arch/amd64/Makefile
@@ -2,9 +2,10 @@ include ../../conf/sys.mk
override PROMPT := printf "%s\t\t%s\n"
+CONF := $(shell cat conf/GENERIC | $(TOOLS)/kconf/kconf)
TARGET_BIN = ../../l5
TARGET_INC = -I../../target/header/
-CFLAGS = -I../../include/ -I../../include/lib/ $(TARGET_INC) $(MI_CFLAGS) $(MD_CFLAGS) $(CONF)
+CFLAGS = -I../../include/ -I../../include/lib/ $(TARGET_INC) $(MI_CFLAGS) $(MD_CFLAGS)
CFILES = $(shell find . -name "*.c")
ASMFILES = $(shell find . -name "*.S")
diff --git a/src/sys/os/Makefile b/src/sys/os/Makefile
index 693c008..ed8ac6e 100644
--- a/src/sys/os/Makefile
+++ b/src/sys/os/Makefile
@@ -3,6 +3,7 @@ include ../conf/sys.mk
.SILENT:
override PROMPT := printf "%s\t\t%s\n"
+CONF := $(shell cat ../conf/GENERIC | $(TOOLS)/kconf/kconf)
TARGET_LIB = ../target/libkern.a
CFLAGS = -I../include/ -I../include/lib/ -I../target/header/ $(MI_CFLAGS) -O0 $(CONF)
CFILES = $(shell find . -name "*.c")
@@ -22,7 +23,7 @@ all: $(OBJECTS)
-include $(DEPS)
%.o: %.c
$(PROMPT) " MI.CC " $<
- $(CC) -c $(CFLAGS) $< -o $@
+ $(CC) -c $(CFLAGS) $(CONF) $< -o $@
.PHONY: clean
clean: