From 7d1b88ec00d790a86124ef193fcd8a55d0882ea7 Mon Sep 17 00:00:00 2001 From: Alexander Myltsev Date: Sat, 28 Jan 2023 13:22:17 +0400 Subject: [PATCH] Extract the OBJECTS variable. --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index aca2acb..5825871 100644 --- a/Makefile +++ b/Makefile @@ -23,6 +23,9 @@ ASMFLAGS = -target elf-i386 -ffreestanding -c -g LDKERNELFLAGS = --script=script.ld endif +OBJECTS = kernel.o console.o drivers/vga.o drivers/uart.o drivers/keyboard.o \ + cpu/idt.o cpu/vectors.o lib/mem.o + run: image.bin qemu-system-i386 -drive format=raw,file=$< -serial mon:stdio @@ -84,8 +87,7 @@ user/%: user/%.o user/crt.o image.bin: mbr.bin fs.img cat $^ >$@ -kernel.bin: kernel.o console.o drivers/vga.o drivers/uart.o drivers/keyboard.o \ - cpu/idt.o cpu/vectors.o lib/mem.o +kernel.bin: $(OBJECTS) $(LD) $(LDFLAGS) $(LDKERNELFLAGS) -o $@ -Ttext 0x9000 $^ bootmain.o: bootmain.c