From 9e98e38e33101744b6000e53372627f53b4fdffa Mon Sep 17 00:00:00 2001 From: Ryan Tucker Date: Sat, 26 Jul 2014 14:18:04 -0400 Subject: [PATCH] Update CMake options in READMEs (#285) Found all the cmake options I could, put them into the appropriate READMEs. There is some overlap between files but this may be a good starting point at least. --- README.md | 11 +++++++++++ host/README.md | 28 ++++++++++++++++------------ host/libraries/libbladeRF/README.md | 18 ++++++++++++++++++ host/utilities/bladeRF-cli/README.md | 14 +++++++++++++- 4 files changed, 58 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 96305aee..22106c1c 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,17 @@ The source is organized as follows: For more information, see the [bladeRF wiki]. +## Build Variables ## + +Below are global options to choose which parts of the bladeRF project should +be built from the top level. Please see the [fx3_firmware] and [host] +subdirectories for more specific options. + +| Option | Description +| --------------------------------- |:--------------------------------------------------------------------------| +| -DENABLE_FX3_BUILD=\ | Enables building the FX3 firmware. Default: OFF | | +| -DENABLE_HOST_BUILD=\ | Enables building the host library and utilities overall. Default: ON | + [firmware_common]: ./firmware_common (Host-Firmware common files) [fx3_firmware]: ./fx3_firmware (FX3 Firmware) [hdl]: ./hdl (HDL) diff --git a/host/README.md b/host/README.md index f89bab3b..6b2127f2 100644 --- a/host/README.md +++ b/host/README.md @@ -38,18 +38,22 @@ Below is a list of useful and project-specific CMake options. Please see the CMa more information. | Option | Description -| ----------------------------------------- |:---------------------------------------------------------------------------------------------------------| -| -DENABLE_HOST_BUILD=\ | Enables building of the Host components overall. Default is ON. | -| -DCMAKE_BUILD_TYPE=\ | Set to "Debug" to enable a debug build. "Release" is the default. | -| -DBUILD_DOCUMENTATION=\ | Build libbladeRF API documentation and manpages for utilities. OFF by default. | -| -DCMAKE_C_COMPILER=\ | Specify the compiler to use. Otherwise, CMake will determine a default. | -| -DENABLE_GDB_EXTENSIONS=\ | GCC & GDB users may want to set this to use -ggdb3 instead of -g. Disabled by default. | -| -DENABLE_BACKEND_LIBUSB=\ | Enables libusb backend in libbladeRF. Enabled by default. | -| -DENABLE_BACKEND_LINUX_DRIVER=\ | Enables Linux driver in libbladeRF. Disabled by default. | -| -DENABLE_LIBTECLA=\ | Enable libtecla support in the bladeRF-cli program. Default: ON if libtecla is detected, OFF otherwise. | -| -DINSTALL_UDEV_RULES=\ | Install udev rules to /etc/udev/rules.d/. Default: ON for Linux, OFF default otherwise. | -| -DBLADERF_GROUP=\ | Sets the group associated with the bladeRF in the installed udev rules. The default is plugdev. | -| -DTREAT_WARNINGS_AS_ERRORS=\ | Treat compiler warnings as errors, defaults to Yes. Contributors should keep this enabled. | +| ----------------------------------------- |:----------------------------------------------------------------------------------------------------------| +| -DCMAKE_BUILD_TYPE=\ | Set to "Debug" to enable a debug build. Default: "Release" | +| -DBUILD_DOCUMENTATION=\ | Build libbladeRF API documentation and manpages for utilities. Default: OFF | +| -DCMAKE_C_COMPILER=\ | Specify the compiler to use. Otherwise, CMake will determine a default. | +| -DCMAKE_INSTALL_PREFIX=\ | Override system-specific path to install output files. Default depends on system; see ```cmake -L``` | +| -DENABLE_GDB_EXTENSIONS=\ | GCC & GDB users may want to set this to use -ggdb3 instead of -g. Default: OFF | +| -DENABLE_BACKEND_LIBUSB=\ | Enables libusb backend in libbladeRF. Default: ON | +| -DENABLE_BACKEND_USB=\ | Enables USB backends in libbladeRF. Default: ON | +| -DENABLE_BACKEND_LINUX_DRIVER=\ | Enables Linux driver in libbladeRF. Default: OFF | +| -DENABLE_BACKEND_DUMMY=\ | Enables dummy backend support in libbladeRF. Only useful for some developers. Default: OFF | +| -DENABLE_LIBTECLA=\ | Enable libtecla support in the bladeRF-cli program. Default: ON if libtecla is detected, OFF otherwise. | +| -DINSTALL_UDEV_RULES=\ | Install udev rules to /etc/udev/rules.d/. Default: ON for Linux, OFF default otherwise. | +| -DUDEV_RULES_PATH=\ | Override the path for installing udev rules. Default: /etc/udev/rules.d | +| -DBLADERF_GROUP=\ | Sets the group associated with the bladeRF in the installed udev rules. Default: ```plugdev``` | +| -DTREAT_WARNINGS_AS_ERRORS=\ | Treat compiler warnings as errors. Contributors should keep this enabled. Default: ON | +| -DENABLE_LOG_FILE_INFO=\ | Enable source file and line number information in log messages. Default: OFF | [cmake]: ./cmake (CMake scripts) [drivers]: ./drivers (Drivers) diff --git a/host/libraries/libbladeRF/README.md b/host/libraries/libbladeRF/README.md index 66e267ee..fbd96c96 100644 --- a/host/libraries/libbladeRF/README.md +++ b/host/libraries/libbladeRF/README.md @@ -21,3 +21,21 @@ make libbladeRF-doxygen The HTML documentation will be placed in **\/libraries/libbladerf/doc/doxygen/html**. The **index.html** file is the "main" documentation page. Please see the [CHANGELOG](CHANGELOG) file for a summary of changes across libbladeRF versions. + +## Build Variables ## + +Below is a list of useful and project-specific CMake options. Please see the CMake [variable list] in CMake's documentation for +more information. + +| Option | Description +| ------------------------------------------------- |:------------------------------------------------------------------------------------------------------------------| +| -DBUILD_LIBBLADERF_DOCUMENTATION=\ | Builds API documentation using Doxygen. Default: equal to BUILD_DOCUMENTATION | +| -DENABLE_BACKEND_LIBUSB=\ | Enables libusb backend in libbladeRF. Default: ON | +| -DENABLE_BACKEND_USB=\ | Enables USB backends in libbladeRF. Default: ON | +| -DENABLE_BACKEND_LINUX_DRIVER=\ | Enables Linux driver in libbladeRF. Default: OFF | +| -DENABLE_BACKEND_DUMMY=\ | Enables dummy backend support in libbladeRF. Only useful for some developers. Default: OFF | +| -DENABLE_LIBBLADERF_LOGGING=\ | Enable log messages in libbladeRF. Default: ON | +| -DENABLE_LIBBLADERF_SYNC=\ | Enable the libbladeRF synchronous data interface. Requires pthreads. Default: ON | +| -DENABLE_LIBBLADERF_SYNC_LOG_VERBOSE=\ | Enable log_verbose() calls in the sync interface's data path. Note that this may harm performance. Default: OFF | +| -DLIBUSB_DETACH_KERNEL_DRIVER=\ | Enable calls to libusb_detach_kernel_driver(). Not supported in Windows. Default: ON | +| -DLIBUSB_PATH=\ | Path to libusb files. (This is generally only needed for Windows users who downloaded binary distributions.) | diff --git a/host/utilities/bladeRF-cli/README.md b/host/utilities/bladeRF-cli/README.md index f7809bd9..48c928fc 100644 --- a/host/utilities/bladeRF-cli/README.md +++ b/host/utilities/bladeRF-cli/README.md @@ -3,14 +3,26 @@ This tool is intended to aid in development and testing. bladeRF-cli can be use ## Dependencies ## - [libbladeRF][libbladeRF] +- [help2man][help2man] (optional) - [libtecla][libtecla] (optional) +- [pandoc][pandoc] (optional) [libbladeRF]: ../../libraries/libbladeRF (libbladeRF) +[help2man]: https://www.gnu.org/software/help2man/ (help2man) [libtecla]: http://www.astro.caltech.edu/~mcs/tecla/ (libtecla) +[pandoc]: http://johnmacfarlane.net/pandoc/ (pandoc) +## Build Variables ## -The bladeRF-cli build should detect whether libtecla is installed, and configure the ENABLE_LIBTECLA variable accordingly. You can override this when configuring the build with CMake via a ```-DENABLE_LIBTECLA=OFF``` argument. +Below is a list of useful and project-specific CMake options. Please see the CMake [variable list] in CMake's documentation for +more information. +| Option | Description +| --------------------------------------------- |:---------------------------------------------------------------------------------------------------------| +| -DENABLE_LIBTECLA=\ | Enable libtecla support in the bladeRF-cli program. Default: ON if libtecla is detected, OFF otherwise. | +| -DBUILD_BLADERF_CLI_DOCUMENTATION=\ | Builds a man page for the bladeRF-cli utility, using help2man. Default: equal to BUILD_DOCUMENTATION | + +When pandoc is installed, the documentation for each bladeRF-cli command will be re-generated for the interactive 'help' command and the man page. ## Basic Usage ## For usage information, run: