- Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
Latest commit
30 lines (21 loc) · 436 Bytes
/
Copy pathMakefile
File metadata and controls
30 lines (21 loc) · 436 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# $@ = target file
# $< = first dependency
# $^ = all dependencies
.PHONY: clean cleanobj run
# First rule is run by default
#
OS.bin: boot.bin toy.bin
cat $^>$@
# LBOOT.bin: boot.bin
# dd if=$< of=$@ bs=100m conv=sync
%.o: %.asm
nasm $< -f elf -o $@
%.bin: %.asm
nasm $< -f bin -o $@
qemu: OS.bin
qemu-img create los.bin 2048
qemu-system-x86_64 -fda $< -hda los.bin
clean: cleanobj
rm -rf *.bin
cleanobj:
rm -rf *.o