kernel/Makefile

25 lines
574 B
Makefile

all: build/kernel-i386.elf
clean:
-@rm *.bin 2> /dev/null || true
start32.bin: src/*
fasm src/start32.asm start32.bin
image: start32.bin mount
cp start32.bin mnt/koalemos/
sync
qemu-multiboot: start32.bin
qemu-system-i386 -kernel start32.bin -serial stdio
qemu-image: image
qemu-system-i386 koalemos.img -serial stdio
mount: koalemos.img mnt/
@if ! mountpoint -q "mnt/"; then \
sudo mount -o loop,offset=1048576,umask=177,dmask=022,uid=$(shell id -u),gid=$(shell id -g) koalemos.img mnt/; \
fi;
umount:
@sudo umount mnt
mnt/:
@mkdir mnt
build/:
@mkdir build