Implementing some FAT12 code in C

This commit is contained in:
wes
2023-08-22 12:18:13 -04:00
parent 1d349f2f23
commit a22a2631b4
3 changed files with 197 additions and 2 deletions
+13 -1
View File
@@ -1,9 +1,13 @@
ASM=nasm
CC=gcc
SRC_DIR=src
TOOLS_DIR=tools
BUILD_DIR=build
.PHONY: all floppy_image kernel bootloader clean always
.PHONY: all floppy_image kernel bootloader clean always tools_fat
all: floppy_image tools_fat
#
# Floppy image
@@ -37,6 +41,14 @@ kernel: $(BUILD_DIR)/kernel.bin
$(BUILD_DIR)/kernel.bin: always
$(ASM) $(SRC_DIR)/kernel/main.asm -f bin -o $(BUILD_DIR)/kernel.bin
#
# Tools
#
tools_fat: $(BUILD_DIR)/tools/fat
$(BUILD_DIR)/tools/fat: always $(TOOLS_DIR)/fat/fat.c
mkdir -p $(BUILD_DIR)/tools
$(CC) -g -o $(BUILD_DIR)/tools/fat $(TOOLS_DIR)/fat/fat.c
#
# Always
#