From a84c4e18ed47d015d2abbaa2a4411a64a0ade18f Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 18 Sep 2025 15:31:56 -0400 Subject: build: Allow each subsystem to have their own conf Signed-off-by: Ian Moffett --- src/sys/Makefile | 4 ++-- src/sys/arch/amd64/Makefile | 3 ++- src/sys/os/Makefile | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src/sys') 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: -- cgit v1.2.3