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
|
|
|
|
|
2024-10-08 16:10:53 +00:00
|
|
|
bin: $(cpmfilesdir)/v4th.com
|
|
|
|
|
2022-04-30 21:07:46 +00:00
|
|
|
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
|
2024-10-08 16:10:53 +00:00
|
|
|
rm -rf $(cpmfilesdir)
|
2024-05-10 21:15:02 +00:00
|
|
|
|
2024-10-08 16:10:53 +00:00
|
|
|
test: logtest.result inctest.result test-min.result test-v4th.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 $@
|
|
|
|
|
2024-10-08 16:10:53 +00:00
|
|
|
$(cpmfilesdir)/v4th.com: \
|
2023-09-02 21:10:05 +00:00
|
|
|
$(patsubst %, $(cpmfilesdir)/%, volks4th.com \
|
2024-10-07 20:35:21 +00:00
|
|
|
include.fb log2file.fb target.fb source.fb v4th.fth) Makefile \
|
2023-09-02 21:10:05 +00:00
|
|
|
| emu
|
2024-10-07 20:35:21 +00:00
|
|
|
rm -f $(runcpmdir)/A/0/KERNEL.COM
|
2023-09-02 21:10:05 +00:00
|
|
|
./emulator/run-in-runcpm.sh \
|
|
|
|
"volks4th" \
|
|
|
|
"include log2file.fb" \
|
|
|
|
"logopen" \
|
2024-10-07 20:35:21 +00:00
|
|
|
"include include.fb" \
|
2023-09-02 21:10:05 +00:00
|
|
|
"include target.fb" \
|
2024-10-07 20:35:21 +00:00
|
|
|
"include v4th.fth" \
|
2023-09-02 21:10:05 +00:00
|
|
|
"logclose" \
|
2023-07-02 09:23:26 +00:00
|
|
|
"bye" \
|
|
|
|
"exit"
|
2024-10-06 20:51:50 +00:00
|
|
|
dos2unix -n $(runcpmdir)/logfile.txt $@.log
|
2024-10-07 20:35:21 +00:00
|
|
|
cp -f $(runcpmdir)/A/0/V4TH.COM $@
|
2023-09-03 11:22:05 +00:00
|
|
|
|
2024-10-07 20:35:21 +00:00
|
|
|
v4th2.com: \
|
2023-11-25 20:07:14 +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" \
|
2023-09-03 11:22:05 +00:00
|
|
|
"include source.fb" \
|
|
|
|
"logclose" \
|
|
|
|
"bye" \
|
|
|
|
"exit"
|
2024-10-07 20:35:21 +00:00
|
|
|
dos2unix -n $(runcpmdir)/logfile.txt $@.log
|
|
|
|
cp $(runcpmdir)/A/0/KERNEL.COM $@
|
2023-11-25 20:07:14 +00:00
|
|
|
|
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 $@
|
|
|
|
|
2024-10-06 20:51:50 +00:00
|
|
|
test-v4th.log: \
|
|
|
|
$(patsubst %, $(cpmfilesdir)/%, v4th.com fileint.fb \
|
|
|
|
include.fb log2file.fb \
|
|
|
|
ans-shim.fth prelim.fth tester.fth core.fr test-min.fth) \
|
|
|
|
| emu
|
|
|
|
./emulator/run-in-runcpm.sh \
|
|
|
|
"v4th fileint.fb" \
|
|
|
|
"1 load onlyforth" \
|
|
|
|
"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 $^ > $@
|
|
|
|
|
2024-10-06 20:51:50 +00:00
|
|
|
test-v4th.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 $< $@
|