2022-11-01 15:59:06 -07:00
|
|
|
TARGET = foxdos
|
|
|
|
|
2022-11-02 13:58:03 -07:00
|
|
|
FILES = config.s \
|
|
|
|
src/int21.s \
|
2022-11-02 17:03:48 -07:00
|
|
|
src/kernel.s \
|
|
|
|
src/vga.s
|
2022-11-01 15:59:06 -07:00
|
|
|
|
|
|
|
.PHONY: all qemu clean
|
2022-11-02 11:31:14 -07:00
|
|
|
all: obj/boot.o obj/kernel.o $(TARGET)
|
2022-11-01 15:59:06 -07:00
|
|
|
|
|
|
|
qemu: all
|
|
|
|
qemu-system-i386 -fda $(TARGET)
|
|
|
|
|
2022-11-02 11:31:14 -07:00
|
|
|
obj/boot.o: src/boot.s
|
|
|
|
@mkdir -p obj
|
2022-11-01 15:59:06 -07:00
|
|
|
nasm -I. -Isrc src/boot.s -o obj/boot.o
|
|
|
|
|
2022-11-02 11:31:14 -07:00
|
|
|
obj/kernel.o: $(FILES)
|
|
|
|
@mkdir -p obj
|
2022-11-01 15:59:06 -07:00
|
|
|
nasm -I. -Isrc src/kernel.s -o obj/kernel.o
|
|
|
|
|
2022-11-02 13:58:03 -07:00
|
|
|
$(TARGET): src/boot.s $(FILES)
|
2022-11-01 15:59:06 -07:00
|
|
|
cat obj/boot.o obj/kernel.o > $(TARGET)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf obj/ $(TARGET)
|