-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from davidgiven/ab
Switch build system from bazel to ab.
- Loading branch information
Showing
88 changed files
with
2,718 additions
and
1,642 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
.obj | ||
.vscode | ||
__pycache__ | ||
.*\.orig | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
all: | ||
bazel test -c dbg //... | ||
bazel build -c opt //:diskimages | ||
for a in $$(dirname bazel-bin/arch/*/diskimage.img bazel-bin/arch/*/*/diskimage.img); do \ | ||
f=$$(basename $$a); cp $$a/diskimage.img $$f.img; chmod +rw $$f.img; done | ||
export ACKCFLAGS = -O3 | ||
export OBJ = .obj | ||
|
||
verbose: | ||
bazel test -s -c dbg //... | ||
bazel build -s -c opt //:diskimages | ||
.PHONY: all | ||
all: +all | ||
|
||
clean: | ||
bazel clean | ||
TARGETS = +all | ||
include build/ab.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
from build.ab import simplerule | ||
from build.cpm import cpm_addresses, binslice, diskimage | ||
from third_party.zmac.build import zmac | ||
from third_party.ld80.build import ld80 | ||
from utils.build import unix2cpm | ||
|
||
simplerule( | ||
name="font_inc", | ||
ins=["arch/brother/lw30/utils+fontconvert", "utils/6x7font.bdf"], | ||
outs=["=font.inc"], | ||
commands=["{ins[0]} {ins[1]} > {outs[0]}"], | ||
label="FONTCONVERT", | ||
) | ||
|
||
zmac( | ||
name="boot_o", | ||
z180=True, | ||
src="./boot.z80", | ||
deps=[ | ||
"arch/brother/lw30/include/lw30.lib", | ||
"arch/common/utils/tty.lib", | ||
"include/cpmish.lib", | ||
"include/z180.lib", | ||
".+font_inc", | ||
], | ||
) | ||
|
||
ld80(name="boot", address=0x5000, objs={0x5000: [".+boot_o"]}) | ||
|
||
for n in ["bios", "floppy", "tty"]: | ||
zmac( | ||
name=n, | ||
z180=True, | ||
src=f"./{n}.z80", | ||
deps=[ | ||
"arch/brother/lw30/include/lw30.lib", | ||
"arch/common/utils/print.lib", | ||
"arch/common/utils/tty.lib", | ||
"include/cpm.lib", | ||
"include/cpmish.lib", | ||
"include/z180.lib", | ||
], | ||
) | ||
|
||
# This is the bit which CP/M reloads on warm boot (well, some of it). | ||
ld80( | ||
name="cpmfile", | ||
address=0x9300, | ||
objs={ | ||
0x9300: ["third_party/zcpr1"], | ||
0x9B00: ["third_party/zsdos"], | ||
0xA900: [ | ||
".+bios", | ||
".+floppy", | ||
".+tty", | ||
], | ||
}, | ||
) | ||
|
||
# Produces the FAT bit of the disk image. | ||
zmac(name="fat", z180=True, src="./fat.z80", deps=[".+boot", ".+cpmfile"]) | ||
|
||
ld80(name="bootfile", objs={0x0000: [".+fat"]}) | ||
|
||
unix2cpm(name="readme", src="README.md") | ||
|
||
diskimage( | ||
name="diskimage", | ||
format="brother-op2", | ||
bootfile=".+bootfile", | ||
map={ | ||
"-readme.txt": ".+readme", | ||
"dump.com": "cpmtools+dump", | ||
"stat.com": "cpmtools+stat", | ||
"asm.com": "cpmtools+asm", | ||
"copy.com": "cpmtools+copy", | ||
"submit.com": "cpmtools+submit", | ||
"rawdisk.com": "cpmtools+rawdisk", | ||
"bbcbasic.com": "third_party/bbcbasic+bbcbasic_ADM3A", | ||
"camel80.com": "third_party/camelforth", | ||
"qe.com": "cpmtools+qe_BROTHEROP2", | ||
}, | ||
) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from build.c import cprogram | ||
|
||
cprogram(name="fontconvert", srcs=["./fontconvert.c"], deps=["utils+libbdf"]) |
Oops, something went wrong.