diff options
author | Ian Moffett <ian@osmora.org> | 2025-09-18 15:31:56 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-09-18 15:31:56 -0400 |
commit | a84c4e18ed47d015d2abbaa2a4411a64a0ade18f (patch) | |
tree | d9e0f792c817465ef72a7e2627f911fa8a925ac1 /src | |
parent | e633b7ef95c91ded3e849af0e622a4a98470ef0d (diff) |
build: Allow each subsystem to have their own conf
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile | 3 | ||||
-rw-r--r-- | src/sys/Makefile | 4 | ||||
-rw-r--r-- | src/sys/arch/amd64/Makefile | 3 | ||||
-rw-r--r-- | src/sys/os/Makefile | 3 |
4 files changed, 7 insertions, 6 deletions
diff --git a/src/Makefile b/src/Makefile index 270c65f..557bd73 100644 --- a/src/Makefile +++ b/src/Makefile @@ -11,7 +11,6 @@ BINUTILS_DIR := $(shell pwd)/cc/toolchain/build-binutils CC := $(shell pwd)/cc/gcc/bin/x86_64-pc-ethos-gcc LD := $(BINUTILS_DIR)/bin/x86_64-pc-ethos-ld AS := $(BINUTILS_DIR)/bin/x86_64-pc-ethos-as -CONF := $(shell cat sys/conf/GENERIC | tools/kconf/kconf) # QEMU emulator flags QEMU_FLAGS = --enable-kvm -serial stdio -cdrom $(ISO) \ @@ -22,7 +21,7 @@ all: root user sys lib image .PHONY: sys sys: - cd sys/; make CC=$(CC) AS=$(AS) LD=$(LD) TARGET=$(TARGET) CONF=$(CONF) + cd sys/; make CC=$(CC) AS=$(AS) LD=$(LD) TARGET=$(TARGET) TOOLS=$(shell pwd)/tools cp $(KBIN) root/boot/ .PHONY: user 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: |