diff --git a/makefile b/makefile index 165618b..5ff7f76 100644 --- a/makefile +++ b/makefile @@ -1,8 +1,13 @@ -.PHONY: clean, .force-rebuild -all: bootloader.bin +PROGRAM = os.bin -bootloader.bin: os.asm .force-rebuild - nasm -fbin os.asm -o os.bin +SRC = os.asm + +all: ${PROGRAM} + +${PROGRAM}: ${SRC} + nasm -fbin ${SRC} -o ${PROGRAM} clean: - rm *.bin \ No newline at end of file + rm -f ${PROGRAM} + +.PHONY: clean, .force-rebuild, all diff --git a/Real_mode/bootstage1.asm b/stage1/bootstage1.asm similarity index 100% rename from Real_mode/bootstage1.asm rename to stage1/bootstage1.asm diff --git a/Real_mode/disk.asm b/stage1/disk.asm similarity index 100% rename from Real_mode/disk.asm rename to stage1/disk.asm diff --git a/Real_mode/print.asm b/stage1/print.asm similarity index 100% rename from Real_mode/print.asm rename to stage1/print.asm diff --git a/long_mode/a20.asm b/stage2/a20.asm similarity index 100% rename from long_mode/a20.asm rename to stage2/a20.asm diff --git a/long_mode/bootstage2.asm b/stage2/bootstage2.asm similarity index 100% rename from long_mode/bootstage2.asm rename to stage2/bootstage2.asm diff --git a/long_mode/longmode.asm b/stage2/longmode.asm similarity index 100% rename from long_mode/longmode.asm rename to stage2/longmode.asm diff --git a/long_mode/paging.asm b/stage2/paging.asm similarity index 100% rename from long_mode/paging.asm rename to stage2/paging.asm diff --git a/long_mode/pic.asm b/stage2/pic.asm similarity index 100% rename from long_mode/pic.asm rename to stage2/pic.asm