vulcanos/Makefile

58 lines
1.0 KiB
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
2021-01-02 17:49:15 +01:00
all: prepare cpu kernel_code drivers libc userspace mem 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/
2021-01-02 17:49:15 +01:00
userspace:
make -C kernel/userspace
cp kernel/userspace/*.o obj/
2019-07-11 20:13:47 +02:00
2019-09-26 17:45:46 +02:00
mem:
make -C kernel/mem
cp kernel/mem/*.o obj/
2019-07-11 20:13:47 +02:00
link:
2021-01-04 17:54:22 +01:00
$(LD) $(LFLAGS) -o isodir/boot/vulcanos.bin obj/*.o
2019-07-11 20:13:47 +02:00
iso:
2021-01-04 17:54:22 +01:00
grub-mkrescue isodir -o vulcanos.iso
clean:
rm -rf obj/ kernel/*.o kernel/cpu/*.o
2021-01-04 17:54:22 +01:00
rm -rf kernel/userspace/*.o kernel/mem/*.o
rm -rf kernel/drivers/*.o kernel/libc/*.o
2021-01-04 17:58:21 +01:00
rm -rf vulcanos.iso bochslog.txt commands isodir
2019-07-11 20:13:47 +02:00
bochs:
bochs -f bochs_cfg -q
run:
2021-01-04 17:54:22 +01:00
qemu-system-x86_64 -cdrom vulcanos.iso -cpu qemu32
run-debug:
2021-01-04 17:54:22 +01:00
qemu-system-x86_64 -cdrom vulcanos.iso -d exec,cpu
2019-07-11 20:13:47 +02:00
run-curses:
2021-01-05 18:43:59 +01:00
qemu-system-x86_64 -cdrom vulcanos.iso -curses -cpu qemu32