annotate Makefile @ 125:0607e4e20702

Correct offset error for keyword table lookup
author William Astle <lost@l-w.ca>
date Sun, 07 Jan 2024 20:35:51 -0700
parents 5d5472b11ccd
children 9d57279c900e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
1 .PHONY: all
121
5d5472b11ccd Initital skeleton of separation of separate parsing scheme
William Astle <lost@l-w.ca>
parents: 119
diff changeset
2 CFLAGS ?= -Wall
5d5472b11ccd Initital skeleton of separation of separate parsing scheme
William Astle <lost@l-w.ca>
parents: 119
diff changeset
3
90
f1d847f69c0d Add target for explicit coco1 for MAME rules
William Astle <lost@l-w.ca>
parents: 80
diff changeset
4 all: bin/lwbasic.rom bin/lwbasic-coco2b.rom bin/lwbasic-coco3.rom bin/coco.zip bin/coco2.zip bin/coco2b.zip bin/coco3.zip
2
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
5
121
5d5472b11ccd Initital skeleton of separation of separate parsing scheme
William Astle <lost@l-w.ca>
parents: 119
diff changeset
6 lwb_srcs := bytecode.s consscr.s defs.s error.s expr.s fps.s genio.s init.s int.s interp.s irq.s keyb.s keywords.s keywordtab.s miscdata.s number.s parse.s print.s progctrl.s stack.s token.s vars.s
74
e74d00ac6b79 Split some code into separate files for easier management (2)
William Astle <lost@l-w.ca>
parents: 67
diff changeset
7 lwb_srcs := $(addprefix src/,$(lwb_srcs))
e74d00ac6b79 Split some code into separate files for easier management (2)
William Astle <lost@l-w.ca>
parents: 67
diff changeset
8
e74d00ac6b79 Split some code into separate files for easier management (2)
William Astle <lost@l-w.ca>
parents: 67
diff changeset
9 bin/lwbasic.rom: src/lwbasic.s $(lwb_srcs)
80
bb50ac9fdf37 Checkpoint with very basic integer and floating point arithmetic, untested
William Astle <lost@l-w.ca>
parents: 76
diff changeset
10 lwasm --6809 --tabs=16 --raw --list=src/lwbasic-coco2.list --symbols --output=bin/lwbasic.rom src/lwbasic.s
74
e74d00ac6b79 Split some code into separate files for easier management (2)
William Astle <lost@l-w.ca>
parents: 67
diff changeset
11 bin/lwbasic-coco2b.rom: src/lwbasic.s $(lwb_srcs)
80
bb50ac9fdf37 Checkpoint with very basic integer and floating point arithmetic, untested
William Astle <lost@l-w.ca>
parents: 76
diff changeset
12 lwasm --6809 --tabs=16 --raw --list=src/lwbasic-coco2b.list --symbols --output=bin/lwbasic-coco2b.rom -DCOCO2B=1 src/lwbasic.s
74
e74d00ac6b79 Split some code into separate files for easier management (2)
William Astle <lost@l-w.ca>
parents: 67
diff changeset
13 bin/lwbasic-coco3.rom: src/lwbasic.s $(lwb_srcs)
80
bb50ac9fdf37 Checkpoint with very basic integer and floating point arithmetic, untested
William Astle <lost@l-w.ca>
parents: 76
diff changeset
14 lwasm --6809 --tabs=16 --raw --list=src/lwbasic-coco3.list --symbols --output=bin/lwbasic-coco3.rom -DCOCO3=1 src/lwbasic.s
2
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
15
121
5d5472b11ccd Initital skeleton of separation of separate parsing scheme
William Astle <lost@l-w.ca>
parents: 119
diff changeset
16 src/keywordtab.s: src/keywordlist.txt src/buildkeywordtab
5d5472b11ccd Initital skeleton of separation of separate parsing scheme
William Astle <lost@l-w.ca>
parents: 119
diff changeset
17 ./src/buildkeywordtab src/keywordlist.txt src/keywordtab.s
5d5472b11ccd Initital skeleton of separation of separate parsing scheme
William Astle <lost@l-w.ca>
parents: 119
diff changeset
18
5d5472b11ccd Initital skeleton of separation of separate parsing scheme
William Astle <lost@l-w.ca>
parents: 119
diff changeset
19 src/buildkeywordtab: src/buildkeywordtab.c
5d5472b11ccd Initital skeleton of separation of separate parsing scheme
William Astle <lost@l-w.ca>
parents: 119
diff changeset
20
2
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
21 .PHONY: clean
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
22 clean:
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
23 rm -f bin/*.rom bin/*.zip
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
24 rm -f src/*.list
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
25 rm -f */*~ *~
121
5d5472b11ccd Initital skeleton of separation of separate parsing scheme
William Astle <lost@l-w.ca>
parents: 119
diff changeset
26 rm -f src/buildkeywordtab
5d5472b11ccd Initital skeleton of separation of separate parsing scheme
William Astle <lost@l-w.ca>
parents: 119
diff changeset
27 rm -f src/keywordtab.s
2
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
28
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
29 bin/coco2.zip: bin/lwbasic.rom
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
30 mkdir -p coco2
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
31 rm -f coco2/* coco2.zip
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
32 dd if=bin/lwbasic.rom of=coco2/extbas11.rom bs=1024 count=8
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
33 dd if=bin/lwbasic.rom of=coco2/bas12.rom bs=1024 count=8 skip=8
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
34 dd if=bin/lwbasic.rom of=coco2/disk11.rom bs=1024 count=16 skip=16
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
35 zip bin/coco2.zip coco2/extbas11.rom coco2/bas12.rom coco2/disk11.rom
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
36 rm -rf coco2
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
37
90
f1d847f69c0d Add target for explicit coco1 for MAME rules
William Astle <lost@l-w.ca>
parents: 80
diff changeset
38 bin/coco.zip: bin/lwbasic.rom
f1d847f69c0d Add target for explicit coco1 for MAME rules
William Astle <lost@l-w.ca>
parents: 80
diff changeset
39 mkdir -p coco
f1d847f69c0d Add target for explicit coco1 for MAME rules
William Astle <lost@l-w.ca>
parents: 80
diff changeset
40 rm -f coco/* coco.zip
f1d847f69c0d Add target for explicit coco1 for MAME rules
William Astle <lost@l-w.ca>
parents: 80
diff changeset
41 dd if=bin/lwbasic.rom of=coco/extbas11.rom bs=1024 count=8
f1d847f69c0d Add target for explicit coco1 for MAME rules
William Astle <lost@l-w.ca>
parents: 80
diff changeset
42 dd if=bin/lwbasic.rom of=coco/bas12.rom bs=1024 count=8 skip=8
f1d847f69c0d Add target for explicit coco1 for MAME rules
William Astle <lost@l-w.ca>
parents: 80
diff changeset
43 dd if=bin/lwbasic.rom of=coco/disk11.rom bs=1024 count=16 skip=16
f1d847f69c0d Add target for explicit coco1 for MAME rules
William Astle <lost@l-w.ca>
parents: 80
diff changeset
44 zip bin/coco.zip coco/extbas11.rom coco/bas12.rom coco/disk11.rom
f1d847f69c0d Add target for explicit coco1 for MAME rules
William Astle <lost@l-w.ca>
parents: 80
diff changeset
45 rm -rf coco
f1d847f69c0d Add target for explicit coco1 for MAME rules
William Astle <lost@l-w.ca>
parents: 80
diff changeset
46
2
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
47 bin/coco2b.zip: bin/lwbasic-coco2b.rom
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
48 mkdir -p coco2b
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
49 rm -f coco2b/* coco2b.zip
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
50 dd if=bin/lwbasic-coco2b.rom of=coco2b/extbas11.rom bs=1024 count=8
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
51 dd if=bin/lwbasic-coco2b.rom of=coco2b/bas13.rom bs=1024 count=8 skip=8
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
52 dd if=bin/lwbasic-coco2b.rom of=coco2b/disk11.rom bs=1024 count=16 skip=16
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
53 zip bin/coco2b.zip coco2b/extbas11.rom coco2b/bas13.rom coco2b/disk11.rom
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
54 rm -rf coco2b
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
55
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
56 bin/coco3.zip: bin/lwbasic-coco3.rom
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
57 mkdir -p coco3
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
58 rm -f coco3/* coco3.zip
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
59 dd if=bin/lwbasic-coco3.rom of=coco3/coco3.rom bs=1024 count=32
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
60 dd if=/dev/null of=coco3/disk11.rom bs=1024 count=8
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
61 zip bin/coco3.zip coco3/coco3.rom coco3/disk11.rom
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
62 rm -rf coco3
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
63
90
f1d847f69c0d Add target for explicit coco1 for MAME rules
William Astle <lost@l-w.ca>
parents: 80
diff changeset
64 .PHONY: mame1 mame1d mame2 mame2d
f1d847f69c0d Add target for explicit coco1 for MAME rules
William Astle <lost@l-w.ca>
parents: 80
diff changeset
65 mame1: bin/coco.zip
f1d847f69c0d Add target for explicit coco1 for MAME rules
William Astle <lost@l-w.ca>
parents: 80
diff changeset
66 mame coco -skip_gameinfo -rompath ./bin
f1d847f69c0d Add target for explicit coco1 for MAME rules
William Astle <lost@l-w.ca>
parents: 80
diff changeset
67 mame1d: bin/coco.zip
f1d847f69c0d Add target for explicit coco1 for MAME rules
William Astle <lost@l-w.ca>
parents: 80
diff changeset
68 mame coco -skip_gameinfo -rompath ./bin -debug
f1d847f69c0d Add target for explicit coco1 for MAME rules
William Astle <lost@l-w.ca>
parents: 80
diff changeset
69
2
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
70 mame2: bin/coco2.zip
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
71 mame coco2 -skip_gameinfo -rompath ./bin
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
72 mame2d: bin/coco2.zip
19eac734a518 Makefile to actually build something with initial start to ROM init code
William Astle <lost@l-w.ca>
parents:
diff changeset
73 mame coco2 -skip_gameinfo -rompath ./bin -debug
9
f9ec351dd82b Add Makefile rules for running the Coco 3 ROM in MAME
William Astle <lost@l-w.ca>
parents: 2
diff changeset
74
f9ec351dd82b Add Makefile rules for running the Coco 3 ROM in MAME
William Astle <lost@l-w.ca>
parents: 2
diff changeset
75 .PHONY: mame3 mame3d
f9ec351dd82b Add Makefile rules for running the Coco 3 ROM in MAME
William Astle <lost@l-w.ca>
parents: 2
diff changeset
76 mame3: bin/coco3.zip
f9ec351dd82b Add Makefile rules for running the Coco 3 ROM in MAME
William Astle <lost@l-w.ca>
parents: 2
diff changeset
77 mame coco3 -skip_gameinfo -rompath ./bin
f9ec351dd82b Add Makefile rules for running the Coco 3 ROM in MAME
William Astle <lost@l-w.ca>
parents: 2
diff changeset
78 mame3d: bin/coco3.zip
f9ec351dd82b Add Makefile rules for running the Coco 3 ROM in MAME
William Astle <lost@l-w.ca>
parents: 2
diff changeset
79 mame coco3 -skip_gameinfo -rompath ./bin -debug
67
9c2e66ef5fa1 Clean up weirdness in coco2/2b targets
William Astle <lost@l-w.ca>
parents: 28
diff changeset
80
9c2e66ef5fa1 Clean up weirdness in coco2/2b targets
William Astle <lost@l-w.ca>
parents: 28
diff changeset
81 .PHONY: mame2b mame2bd
9c2e66ef5fa1 Clean up weirdness in coco2/2b targets
William Astle <lost@l-w.ca>
parents: 28
diff changeset
82 mame2b: bin/coco2b.zip
9c2e66ef5fa1 Clean up weirdness in coco2/2b targets
William Astle <lost@l-w.ca>
parents: 28
diff changeset
83 mame coco2b -skip_gameinfo -rompath ./bin
9c2e66ef5fa1 Clean up weirdness in coco2/2b targets
William Astle <lost@l-w.ca>
parents: 28
diff changeset
84 mame2bd: bin/coco2b.zip
9c2e66ef5fa1 Clean up weirdness in coco2/2b targets
William Astle <lost@l-w.ca>
parents: 28
diff changeset
85 mame coco2b -skip_gameinfo -rompath ./bin -debug