This commit is contained in:
nub31
2025-08-23 15:52:54 +02:00
parent 3b5e08951c
commit d11c1072f9
9 changed files with 143 additions and 99 deletions

View File

@@ -1,10 +1,7 @@
CC = i386-elf-gcc -ffreestanding -m32
kernel.bin: entry.o kernel.o mem.o print.o
i386-elf-ld -o kernel.bin -Ttext 0x1000 entry.o kernel.o mem.o print.o --oformat binary
entry.o: entry.asm
nasm -f elf -o entry.o entry.asm
kernel.bin: entry.o kernel.o linker.ld mem.o print.o
i386-elf-ld -o kernel.bin -T linker.ld entry.o kernel.o mem.o print.o --oformat binary
kernel.o: kernel.c
$(CC) -c -o kernel.o kernel.c
@@ -15,5 +12,8 @@ mem.o: mem.c
print.o: print.c
$(CC) -c -o print.o print.c
entry.o: entry.asm
nasm -f elf entry.asm
clean:
@rm *.o *.bin 2>/dev/null || true