summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 13 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index dfdcae5..51493cd 100644
--- a/Makefile
+++ b/Makefile
@@ -11,7 +11,10 @@ KOBJ_LIBS = ./build/string.o
KOBJ_FILES = $(KERNEL_ASM_OBJ) \
$(KERNEL_OBJ) \
- ./build/vga.o
+ ./build/vga.o \
+ ./build/idt/idt.asm.o \
+ ./build/idt/idt.o
+
BOOT_TGT =./bin/boot.bin
KERNEL_TGT = ./bin/kernel.bin
@@ -48,6 +51,13 @@ $(BUILD_DIR)/kernel.o: ./src/kernel.c ./build/vga.o $(KOBJ_LIBS)
$(BUILD_DIR)/vga.o: ./src/vga.c $(KOBJ_LIBS)
i686-elf-gcc $(INCLUDES) $(FLAGS) -std=gnu99 -c ./src/vga.c -o $(BUILD_DIR)/vga.o
+$(BUILD_DIR)/idt/idt.asm.o: ./src/idt/idt.asm
+ nasm -f elf -g ./src/idt/idt.asm -o $(BUILD_DIR)/idt/idt.asm.o
+
+$(BUILD_DIR)/idt/idt.o: ./src/idt/idt.c ./build/vga.o $(KOBJ_LIBS)
+ i686-elf-gcc $(INCLUDES) $(FLAGS) -std=gnu99 -c ./src/idt/idt.c -o $(BUILD_DIR)/idt/idt.o
+
+
$(KOBJ_LIBS):
i686-elf-gcc $(INCLUDES) $(FLAGS) -std=gnu99 -c ./src/lib/string.c -o $(BUILD_DIR)/string.o
clean:
@@ -58,4 +68,6 @@ clean:
rm -f build/kernel.o
rm -f build/vga.o
rm -f build/string.o
+ rm -f build/idt/idt.asm.o
+ rm -f build/idt/idt.o
rm -f bin/os.bin