summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Maiolino <[email protected]>2025-10-07 08:17:07 +0200
committerCarlos Maiolino <[email protected]>2025-10-07 08:19:25 +0200
commit89dd9fbedf488866c240990b970a4285b5a44324 (patch)
treef2ee03c724f4eaeb13b75e764ae71dabf0fd7b79
parentda471de9d1367f6f69b5a5d3a21109b737d31024 (diff)
Makefile: build paging infrastructure
Add the paging infrastructure to the build system Signed-off-by: Carlos Maiolino <[email protected]>
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index af34ee1..8bebd54 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,9 @@ KOBJ_FILES = $(KERNEL_ASM_OBJ) \
./build/idt/idt.o \
./build/io/io.asm.o \
./build/mm/heap.o \
- ./build/mm/kernel_heap.o
+ ./build/mm/kernel_heap.o \
+ ./build/mm/paging.asm.o \
+ ./build/mm/paging.o \
BOOT_TGT =./bin/boot.bin
@@ -71,6 +73,12 @@ $(BUILD_DIR)/mm/kernel_heap.o: ./src/mm/kernel_heap.c
$(KOBJ_LIBS):
i686-elf-gcc $(INCLUDES) $(FLAGS) -std=gnu99 -c ./src/lib/string.c -o $(BUILD_DIR)/string.o
+
+$(BUILD_DIR)/mm/paging.asm.o: ./src/mm/paging.asm
+ nasm -f elf -g ./src/mm/paging.asm -o $(BUILD_DIR)/mm/paging.asm.o
+
+$(BUILD_DIR)/mm/paging.o: ./src/mm/paging.c
+ i686-elf-gcc $(INCLUDES) $(FLAGS) -std=gnu99 -c ./src/mm/paging.c -o $(BUILD_DIR)/mm/paging.o
clean:
rm -f $(BOOT_TGT)
rm -f bin/kernel.bin