-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (43 loc) · 963 Bytes
/
Makefile
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# -- options --------------
# select bootable image type: 360 for 5.25" DD (360KB), 1440 for 3.5" HD (1.44MB)
# DOS build is not affected by this setting
disktype = 360
# disktype = 1440
# -------------------------
ifeq ($(disktype), 360)
def = -DFLOPPY360
nsec = 720
else
def = -DFLOPPY1440
nsec = 2880
endif
src = src/main.asm src/game.asm src/disp.asm src/timer.asm src/intr.asm src/keyb.asm
bin = 88tris
img = 88tris.img
com = 88tris.com
AS = nasm
ASFLAGS = -f bin
$(img): $(bin)
dd if=/dev/zero of=$@ bs=512 count=$(nsec)
dd if=$< of=$@ bs=512 conv=notrunc
$(bin): $(src)
$(AS) $(ASFLAGS) $(def) -o $@ $<
$(com): $(src)
$(AS) $(ASFLAGS) -DDOS -o $@ $<
.PHONY: dos
dos: $(com)
.PHONY: clean
clean:
rm -f $(bin) $(img) $(com)
.PHONY: run
run: $(img)
qemu-system-i386 -fda $<
.PHONY: rundos
rundos: $(com)
dosbox $(com)
.PHONY: debug
debug: $(img)
qemu-system-i386 -S -s -fda $<
.PHONY: disasm
disasm: $(bin)
ndisasm -o 0x7c00 $< >dis