retroforth/doc/book/building/unix
crc d36068d72f begin working on making terminology around the Retro naming consistent
FossilOrigin-Name: 9ec7d6dee1b22e748cd1f00886b5c2ed76e4b6138c131f699cbbb0c640c561a3
2021-05-12 13:57:22 +00:00

89 lines
1.7 KiB
Text

# Building on BSD, Linux, macOS, and other Unix Targets
Retro is well supported on BSD (tested on FreeBSD, NetBSD,
OpenBSD), Linux, and macOS systems. It should build on any
of these without issue.
## Requirements
- c compiler & linker
- standard headers
- make
## Process
For a standard 32-bit system:
Run `make`
For a 64-bit system:
Run `make OPTIONS=-DBIT64`
This will build the toolchain and then the main `retro`
executable.
## Executables
In the `bin/` directory, you should see the following:
retro
retro-unu
retro-muri
retro-extend
retro-embedimage
retro-describe
## Test The Build
You can conduct a quick test of the build by running `bin/retro`:
./bin/retro
Exit by typing `bye` and pressing enter.
## Installation
You can install Retro globally on BSD systems (and possibly Linux)
by doing:
doas make install
or:
sudo make install
## Platform Specific Notes
In addition to the 64-bit build, it is possible to override the
image size, address stack depth, and data stack depth by defining
the appropriate elements.
E.g., for a 64-bit build with:
4,000,000 cells of memory
4,000 item limit on data stack
500 item limit on address stack
Run `make OPTIONS="-DBIT64 -DIMAGE_SIZE=4000000 -DSTACK_DEPTH=4000 -DADDRESSES=500"`
### Haiku
To build on Haiku, you need to link with the *network* library.
E.g.:
make LDFLAGS=-lnetwork
### Unix
On Unix, you can optionally enable the sockets device (and thus the socket
words) by building with `-DENABLE_SOCKETS`.
make OPTIONS="-DENABLE_SOCKETS"
## Issues
If you run into any build issues, please send details to
crc@forth.works so I can work on addressing them as quickly
as possible.