fixed
[bootcard] / Makefile
1 bin = bootcard.img
2 com = bootcard.com
3
4 QEMU_FLAGS = -soundhw pcspk -device sb16
5
6 $(bin): bootcard.asm
7         nasm -f bin -o $@ $<
8
9 $(com): bootcard.asm
10         nasm -f bin -o $@ $< -DDOS
11
12 .PHONY: clean
13 clean:
14         rm -f $(bin) $(com)
15
16 .PHONY: run
17 run: $(bin)
18         qemu-system-i386 -hda $< $(QEMU_FLAGS)
19
20 .PHONY: debug
21 debug: $(bin)
22         qemu-system-i386 -S -s -hda $< $(QEMU_FLAGS)
23
24 .PHONY: disasm
25 disasm: $(bin)
26         ndisasm -o 0x7c00 $< >dis
27
28 .PHONY: qr
29 qr: bootcard.asm
30         qrencode -o qr.png -r bootcard.asm
31
32 .PHONY: install
33 install: $(bin)
34         dd if=$(bin) of=/dev/sdd bs=512
35
36 .PHONY: com
37 com: $(com)
38
39 .PHONY: rundos
40 rundos: $(com)
41         dosbox-x $(com)
42
43 tools/gentune: tools/gentune.c
44         $(CC) -o $@ $< $(LDFLAGS)