Only build files that have changed

This commit is contained in:
Ry 2022-11-02 11:31:14 -07:00
parent 7197016ae7
commit 0904ad4d99
1 changed files with 7 additions and 8 deletions

View File

@ -1,24 +1,23 @@
TARGET = foxdos
FILES = src/int21.s \
src/kernel.s
src/kernel.s
.PHONY: all qemu clean
all: prepare boot kernel img
all: obj/boot.o obj/kernel.o $(TARGET)
qemu: all
qemu-system-i386 -fda $(TARGET)
prepare:
mkdir -p obj
boot: src/boot.s
obj/boot.o: src/boot.s
@mkdir -p obj
nasm -I. -Isrc src/boot.s -o obj/boot.o
kernel: $(FILES)
obj/kernel.o: $(FILES)
@mkdir -p obj
nasm -I. -Isrc src/kernel.s -o obj/kernel.o
img:
$(TARGET):
cat obj/boot.o obj/kernel.o > $(TARGET)
clean: