Only build files that have changed
This commit is contained in:
parent
7197016ae7
commit
0904ad4d99
13
Makefile
13
Makefile
|
@ -4,21 +4,20 @@ FILES = src/int21.s \
|
||||||
src/kernel.s
|
src/kernel.s
|
||||||
|
|
||||||
.PHONY: all qemu clean
|
.PHONY: all qemu clean
|
||||||
all: prepare boot kernel img
|
all: obj/boot.o obj/kernel.o $(TARGET)
|
||||||
|
|
||||||
qemu: all
|
qemu: all
|
||||||
qemu-system-i386 -fda $(TARGET)
|
qemu-system-i386 -fda $(TARGET)
|
||||||
|
|
||||||
prepare:
|
obj/boot.o: src/boot.s
|
||||||
mkdir -p obj
|
@mkdir -p obj
|
||||||
|
|
||||||
boot: src/boot.s
|
|
||||||
nasm -I. -Isrc src/boot.s -o obj/boot.o
|
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
|
nasm -I. -Isrc src/kernel.s -o obj/kernel.o
|
||||||
|
|
||||||
img:
|
$(TARGET):
|
||||||
cat obj/boot.o obj/kernel.o > $(TARGET)
|
cat obj/boot.o obj/kernel.o > $(TARGET)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
Loading…
Reference in New Issue