2022-04-01 23:10:56 +00:00
|
|
|
|
2023-07-01 18:15:57 +00:00
|
|
|
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)
|
2022-04-01 23:10:56 +00:00
|
|
|
|
2022-04-30 21:07:46 +00:00
|
|
|
whitch_runcpm = $(shell which RunCPM)
|
|
|
|
runcpmdir = runcpm
|
|
|
|
cpmfilesdir = cpmfiles
|
|
|
|
|
|
|
|
fth: $(fthfiles)
|
|
|
|
|
|
|
|
clean:
|
2023-07-01 22:11:52 +00:00
|
|
|
rm -f *.log *.golden *.result
|
2022-04-30 21:07:46 +00:00
|
|
|
rm -rf $(runcpmdir)
|
|
|
|
rm -f msdos
|
|
|
|
|
2024-05-10 21:15:02 +00:00
|
|
|
veryclean: clean
|
|
|
|
rm -rf cpmfiles
|
|
|
|
|
2023-09-02 20:00:12 +00:00
|
|
|
test: logtest.result inctest.result test-min.result
|
2023-07-02 14:43:54 +00:00
|
|
|
|
2022-04-30 21:07:46 +00:00
|
|
|
run-editor: | msdos
|
2023-07-01 18:15:57 +00:00
|
|
|
FORTHPATH="f:\\src;f:\\tests;f:\\msdos" \
|
|
|
|
../../8086/msdos/emulator/run-in-dosbox.sh f:\\msdos\\volks4th.com
|
2022-04-01 23:10:56 +00:00
|
|
|
|
|
|
|
msdos:
|
|
|
|
ln -s ../../8086/msdos msdos
|
|
|
|
|
2023-05-21 20:57:17 +00:00
|
|
|
src/%.fth: src/%.fb ../../tools/fb2fth.py
|
2022-04-01 23:10:56 +00:00
|
|
|
../../tools/fb2fth.py $< $@
|
2022-04-30 21:07:46 +00:00
|
|
|
|
2023-07-01 18:15:57 +00:00
|
|
|
tests/%.fth: tests/%.fb ../../tools/fb2fth.py
|
|
|
|
../../tools/fb2fth.py $< $@
|
|
|
|
|
2023-09-02 19:16:39 +00:00
|
|
|
run-volks4th: \
|
|
|
|
$(patsubst %, $(cpmfilesdir)/%, volks4th.com) \
|
|
|
|
| emu
|
|
|
|
./emulator/run-in-runcpm.sh \
|
|
|
|
"volks4th"
|
|
|
|
|
2023-07-02 21:21:44 +00:00
|
|
|
logtest.log: \
|
2023-09-03 10:56:45 +00:00
|
|
|
$(patsubst %, $(cpmfilesdir)/%, kernel.com fileint.fb log2file.fb) \
|
2023-07-02 21:21:44 +00:00
|
|
|
| emu
|
|
|
|
./emulator/run-in-runcpm.sh \
|
2023-09-03 10:56:45 +00:00
|
|
|
"kernel fileint.fb" \
|
|
|
|
"1 load onlyforth" \
|
2023-07-02 21:21:44 +00:00
|
|
|
"include log2file.fb" \
|
|
|
|
"logopen" \
|
|
|
|
".( hello world) cr" \
|
2023-08-20 19:54:27 +00:00
|
|
|
".( 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: \
|
2023-09-03 10:56:45 +00:00
|
|
|
$(patsubst %, $(cpmfilesdir)/%, kernel.com fileint.fb \
|
2023-09-02 20:58:20 +00:00
|
|
|
include.fb log2file.fb inctest.fth) \
|
2022-04-30 21:07:46 +00:00
|
|
|
| emu
|
2023-07-02 09:23:26 +00:00
|
|
|
./emulator/run-in-runcpm.sh \
|
2023-09-03 10:56:45 +00:00
|
|
|
"kernel fileint.fb" \
|
|
|
|
"1 load onlyforth" \
|
2023-07-02 09:23:26 +00:00
|
|
|
"include include.fb" \
|
2023-07-02 09:47:08 +00:00
|
|
|
"include log2file.fb" \
|
|
|
|
"logopen" \
|
2023-07-02 09:23:26 +00:00
|
|
|
"include inctest.fth" \
|
2023-07-02 09:47:08 +00:00
|
|
|
"logclose" \
|
2023-09-02 21:10:05 +00:00
|
|
|
"bye" \
|
|
|
|
"exit"
|
|
|
|
dos2unix -n $(runcpmdir)/logfile.txt $@
|
|
|
|
|
2023-11-25 20:07:14 +00:00
|
|
|
target0.log: \
|
|
|
|
$(patsubst %, $(cpmfilesdir)/%, volks4th.com \
|
|
|
|
include.fb log2file.fb target.fb source2.fb) \
|
|
|
|
| emu
|
|
|
|
./emulator/run-in-runcpm.sh \
|
|
|
|
"volks4th" \
|
|
|
|
"include target.fb" \
|
|
|
|
"include source2.fb"
|
|
|
|
#vdos2unix -n $(runcpmdir)/logfile.txt $@
|
|
|
|
|
2023-09-03 11:22:05 +00:00
|
|
|
target1.log: \
|
2023-09-02 21:10:05 +00:00
|
|
|
$(patsubst %, $(cpmfilesdir)/%, volks4th.com \
|
|
|
|
include.fb log2file.fb target.fb source.fb) \
|
|
|
|
| emu
|
|
|
|
./emulator/run-in-runcpm.sh \
|
|
|
|
"volks4th" \
|
|
|
|
"include log2file.fb" \
|
|
|
|
"logopen" \
|
|
|
|
"include target.fb" \
|
|
|
|
"include source.fb" \
|
|
|
|
"logclose" \
|
2023-07-02 09:23:26 +00:00
|
|
|
"bye" \
|
|
|
|
"exit"
|
2023-07-02 09:47:08 +00:00
|
|
|
dos2unix -n $(runcpmdir)/logfile.txt $@
|
2023-09-03 11:22:05 +00:00
|
|
|
|
2023-11-25 20:07:14 +00:00
|
|
|
target3.log: \
|
|
|
|
$(patsubst %, $(cpmfilesdir)/%, volks4th.com \
|
|
|
|
include.fb log2file.fb target.fb source.fb) \
|
|
|
|
| emu
|
|
|
|
./emulator/run-in-runcpm.sh \
|
|
|
|
"volks4th" \
|
|
|
|
"include log2file.fb" \
|
|
|
|
"logopen" \
|
|
|
|
"include target.fb" \
|
|
|
|
"10 2 / ." \
|
|
|
|
"use source.fb" \
|
|
|
|
"Onlyforth" \
|
|
|
|
"9000 displace !"\
|
|
|
|
"Target definitions $100 here!" \
|
2024-09-13 19:46:38 +00:00
|
|
|
"2 75 thru"
|
2023-11-25 20:07:14 +00:00
|
|
|
dos2unix -n $(runcpmdir)/logfile.txt $@
|
|
|
|
|
2023-09-03 11:22:05 +00:00
|
|
|
target2.log: \
|
|
|
|
$(patsubst %, $(cpmfilesdir)/%, kernel.com fileint.fb ass8080.fb \
|
|
|
|
include.fb log2file.fb target.fb source.fb) \
|
|
|
|
| emu
|
|
|
|
./emulator/run-in-runcpm.sh \
|
|
|
|
"kernel fileint.fb" \
|
|
|
|
"1 load onlyforth" \
|
|
|
|
"include log2file.fb" \
|
|
|
|
"logopen" \
|
|
|
|
"include ass8080.fb" \
|
|
|
|
"include target.fb" \
|
|
|
|
"include source.fb" \
|
|
|
|
"logclose" \
|
|
|
|
"bye" \
|
|
|
|
"exit"
|
|
|
|
dos2unix -n $(runcpmdir)/logfile.txt $@
|
2022-04-30 21:07:46 +00:00
|
|
|
|
2023-11-25 20:07:14 +00:00
|
|
|
target4.log: \
|
|
|
|
$(patsubst %, $(cpmfilesdir)/%, kernel.com fileint.fb ass8080.fb \
|
|
|
|
include.fb log2file.fb target.fb source.fb) \
|
|
|
|
| emu
|
|
|
|
./emulator/run-in-runcpm.sh \
|
|
|
|
"kernel fileint.fb" \
|
|
|
|
"1 load onlyforth" \
|
|
|
|
"include ass8080.fb" \
|
|
|
|
"include target.fb" \
|
|
|
|
': status blk @ ?dup IF ." blk " u. ." here " here u. ' \
|
|
|
|
' ." there " there u. ." heap " heap u. cr THEN ; ' \
|
|
|
|
"' status is .status " \
|
|
|
|
"include source.fb"
|
|
|
|
|
2023-09-02 19:16:39 +00:00
|
|
|
test-min.log: \
|
2023-09-03 10:56:45 +00:00
|
|
|
$(patsubst %, $(cpmfilesdir)/%, kernel.com fileint.fb \
|
2023-09-02 20:58:20 +00:00
|
|
|
include.fb log2file.fb \
|
|
|
|
ans-shim.fth prelim.fth tester.fth core.fr test-min.fth) \
|
2023-09-02 19:16:39 +00:00
|
|
|
| emu
|
|
|
|
./emulator/run-in-runcpm.sh \
|
2023-09-03 10:56:45 +00:00
|
|
|
"kernel fileint.fb" \
|
|
|
|
"1 load onlyforth" \
|
2023-09-02 19:16:39 +00:00
|
|
|
"include include.fb" \
|
|
|
|
"include test-min.fth" \
|
|
|
|
"bye" \
|
|
|
|
"exit"
|
|
|
|
dos2unix -n $(runcpmdir)/logfile.txt $@
|
|
|
|
|
2022-04-30 21:07:46 +00:00
|
|
|
emu: $(runcpmdir)/RunCPM
|
|
|
|
|
2023-09-02 19:40:10 +00:00
|
|
|
test-min.golden: $(patsubst %, tests/golden/%.golden, prelim core)
|
|
|
|
cat $^ > $@
|
|
|
|
|
2023-07-01 22:11:52 +00:00
|
|
|
%.golden: tests/golden/%.golden
|
|
|
|
cp -p $< $@
|
|
|
|
|
|
|
|
%.result: %.log %.golden tests/evaluate-test.sh
|
|
|
|
rm -f $@
|
|
|
|
tests/evaluate-test.sh $(basename $@)
|
|
|
|
|
2022-04-30 21:07:46 +00:00
|
|
|
$(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 $< $@
|
|
|
|
|
2023-07-01 18:15:57 +00:00
|
|
|
$(cpmfilesdir)/%: tests/%
|
|
|
|
test -d $(cpmfilesdir) || mkdir -p $(cpmfilesdir)
|
|
|
|
cp $< $@
|
|
|
|
|
2022-04-30 21:07:46 +00:00
|
|
|
$(cpmfilesdir)/%: %
|
|
|
|
test -d $(cpmfilesdir) || mkdir -p $(cpmfilesdir)
|
|
|
|
cp $< $@
|