allow VM device configuration from either C or Configuration.mk; update the build instructions to point to Configuration.mk (thanks to technomancy for reporting the incorrect instructions)

FossilOrigin-Name: 077c1bb5fe053403a26c05dfe8a90721e8eb8084b5061ef969226909e7665e67
This commit is contained in:
crc 2023-11-20 13:16:55 +00:00
parent 75cd675c8b
commit 323dd2974d
5 changed files with 32 additions and 4 deletions

View file

@ -36,6 +36,29 @@ OPTIONS += -DBIT64
# then run `make`. Of particular note here, sockets support # then run `make`. Of particular note here, sockets support
# is disabled by default and you may wish to enable it. # is disabled by default and you may wish to enable it.
# The I/O devices can be enabled or disabled. Comment or
# uncomment the corresponding ENABLED and DEVICES lines and
# then run `make`. Of particular note here, sockets support
# is disabled by default and you may wish to enable it.
OPTIONS += -DMAKEFILE_CONFIG
ENABLED ?=
ENABLED += -DENABLE_FLOATS
ENABLED += -DENABLE_FILES
ENABLED += -DENABLE_UNIX
ENABLED += -DENABLE_RNG
ENABLED += -DENABLE_CLOCK
ENABLED += -DENABLE_SCRIPTING
# ENABLED += -DENABLE_SOCKETS
ENABLED += -DENABLE_SIGNALS
ENABLED += -DENABLE_MULTICORE
# ENABLED += -DENABLE_FFI
ENABLED += -DENABLE_ERROR
ENABLED += -DENABLE_UNSIGNED
ENABLED += -DENABLE_MALLOC
ENABLED += -DENABLE_BLOCKS
DEVICES ?= DEVICES ?=
DEVICES += interface/ll.retro DEVICES += interface/ll.retro
DEVICES += interface/dedup.retro DEVICES += interface/dedup.retro

View file

@ -41,5 +41,8 @@
hang on startup hang on startup
- added an initial man page for retro-compiler(1) - added an initial man page for retro-compiler(1)
- added new example showing decompression of ulz files - added new example showing decompression of ulz files
- configuration of devices can now be done in either config.h
or (by default) Configuration.mk
- build instructions for enabling/disabling devices updated
================================================================ ================================================================

View file

@ -302,8 +302,8 @@ be using this).
## I/O Devices ## I/O Devices
Many of the I/O devices are optional. The most common ones are Many of the I/O devices are optional. The most common ones are
enabled by default in the Makefile. Look near the end of the top enabled by default in the Configuration.mk. Look for the lines
section for lines starting with `ENABLED`: starting with `ENABLED`:
ENABLED ?= ENABLED ?=
ENABLED += -DENABLE_FLOATS ENABLED += -DENABLE_FLOATS

View file

@ -10,8 +10,8 @@ be using this).
## I/O Devices ## I/O Devices
Many of the I/O devices are optional. The most common ones are Many of the I/O devices are optional. The most common ones are
enabled by default in the Makefile. Look near the end of the top enabled by default in the Configuration.mk. Look for the lines
section for lines starting with `ENABLED`: starting with `ENABLED`:
ENABLED ?= ENABLED ?=
ENABLED += -DENABLE_FLOATS ENABLED += -DENABLE_FLOATS

View file

@ -11,6 +11,7 @@
**************************************************************/ **************************************************************/
#ifndef MAKEFILE_CONFIG
#define ENABLE_FLOATS #define ENABLE_FLOATS
#define ENABLE_FILES #define ENABLE_FILES
#define ENABLE_UNIX #define ENABLE_UNIX
@ -25,6 +26,7 @@
#define ENABLE_UNSIGNED #define ENABLE_UNSIGNED
#define ENABLE_MALLOC #define ENABLE_MALLOC
#define ENABLE_BLOCKS #define ENABLE_BLOCKS
#endif
#ifdef ENABLE_MULTICORE #ifdef ENABLE_MULTICORE
#define CORES 8 #define CORES 8