stos: init: Add kernel C entry

Signed-off-by: Chloe M. <chloe@mensia.org>
This commit is contained in:
Chloe M.
2026-06-22 00:43:03 +00:00
parent d46ce89f83
commit 6f222ae96c
5 changed files with 56 additions and 2 deletions
+31
View File
@@ -0,0 +1,31 @@
#
# Copyright (c) 2026, Chloe M.
# Provided under the BSD-3 clause
#
# Description: OS core build script
# Author: Chloe M.
#
.SILENT:
include ../../mk/stos.mk
CFILES = $(shell find ../init -name "*.c")
DFILES = $(CFILES:.c=.d)
OFILES = $(CFILES:.c=.o)
CFLAGS = \
$(SYS_CFLAGS) \
-MMD \
-D_KERNEL \
-MMD \
-DPRINTF_DISABLE_SUPPORT_PTRDIFF_T \
-DPRINTF_DISABLE_SUPPORT_FLOAT \
-I../head \
-I$(ST_PROJECT_ROOT)/sdk/head
.PHONY: all
all: $(OFILES)
%.o: %.c
$(PROMPT) "CC" $<
$(SYS_CC) -c $(CFLAGS) $< -o $@