Skip to content

Commit 21c02a2

Browse files
authored
Merge pull request #69 from davidgiven/ab
Switch build system from bazel to ab.
2 parents 7c8d636 + 9a50aea commit 21c02a2

File tree

88 files changed

+2718
-1642
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+2718
-1642
lines changed

.github/workflows/ccpp.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: apt
1717
run: |
1818
sudo apt update
19-
sudo apt install cpmtools bazel-bootstrap flex bison libreadline-dev libz80ex-dev lua5.2
19+
sudo apt install cpmtools flex bison libreadline-dev libz80ex-dev lua5.2
2020
- name: build-ack
2121
run: |
2222
git clone --depth=1 https://github.com/davidgiven/ack.git
@@ -30,11 +30,11 @@ jobs:
3030
with:
3131
name: ${{ github.event.repository.name }}.${{ github.sha }}
3232
path: |
33-
bazel-bin/arch/brother/pn8510/diskimage.img
34-
bazel-bin/arch/brother/pn8800/diskimage.img
35-
bazel-bin/arch/brother/lw30/diskimage.img
36-
bazel-bin/arch/brother/wp2450/diskimage.img
37-
bazel-bin/arch/brother/wp1/diskimage.img
38-
bazel-bin/arch/kayproii/diskimage.img
39-
bazel-bin/arch/nc200/diskimage.img
33+
pn8510.img
34+
pn8800.img
35+
lw30.img
36+
wp2450.img
37+
wp1.img
38+
kayproii.img
39+
nc200.img
4040

.github/workflows/release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: apt
2121
run: |
2222
sudo apt update
23-
sudo apt install cpmtools bazel-bootstrap flex bison libreadline-dev libz80ex-dev lua5.2
23+
sudo apt install cpmtools flex bison libreadline-dev libz80ex-dev lua5.2
2424
2525
- name: build-ack
2626
run: |
@@ -49,7 +49,6 @@ jobs:
4949
token: ${{ github.token }}
5050
tag: dev
5151
assets: |
52-
pn8510.img
5352
pn8510.img
5453
pn8800.img
5554
brotherop2.img

.hgignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
.obj
22
.vscode
3+
__pycache__
4+
.*\.orig
35

BUILD

Lines changed: 0 additions & 17 deletions
This file was deleted.

Makefile

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
all:
2-
bazel test -c dbg //...
3-
bazel build -c opt //:diskimages
4-
for a in $$(dirname bazel-bin/arch/*/diskimage.img bazel-bin/arch/*/*/diskimage.img); do \
5-
f=$$(basename $$a); cp $$a/diskimage.img $$f.img; chmod +rw $$f.img; done
1+
export ACKCFLAGS = -O3
2+
export OBJ = .obj
63

7-
verbose:
8-
bazel test -s -c dbg //...
9-
bazel build -s -c opt //:diskimages
4+
.PHONY: all
5+
all: +all
106

11-
clean:
12-
bazel clean
7+
TARGETS = +all
8+
include build/ab.mk

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ This are built automatically and aren't tested in any way.
8181
need to install the dependencies. These are the names of the Debian packages:
8282

8383
- cpmtools
84-
- bazel-bootstrap
8584
- libz80ex-dev
8685
- libreadline-dev
8786

WORKSPACE

Whitespace-only changes.

arch/brother/lw30/BUILD

Lines changed: 0 additions & 109 deletions
This file was deleted.

arch/brother/lw30/build.py

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
from build.ab import simplerule
2+
from build.cpm import cpm_addresses, binslice, diskimage
3+
from third_party.zmac.build import zmac
4+
from third_party.ld80.build import ld80
5+
from utils.build import unix2cpm
6+
7+
simplerule(
8+
name="font_inc",
9+
ins=["arch/brother/lw30/utils+fontconvert", "utils/6x7font.bdf"],
10+
outs=["=font.inc"],
11+
commands=["{ins[0]} {ins[1]} > {outs[0]}"],
12+
label="FONTCONVERT",
13+
)
14+
15+
zmac(
16+
name="boot_o",
17+
z180=True,
18+
src="./boot.z80",
19+
deps=[
20+
"arch/brother/lw30/include/lw30.lib",
21+
"arch/common/utils/tty.lib",
22+
"include/cpmish.lib",
23+
"include/z180.lib",
24+
".+font_inc",
25+
],
26+
)
27+
28+
ld80(name="boot", address=0x5000, objs={0x5000: [".+boot_o"]})
29+
30+
for n in ["bios", "floppy", "tty"]:
31+
zmac(
32+
name=n,
33+
z180=True,
34+
src=f"./{n}.z80",
35+
deps=[
36+
"arch/brother/lw30/include/lw30.lib",
37+
"arch/common/utils/print.lib",
38+
"arch/common/utils/tty.lib",
39+
"include/cpm.lib",
40+
"include/cpmish.lib",
41+
"include/z180.lib",
42+
],
43+
)
44+
45+
# This is the bit which CP/M reloads on warm boot (well, some of it).
46+
ld80(
47+
name="cpmfile",
48+
address=0x9300,
49+
objs={
50+
0x9300: ["third_party/zcpr1"],
51+
0x9B00: ["third_party/zsdos"],
52+
0xA900: [
53+
".+bios",
54+
".+floppy",
55+
".+tty",
56+
],
57+
},
58+
)
59+
60+
# Produces the FAT bit of the disk image.
61+
zmac(name="fat", z180=True, src="./fat.z80", deps=[".+boot", ".+cpmfile"])
62+
63+
ld80(name="bootfile", objs={0x0000: [".+fat"]})
64+
65+
unix2cpm(name="readme", src="README.md")
66+
67+
diskimage(
68+
name="diskimage",
69+
format="brother-op2",
70+
bootfile=".+bootfile",
71+
map={
72+
"-readme.txt": ".+readme",
73+
"dump.com": "cpmtools+dump",
74+
"stat.com": "cpmtools+stat",
75+
"asm.com": "cpmtools+asm",
76+
"copy.com": "cpmtools+copy",
77+
"submit.com": "cpmtools+submit",
78+
"rawdisk.com": "cpmtools+rawdisk",
79+
"bbcbasic.com": "third_party/bbcbasic+bbcbasic_ADM3A",
80+
"camel80.com": "third_party/camelforth",
81+
"qe.com": "cpmtools+qe_BROTHEROP2",
82+
},
83+
)

arch/brother/lw30/include/BUILD

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)