vulcanos/Makefile

50 lines
877 B
Makefile
Raw Normal View History

2019-07-11 20:13:47 +02:00
LD = i686-elf-ld
LFLAGS = -melf_i386 -nostdlib -O2 -T link.ld
2019-07-11 20:13:47 +02:00
all: prepare cpu kernel_code drivers libc shell link iso
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
clean:
rm -rf obj/ kernel/*.o kernel/cpu/*.o
2019-07-09 12:15:43 +02:00
rm -rf kernel/shell/*.o
rm -rf kernel/drivers/*.o kernel/libc/*.o
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