VolksForth/8080/CPM/Makefile

238 lines
6.3 KiB
Makefile
Raw Permalink Normal View History

srcfbfiles = $(wildcard src/*.fb)
srcfthfiles = $(patsubst src/%.fb, src/%.fth, $(srcfbfiles))
testsfbfiles = $(wildcard tests/*.fb)
testsfthfiles = $(patsubst tests/%.fb, tests/%.fth, $(testsfbfiles))
fthfiles = $(srcfthfiles) $(testsfthfiles)
whitch_runcpm = $(shell which RunCPM)
runcpmdir = runcpm
cpmfilesdir = cpmfiles
bin: $(cpmfilesdir)/v4th.com
fth: $(fthfiles)
clean:
rm -f *.log *.golden *.result
rm -rf $(runcpmdir)
rm -f msdos
rm -f $(cpmfilesdir)/empty.f*
veryclean: clean
rm -rf $(cpmfilesdir)
2024-10-10 20:43:26 +00:00
test: test-min.result test-std.result test-blk.result
2024-10-08 20:20:11 +00:00
2024-11-10 12:10:09 +00:00
alltests: test-min.result test-std.result test-blk.result \
logtest.result inctest.result test-kernel.result
run-editor: | msdos
FORTHPATH="f:\\src;f:\\tests;f:\\msdos" \
../../8086/msdos/emulator/run-in-dosbox.sh f:\\msdos\\volks4th.com
msdos:
ln -s ../../8086/msdos msdos
src/%.fth: src/%.fb ../../tools/fb2fth.py
../../tools/fb2fth.py $< $@
tests/%.fth: tests/%.fb ../../tools/fb2fth.py
../../tools/fb2fth.py $< $@
run-volks4th: \
$(patsubst %, $(cpmfilesdir)/%, volks4th.com) \
| emu
./emulator/run-in-runcpm.sh \
"volks4th"
2023-07-02 21:21:44 +00:00
logtest.log: \
$(patsubst %, $(cpmfilesdir)/%, kernel.com fileint.fb log2file.fb) \
2023-07-02 21:21:44 +00:00
| emu
./emulator/run-in-runcpm.sh \
"kernel fileint.fb" \
"1 load onlyforth" \
2023-07-02 21:21:44 +00:00
"include log2file.fb" \
"logopen" \
".( hello world) cr" \
".( 0123456789abcdef0123456789abcdef) cr" \
".( 1123456789abcdef0123456789abcdef) cr" \
".( 2123456789abcdef0123456789abcdef) cr" \
".( 3123456789abcdef0123456789abcdef) cr" \
2023-07-02 21:21:44 +00:00
"logclose" \
"bye" \
"exit"
dos2unix -n $(runcpmdir)/logfile.txt $@
2023-07-02 09:29:47 +00:00
inctest.log: \
$(patsubst %, $(cpmfilesdir)/%, kernel.com fileint.fb \
include.fb log2file.fb inctest.fth) \
| emu
./emulator/run-in-runcpm.sh \
"kernel fileint.fb" \
"1 load onlyforth" \
2024-11-10 12:10:09 +00:00
"$50 constant /tib" \
"include include.fb" \
"include log2file.fb" \
"logopen" \
"include inctest.fth" \
"logclose" \
"bye" \
"exit"
dos2unix -n $(runcpmdir)/logfile.txt $@
$(cpmfilesdir)/tc-base.com: \
$(patsubst %, $(cpmfilesdir)/%, kernel.com \
fileint.fb ass8080.fb include.fb log2file.fb xinout.fb savesys.fb) \
Makefile | emu
rm -f $(runcpmdir)/A/0/TC-BASE.COM $@
./emulator/run-in-runcpm.sh \
"kernel fileint.fb" \
"1 load" \
"include log2file.fb" \
"logopen" \
"include ass8080.fb" \
".( include xinout.fb) cr" \
"include savesys.fb" \
"$50 constant /tib" \
"include include.fb" \
"cr decimal caps on" \
"scr off r# off savesystem tc-base.com" \
"logclose" \
"bye" \
"exit"
dos2unix -n $(runcpmdir)/logfile.txt $@.log
cp -f $(runcpmdir)/A/0/TC-BASE.COM $@
$(cpmfilesdir)/v4th.com: \
2024-11-03 14:14:33 +00:00
$(patsubst %, $(cpmfilesdir)/%, tc-base.com \
target.fb v4th.fth vf-core.fth vf-file.fth \
2024-11-10 11:43:13 +00:00
vf-io.fth vf-sys.fth vf-end.fth vf-bdos.fth) \
2024-10-08 20:20:11 +00:00
Makefile | emu
2024-11-03 14:14:33 +00:00
rm -f $(runcpmdir)/A/0/V4TH.COM $(runcpmdir)/A/0/LOGFILE.TXT $@
./emulator/run-in-runcpm.sh \
2024-11-03 14:14:33 +00:00
"tc-base" \
"logopen" \
"include target.fb" \
"include v4th.fth" \
"logclose" \
"bye" \
"exit"
dos2unix -n $(runcpmdir)/logfile.txt $@.log
cp -f $(runcpmdir)/A/0/V4TH.COM $@
$(cpmfilesdir)/v4thblk.com: \
$(patsubst %, $(cpmfilesdir)/%, tc-base.com \
target.fb v4thblk.fth vf-core.fth vf-file.fth \
vf-io.fth vf-bufs.fth vf-sys.fth vf-end.fth vf-bdos.fth) \
Makefile | emu
rm -f $(runcpmdir)/A/0/V4THBLK.COM $(runcpmdir)/A/0/LOGFILE.TXT $@
./emulator/run-in-runcpm.sh \
"tc-base" \
"logopen" \
"include target.fb" \
"include v4thblk.fth" \
"logclose" \
"bye" \
"exit"
dos2unix -n $(runcpmdir)/logfile.txt $@.log
cp -f $(runcpmdir)/A/0/V4THBLK.COM $@
test-kernel.log: \
$(patsubst %, $(cpmfilesdir)/%, kernel.com fileint.fb \
include.fb log2file.fb core.fr) \
$(patsubst tests/%, $(cpmfilesdir)/%, $(wildcard tests/*.fth)) \
| emu
./emulator/run-in-runcpm.sh \
"kernel fileint.fb" \
"1 load onlyforth" \
"$50 constant /tib" \
"include include.fb" \
"include test-krn.fth" \
"bye" \
"exit"
dos2unix -n $(runcpmdir)/logfile.txt $@
test-min.log: \
$(patsubst %, $(cpmfilesdir)/%, v4th.com sfileint.fth \
logfile.fth \
ans-shim.fth prelim.fth tester.fth core.fr test-min.fth) \
| emu
./emulator/run-in-runcpm.sh \
"v4th sfileint.fth" \
"include-isfile" \
"onlyforth" \
"include test-min.fth" \
"bye" \
"exit"
dos2unix -n $(runcpmdir)/logfile.txt $@
test-std.log: \
$(patsubst %, $(cpmfilesdir)/%, v4th.com sfileint.fth \
logfile.fth core.fr) \
$(patsubst tests/%, $(cpmfilesdir)/%, $(wildcard tests/*.fth)) \
| emu
./emulator/run-in-runcpm.sh \
"v4th sfileint.fth" \
"include-isfile" \
"onlyforth" \
"include test-std.fth" \
"bye" \
"exit"
dos2unix -n $(runcpmdir)/logfile.txt $@
2024-10-10 20:43:26 +00:00
test-blk.log: \
$(patsubst %, $(cpmfilesdir)/%, v4thblk.com sfileint.fth \
sblkint.fth logfile.fth core.fr) \
2024-10-10 20:43:26 +00:00
$(patsubst tests/%, $(cpmfilesdir)/%, $(wildcard tests/*.fth) \
tests/empty.fb) | emu
./emulator/run-in-runcpm.sh \
"v4thblk sfileint.fth" \
"include-isfile" \
"include sblkint.fth" \
"onlyforth" \
2024-10-10 20:43:26 +00:00
"include test-blk.fth" \
"bye" \
"exit"
dos2unix -n $(runcpmdir)/logfile.txt $@
emu: $(runcpmdir)/RunCPM
test-min.golden: $(patsubst %, tests/golden/%.golden, prelim core)
cat $^ > $@
test-std.golden: $(patsubst %, tests/golden/%.golden, \
prelim core coreplus coreext doubltst report-noblk)
cat $^ > $@
test-blk.golden: $(patsubst %, tests/golden/%.golden, \
prelim core coreplus coreext doubltst block report-blk)
cat $^ > $@
test-kernel.golden: $(patsubst %, tests/golden/%.golden, \
prelim core coreplus coreext report-nodbl)
cat $^ > $@
%.golden: tests/golden/%.golden
cp -p $< $@
%.result: %.log %.golden tests/evaluate-test.sh
rm -f $@
tests/evaluate-test.sh $(basename $@)
$(runcpmdir)/RunCPM: $(whitch_runcpm)
test -d $(runcpmdir) || mkdir -p $(runcpmdir)
cp $< $@
2023-05-21 20:48:35 +00:00
$(cpmfilesdir)/%: src/%
test -d $(cpmfilesdir) || mkdir -p $(cpmfilesdir)
cp $< $@
$(cpmfilesdir)/%: tests/%
test -d $(cpmfilesdir) || mkdir -p $(cpmfilesdir)
cp $< $@
$(cpmfilesdir)/%: %
test -d $(cpmfilesdir) || mkdir -p $(cpmfilesdir)
cp $< $@