foxdos/Makefile

26 lines
467 B
Makefile
Raw Permalink Normal View History

2022-11-01 15:59:06 -07:00
TARGET = foxdos
FILES = config.s \
$(wildcard src/*.s) \
$(wildcard src/int21/*.s)
2022-11-01 15:59:06 -07:00
.PHONY: all qemu clean
2023-10-27 21:54:33 -07:00
all: obj/mbr.o obj/kernel.o $(TARGET)
2022-11-01 15:59:06 -07:00
qemu: all
qemu-system-i386 -fda $(TARGET)
2023-10-27 21:54:33 -07:00
obj/mbr.o: src/mbr.s
2022-11-02 11:31:14 -07:00
@mkdir -p obj
2023-10-27 21:54:33 -07:00
nasm -I. -Isrc src/mbr.s -o obj/mbr.o
2022-11-01 15:59:06 -07:00
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
2023-10-27 21:54:33 -07:00
$(TARGET): src/mbr.s $(FILES)
cat obj/mbr.o obj/kernel.o > $(TARGET)
2022-11-01 15:59:06 -07:00
clean:
2022-11-03 19:07:19 -07:00
rm -rf obj/ $(TARGET) kernel.map