2019-07-11 20:13:47 +02:00
|
|
|
LD = i686-elf-ld
|
|
|
|
LFLAGS = -melf_i386 -nostdlib -O2 -T link.ld
|
2019-07-03 18:12:57 +02:00
|
|
|
|
2019-07-11 20:13:47 +02:00
|
|
|
all: prepare cpu kernel_code drivers libc shell link iso
|
2019-07-03 18:12:57 +02:00
|
|
|
|
2019-07-11 20:13:47 +02:00
|
|
|
prepare:
|
|
|
|
mkdir -p obj/
|
|
|
|
mkdir -p isodir/boot/grub/
|
|
|
|
cp grub.cfg isodir/boot/grub/grub.cfg
|
2019-07-09 12:20:16 +02:00
|
|
|
|
2019-07-11 20:13:47 +02:00
|
|
|
cpu:
|
|
|
|
make -C kernel/cpu
|
|
|
|
cp kernel/cpu/*.o obj/
|
|
|
|
|
|
|
|
kernel_code:
|
|
|
|
make -C kernel
|
|
|
|
cp kernel/*.o obj/
|
|
|
|
|
|
|
|
drivers:
|
|
|
|
make -C kernel/drivers/
|
|
|
|
cp kernel/drivers/*.o obj/
|
|
|
|
|
|
|
|
libc:
|
|
|
|
make -C kernel/libc
|
|
|
|
cp kernel/libc/*.o obj/
|
|
|
|
|
|
|
|
shell:
|
|
|
|
make -C kernel/shell
|
|
|
|
cp kernel/shell/*.o obj/
|
|
|
|
|
|
|
|
link:
|
|
|
|
$(LD) $(LFLAGS) -o isodir/boot/iceOS.bin obj/*.o
|
|
|
|
|
|
|
|
iso:
|
|
|
|
grub-mkrescue isodir -o iceOS.iso
|
2019-07-03 21:04:05 +02:00
|
|
|
|
2019-07-03 18:12:57 +02:00
|
|
|
clean:
|
2019-07-04 01:58:34 +02:00
|
|
|
rm -rf obj/ kernel/*.o kernel/cpu/*.o
|
2019-07-09 12:15:43 +02:00
|
|
|
rm -rf kernel/shell/*.o
|
2019-07-03 18:12:57 +02:00
|
|
|
rm -rf kernel/drivers/*.o kernel/libc/*.o
|
2019-07-04 01:58:34 +02:00
|
|
|
rm -rf iceOS.iso bochslog.txt commands isodir
|
2019-07-11 20:13:47 +02:00
|
|
|
|
|
|
|
bochs:
|
|
|
|
bochs -f bochs_cfg -q
|
|
|
|
|
|
|
|
run:
|
|
|
|
qemu-system-x86_64 -cdrom iceOS:iso
|
|
|
|
|
|
|
|
run-curses:
|
|
|
|
qemu-system-x86_64 -cdrom iceOS.iso -curses
|