Rewrite init app in C, introduce MSL (MOP3 System Library)
All checks were successful
Build documentation / build-and-deploy (push) Successful in 35s

This commit is contained in:
2026-01-04 01:11:31 +01:00
parent 2c954a9ca9
commit e077d322f4
57 changed files with 214 additions and 120 deletions

9
make/apps.mk Normal file
View File

@@ -0,0 +1,9 @@
apps := init
all_apps:
@for d in $(apps); do make -C $$d platform=$(platform) all; done
clean_apps:
@for d in $(apps); do make -C $$d platform=$(platform) clean; done
.PHONY: all_apps clean_apps

8
make/dist.mk Normal file
View File

@@ -0,0 +1,8 @@
exe := $(foreach d,$(apps),$(wildcard $(d)/*.exe))
all_dist: mop3dist.tar
mop3dist.tar:
tar -cf $@ --transform='s|.*/||' $(exe)
.PHONY: all_dist

7
make/docs.mk Normal file
View File

@@ -0,0 +1,7 @@
doxygen_kernel:
make -C kernel platform=$(platform) doxygen
docs: doxygen_kernel
mkdocs build
.PHONY: docs doxygen_kernel

10
make/kernel.mk Normal file
View File

@@ -0,0 +1,10 @@
all_kernel:
make -C kernel platform=$(platform) all
clean_kernel:
make -C kernel platform=$(platform) clean
format_kernel:
make -C kernel platform=$(platform) format
.PHONY: all_kernel clean_kernel format_kernel

10
make/libc.mk Normal file
View File

@@ -0,0 +1,10 @@
all_libmsl:
make -C libmsl platform=$(platform) all
clean_libmsl:
make -C libmsl platform=$(platform) clean
format_libmsl:
make -C libmsl platform=$(platform) format
.PHONY: all_libmsl clean_libmsl

26
make/user.mk Normal file
View File

@@ -0,0 +1,26 @@
cc := clang
o :=
c :=
ldflags := -L ../libmsl/build -l:libmsl.a
cflags := -isystem ../libmsl
include src.mk
include app.mk
include ../generic/flags.mk
include ../$(platform)/flags.mk
all: $(app)
$(app): $(o)
$(cc) -o $@ $(ldflags) -T ../$(platform)/link.ld $^
%.o: %.c
$(cc) -c -o $@ $(cflags) $<
%.o: %.S
$(cc) -c -o $@ $(cflags) $<
clean:
rm -f $(o) $(app)
.PHONY: all clean