diff options
author | Ian Moffett <ian@osmora.org> | 2025-09-13 20:10:17 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-09-13 20:10:17 -0400 |
commit | 47ab28465a0d69e9ac973b7485ac447a0f565d8e (patch) | |
tree | d5dc7a87645533bccb85f8c86749e3e325e5c7f8 /src/sys/os | |
parent | 15dfcd84a1330d9b53bd84db38c917c79412836d (diff) |
project: 'kern' -> 'os'
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'src/sys/os')
-rw-r--r-- | src/sys/os/Makefile | 25 | ||||
-rw-r--r-- | src/sys/os/kern_init.c | 10 |
2 files changed, 35 insertions, 0 deletions
diff --git a/src/sys/os/Makefile b/src/sys/os/Makefile new file mode 100644 index 0000000..dda389b --- /dev/null +++ b/src/sys/os/Makefile @@ -0,0 +1,25 @@ +include ../conf/sys.mk + +.SILENT: +override PROMPT := printf "%s\t\t%s\n" + +TARGET = ../target/libkern.a +CFLAGS = -I../include/ -I../include/lib/ -I../target/header/ $(MI_CFLAGS) +CFILES = $(shell find . -name "*.c") + +DEPS = $(CFILES:.c=.d) +OBJECTS = $(CFILES:%.c=%.o) + +.PHONY: all +all: $(OBJECTS) + $(PROMPT) " MI.AR " $< + ar rcs $(TARGET) $(OBJECTS) + +-include $(DEPS) +%.o: %.c + $(PROMPT) " MI.CC " $< + $(CC) -c $(CFLAGS) $< -o $@ + +.PHONY: clean +clean: + rm -f $(DEPS) $(OBJECTS) diff --git a/src/sys/os/kern_init.c b/src/sys/os/kern_init.c new file mode 100644 index 0000000..6cf35f0 --- /dev/null +++ b/src/sys/os/kern_init.c @@ -0,0 +1,10 @@ +#include <sys/cdefs.h> + +/* + * Kernel entrypoint + */ +__dead void +main(void) +{ + for (;;); +} |