From 323dd2974d8f47ec86902c54b6e9a2eb07c8840a Mon Sep 17 00:00:00 2001 From: crc <> Date: Mon, 20 Nov 2023 13:16:55 +0000 Subject: [PATCH] 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 --- Configuration.mk | 23 +++++++++++++++++++++++ RELEASE-NOTES | 3 +++ doc/RETRO-Book.md | 4 ++-- doc/book/building/advanced | 4 ++-- vm/nga-c/config.h | 2 ++ 5 files changed, 32 insertions(+), 4 deletions(-) diff --git a/Configuration.mk b/Configuration.mk index 141579c..3c48cd1 100644 --- a/Configuration.mk +++ b/Configuration.mk @@ -36,6 +36,29 @@ OPTIONS += -DBIT64 # then run `make`. Of particular note here, sockets support # 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 += interface/ll.retro DEVICES += interface/dedup.retro diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 0be1c49..e0d7e93 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -41,5 +41,8 @@ hang on startup - added an initial man page for retro-compiler(1) - 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 ================================================================ diff --git a/doc/RETRO-Book.md b/doc/RETRO-Book.md index ffc340e..e3010a6 100644 --- a/doc/RETRO-Book.md +++ b/doc/RETRO-Book.md @@ -302,8 +302,8 @@ be using this). ## I/O Devices 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 -section for lines starting with `ENABLED`: +enabled by default in the Configuration.mk. Look for the lines +starting with `ENABLED`: ENABLED ?= ENABLED += -DENABLE_FLOATS diff --git a/doc/book/building/advanced b/doc/book/building/advanced index 098a54e..deb2874 100644 --- a/doc/book/building/advanced +++ b/doc/book/building/advanced @@ -10,8 +10,8 @@ be using this). ## I/O Devices 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 -section for lines starting with `ENABLED`: +enabled by default in the Configuration.mk. Look for the lines +starting with `ENABLED`: ENABLED ?= ENABLED += -DENABLE_FLOATS diff --git a/vm/nga-c/config.h b/vm/nga-c/config.h index 24ec391..07ca931 100644 --- a/vm/nga-c/config.h +++ b/vm/nga-c/config.h @@ -11,6 +11,7 @@ **************************************************************/ +#ifndef MAKEFILE_CONFIG #define ENABLE_FLOATS #define ENABLE_FILES #define ENABLE_UNIX @@ -25,6 +26,7 @@ #define ENABLE_UNSIGNED #define ENABLE_MALLOC #define ENABLE_BLOCKS +#endif #ifdef ENABLE_MULTICORE #define CORES 8