build: Implement build pipeline

Signed-off-by: Chloe M. <chloe@mensia.org>
This commit is contained in:
Chloe M.
2026-06-21 23:29:51 +00:00
parent 994847a73e
commit 71de0c20b8
13 changed files with 361 additions and 0 deletions
+52
View File
@@ -0,0 +1,52 @@
#
# Copyright (c) 2026, Chloe M.
# Provided under the BSD-3 clause
#
# Description: Build flags and such
# Author: Chloe M.
#
PROMPT := printf "%s\t\t%s\n"
CC_PREFIX =
ifeq ($(ST_TARGET_ARCH), amd64)
CC_TARGET = x86_64-unknown-elf
else
CC_TARGET =
endif
CC = \
clang
LD = \
ld
SYS_CFLAGS = \
-nostdlib \
-nostdinc \
-ffreestanding \
-fexceptions \
-target $(CC_TARGET)\
-mcmodel=kernel \
-Wno-attributes \
-Wno-multichar \
-fno-stack-protector\
-D_ST_MULTICORE \
ifeq ($(ST_TARGET_ARCH),amd64)
SYS_CFLAGS += \
-mno-sse \
-mno-sse2 \
-mno-sse3 \
-mno-avx \
-mno-avx2 \
-mno-80387 \
-mno-3dnow \
-mno-mmx
endif
PASSDOWN_ARGS = \
ARCH=$(ST_TARGET_ARCH) \
SYS_CC=$(CC) \
SYS_LD=$(LD) \
SYS_CFLAGS="$(SYS_CFLAGS)"\
ARCH_TARGET=$(ARCH_TARGET)