mirror of
https://github.com/Plexi09/Nadir-Kernel.git
synced 2026-10-20 15:07:27 +02:00
Wire IDT objects into Makefile
This commit is contained in:
parent
13f38eb739
commit
5df4353d40
1 changed files with 8 additions and 2 deletions
10
Makefile
10
Makefile
|
|
@ -20,7 +20,7 @@ CFLAGS := -std=c17 -ffreestanding -nostdlib -fno-builtin \
|
||||||
-fno-pic -fno-pie -fno-stack-protector \
|
-fno-pic -fno-pie -fno-stack-protector \
|
||||||
-Wall -Wextra -Werror -O2 -Iinclude
|
-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)
|
all: $(IMG)
|
||||||
|
|
||||||
|
|
@ -30,12 +30,18 @@ $(BUILD):
|
||||||
$(BUILD)/entry.o: $(ARCH_DIR)/entry.asm | $(BUILD)
|
$(BUILD)/entry.o: $(ARCH_DIR)/entry.asm | $(BUILD)
|
||||||
$(NASM) -f elf64 $< -o $@
|
$(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 $@
|
$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
$(BUILD)/console.o: $(ARCH_DIR)/console.c include/console.h | $(BUILD)
|
$(BUILD)/console.o: $(ARCH_DIR)/console.c include/console.h | $(BUILD)
|
||||||
$(CC) $(CFLAGS) -c $< -o $@
|
$(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
|
$(BUILD)/kernel.elf: $(OBJS) $(ARCH_DIR)/link.ld
|
||||||
$(LD) -m elf_x86_64 -T $(ARCH_DIR)/link.ld -o $@ $(OBJS)
|
$(LD) -m elf_x86_64 -T $(ARCH_DIR)/link.ld -o $@ $(OBJS)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue