2023-07-16 06:54:32 +00:00
|
|
|
include .env
|
|
|
|
|
2023-07-16 23:56:56 +00:00
|
|
|
.PHONY: all libk kernel clean run
|
2023-07-16 06:54:32 +00:00
|
|
|
|
|
|
|
all: os.iso
|
|
|
|
|
|
|
|
libk:
|
|
|
|
make --directory=libk
|
|
|
|
|
|
|
|
kernel:
|
|
|
|
make --directory=kernel
|
|
|
|
|
|
|
|
os.iso: libk kernel
|
2023-07-16 23:56:56 +00:00
|
|
|
@rm -fr os.iso
|
|
|
|
@mkdir -p iso/boot/grub
|
|
|
|
cp grub.cfg iso/boot/grub
|
|
|
|
cp kernel/bin/kernel.bin iso/boot
|
|
|
|
grub-mkrescue -o os.iso iso
|
2023-07-16 06:54:32 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
make --directory=libk clean
|
|
|
|
make --directory=kernel clean
|
2023-07-16 23:56:56 +00:00
|
|
|
rm -fr iso
|
2023-07-16 06:54:32 +00:00
|
|
|
rm -fr os.iso
|
|
|
|
|
|
|
|
run:
|
|
|
|
$(QEMU) -cdrom os.iso \
|
|
|
|
-boot order=d \
|
|
|
|
-m 4g
|