Overview
Proone’s build system provides several configuration options to customize the build for different deployment scenarios. These options control debugging, linking behavior, feature sets, and memory usage optimizations.Configure Flags
Configuration flags are passed to the./configure script to control build behavior.
—enable-debug
Build with debug flags and enable verbose logging.- Sets
PRNE_DEBUG=1in the compiled code - Enables debug symbols for GDB debugging
- Activates verbose logging at runtime
- Disables compiler optimizations for easier debugging
no (disabled)
When to use:
- Development and testing
- Debugging crashes or unexpected behavior
- Analyzing execution flow with verbose logs
—enable-static
Build statically linked executables.- Links all libraries statically into the executable
- Creates standalone binaries with no runtime dependencies
- Increases executable size significantly
- Eliminates dependency on shared libraries on target systems
no (disabled, uses dynamic linking)
When to use:
- Targeting embedded devices without full library installations
- Maximum portability across different Linux distributions
- Production deployments where library versions may vary
- Cross-compilation for IoT devices
—enable-mttools
Build maintenance tools for CNC operations.- Enables compilation of maintenance and administration tools
- Requires additional dependencies (libyaml, mariadb-connector-c)
- Requires mbedtls compiled with threading support (
MBEDTLS_THREADING_C) - Builds:
proone-hostinfod- Authoritative heartbeat serverproone-htbtclient- Instance maintenance client- Database-backed CNC infrastructure tools
no (disabled)
When to use:
- Building CNC server infrastructure
- Setting up authoritative heartbeat hosts
- Developing or testing heartbeat protocol implementations
—enable-minmem
Use only the minimum amount of memory required to function.- Sets
PRNE_USE_MIN_MEM=1in the compiled code - Reduces buffer sizes and memory allocations
- Optimizes for extremely resource-constrained environments
- May impact performance in favor of lower memory footprint
no (disabled)
When to use:
- Targeting very low-memory embedded devices (< 32MB RAM)
- Devices already running memory-intensive services
- Situations where staying under memory limits is critical
- Reduced throughput for network operations
- Slower binary recombination process
- May increase susceptibility to ENOMEM failures
Environment Variables
These variables can be set before running./configure to customize the build.
PRNE_VERBOSE
Set the compile-time verbose logging level (requires--enable-debug).
0- Minimal logging (errors only)1- Warnings and errors2- Info, warnings, and errors (default)3- Debug, info, warnings, and errors4+- Trace-level verbose logging
2
Note: Only effective when --enable-debug is enabled. Higher values produce more verbose output, useful for detailed execution tracing.
Source: ~/workspace/source/configure.ac:65-69
BIN_ALIGNMENT
Set the binary alignment size for data structures.- Must be a power of 2 (typically 4, 8, 16, or 32)
- Affects memory alignment of binary archive structures
- May impact performance on some architectures
8 bytes
When to modify:
- Targeting architectures with specific alignment requirements
- Performance tuning for cache line optimization
CFLAGS / CXXFLAGS
Custom compiler flags.LDFLAGS / CPPFLAGS
Linker and preprocessor flags.Configuration Examples
Development Build
Full debugging with verbose output:Embedded Device Build
Statically linked with minimal memory footprint:Production Release Build
Optimized, static, no debug:CNC Server Build
Maintenance tools with debugging:Cross-Compilation Example
For ARM embedded device:Build Entropy
Proone automatically generates build-time entropy during configuration:Library Detection
The configure script automatically detects required libraries. If a library is missing, configuration fails with an error message:- pthread (
pthread_create) - rt (
shm_open) - zlib (
zlibVersion) - mbedcrypto (
mbedtls_cipher_setup) - mbedx509 (
mbedtls_x509_crt_parse) - mbedtls (
mbedtls_ssl_init) - libssh2 (
libssh2_init) - pthsem (
pth_init)
yaml_parser_initialize)
10. mariadb (mysql_init)
11. mbedtls threading support check
Source: ~/workspace/source/configure.ac:79-140
Generated Files
Configuration generates the following files:config.status- Records the configuration commandconfig.log- Detailed log of configuration testsMakefile- Main build filesrc/Makefile- Source directory build filesrc/config_gen.h- Header with configuration macros
Viewing Current Configuration
After running configure, review the configuration:Next Steps
- Return to Building Proone for the complete build process
- See Cross-Compilation for multi-architecture builds
