foxdos/Makefile

25 lines
415 B
Makefile
Raw Normal View History

2022-11-01 15:59:06 -07:00
TARGET = foxdos
FILES = src/int21.s \
2022-11-02 11:31:14 -07:00
src/kernel.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 11:31:14 -07:00
$(TARGET):
2022-11-01 15:59:06 -07:00
cat obj/boot.o obj/kernel.o > $(TARGET)
clean:
rm -rf obj/ $(TARGET)