From 5df4353d40424a77dd3fba8c65781dd235b78756 Mon Sep 17 00:00:00 2001 From: "Pierre-Emmanuel Gob." Date: Fri, 18 Sep 2026 12:05:21 +0200 Subject: [PATCH] Wire IDT objects into Makefile --- Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f7efd43..2408a9d 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ CFLAGS := -std=c17 -ffreestanding -nostdlib -fno-builtin \ -fno-pic -fno-pie -fno-stack-protector \ -Wall -Wextra -Werror -O2 -Iinclude -OBJS := $(BUILD)/entry.o $(BUILD)/kmain.o $(BUILD)/console.o +OBJS := $(BUILD)/entry.o $(BUILD)/isr.o $(BUILD)/kmain.o $(BUILD)/console.o $(BUILD)/idt.o all: $(IMG) @@ -30,12 +30,18 @@ $(BUILD): $(BUILD)/entry.o: $(ARCH_DIR)/entry.asm | $(BUILD) $(NASM) -f elf64 $< -o $@ -$(BUILD)/kmain.o: kernel/core/kmain.c include/console.h | $(BUILD) +$(BUILD)/isr.o: $(ARCH_DIR)/isr.asm | $(BUILD) + $(NASM) -f elf64 $< -o $@ + +$(BUILD)/kmain.o: kernel/core/kmain.c include/console.h include/idt.h | $(BUILD) $(CC) $(CFLAGS) -c $< -o $@ $(BUILD)/console.o: $(ARCH_DIR)/console.c include/console.h | $(BUILD) $(CC) $(CFLAGS) -c $< -o $@ +$(BUILD)/idt.o: $(ARCH_DIR)/idt.c include/idt.h include/console.h | $(BUILD) + $(CC) $(CFLAGS) -c $< -o $@ + $(BUILD)/kernel.elf: $(OBJS) $(ARCH_DIR)/link.ld $(LD) -m elf_x86_64 -T $(ARCH_DIR)/link.ld -o $@ $(OBJS)