MAJOR RESTRUCTURE

This commit is contained in:
2024-12-28 21:23:58 +01:00
parent 12b07a9f70
commit 2e0b030324
81 changed files with 1168 additions and 579 deletions
+3 -38
View File
@@ -1,44 +1,9 @@
#
# Main kern makefile
# Root kern. makefile
# (c) 2023-2025 Tomas Kubecek
#
export VERSION = 0.2.2
include defaults.mk
# Configurable variables (eg. CC, CFLAGS, ...)
include make.defaults
# The directories containing other makefiles
SUBDIRS = libc libk boot kernel
all: msg $(IMG)
msg:
@echo\
"\x1b[36mBuilding \x1b[1mkern.\x1b[22m V$(VERSION)\x1b[0m\n\x1b[32m (c) Tom-on 2024\x1b[0m\n"
# Build the final disk image
$(IMG): $(SUBDIRS) $(FONTS)
$(HOSTCC) ./makedisk.c -I$(LIBK_INC)/fs -o ./makedisk
./makedisk
@echo "\n\x1b[32mDone!\x1b[0m\n"
$(SUBDIRS):
mkdir -p $(BIN)/$@
$(MAKE) -C . -f $@/makefile
$(FONTS):
cp $(FONT_DIR)/$@.fnt $(BIN)/$@.fnt
.PHONY: all $(SUBDIRS) fonts clean qemu
clean:
rm -rf $(BIN)
rm -rf $(IMG)
rm -f makedisk
qemu:
qemu-system-x86_64\
-drive format=raw,file=$(IMG),index=0,media=disk\
-m 256M -accel tcg -monitor stdio\
-rtc base=localtime,clock=host,driftfix=slew\
-audiodev coreaudio,id=audio0 -machine pcspk-audiodev=audio0