2017-11-08 16:43:52 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2018-11-14 23:56:30 +01:00
|
|
|
mkdir -p bin
|
|
|
|
|
2018-02-02 21:21:45 +01:00
|
|
|
echo Remove Old Binaries
|
2018-11-14 23:56:30 +01:00
|
|
|
rm -f bin/retro-unu
|
|
|
|
rm -f bin/retro
|
|
|
|
rm -f bin/retro-embedimage
|
|
|
|
rm -f bin/retro-repl
|
|
|
|
rm -f bin/retro-extend
|
|
|
|
rm -f bin/retro-muri
|
2017-11-08 16:43:52 +01:00
|
|
|
|
2018-10-08 17:35:27 +02:00
|
|
|
echo Build Unu
|
2018-11-14 23:56:30 +01:00
|
|
|
cc -O2 tools/unu.c -o bin/retro-unu
|
2017-11-08 16:43:52 +01:00
|
|
|
|
2018-02-02 21:21:45 +01:00
|
|
|
echo Updating Sources
|
2018-11-14 23:56:30 +01:00
|
|
|
./bin/retro-unu literate/Unu.md >tools/unu.c
|
|
|
|
./bin/retro-unu literate/Muri.md >tools/muri.c
|
2018-02-02 21:21:45 +01:00
|
|
|
|
2018-10-08 17:35:27 +02:00
|
|
|
echo Build Toolchain
|
2018-11-14 23:56:30 +01:00
|
|
|
cc -O2 tools/embedimage.c -o bin/retro-embedimage
|
|
|
|
cc -O2 tools/extend.c -o bin/retro-extend
|
|
|
|
cc -O2 tools/muri.c -o bin/retro-muri
|
2018-10-08 17:35:27 +02:00
|
|
|
|
2018-02-02 21:21:45 +01:00
|
|
|
echo Assemble ngaImage
|
2018-11-14 23:56:30 +01:00
|
|
|
./bin/retro-muri literate/Rx.md
|
|
|
|
./bin/retro-extend literate/RetroForth.md
|
2017-11-08 16:43:52 +01:00
|
|
|
|
2018-02-02 21:21:45 +01:00
|
|
|
echo Prepare Image for Embedding [repl, ri]
|
2018-11-14 23:56:30 +01:00
|
|
|
./bin/retro-embedimage > interfaces/image.c
|
2018-02-02 21:21:45 +01:00
|
|
|
|
2018-11-14 23:56:30 +01:00
|
|
|
echo Prepare Extended Image for Embedding [bin/retro-/unix]
|
2018-02-02 21:21:45 +01:00
|
|
|
cp ngaImage cleanImage
|
2018-11-14 23:56:30 +01:00
|
|
|
./bin/retro-extend interfaces/rre.forth
|
|
|
|
./bin/retro-embedimage >interfaces/rre_image_unix.c
|
2018-02-02 21:21:45 +01:00
|
|
|
mv cleanImage ngaImage
|
|
|
|
|
|
|
|
echo Compile repl
|
2017-12-11 19:04:15 +01:00
|
|
|
cd interfaces
|
2018-11-14 23:56:30 +01:00
|
|
|
cc -O2 repl.c -o ../bin/retro-repl
|
2017-12-11 19:04:15 +01:00
|
|
|
cd ..
|
|
|
|
|
2018-02-02 21:21:45 +01:00
|
|
|
echo Compile rre/unix
|
2017-11-08 16:43:52 +01:00
|
|
|
cd interfaces
|
2018-11-14 23:56:30 +01:00
|
|
|
cc -O2 rre.c -lm -o ../bin/retro
|
2017-11-08 16:43:52 +01:00
|
|
|
cd ..
|
2017-11-15 21:34:20 +01:00
|
|
|
|
2018-01-09 15:47:13 +01:00
|
|
|
echo "Update Glossary"
|
2018-02-02 17:28:45 +01:00
|
|
|
LC_ALL=c sort -o sorted.tsv words.tsv
|
|
|
|
mv sorted.tsv words.tsv
|
2018-11-14 23:56:30 +01:00
|
|
|
./bin/retro glossary.forth export glossary >doc/Glossary.txt
|