build: Implement build pipeline
Signed-off-by: Chloe M. <chloe@mensia.org>
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user