Functions related to logging are extracted into dedicated source files
for better maintainability.
The existing low-level logging API is extended with a generalized scheme
providing log functions log_{error, warning, notice, info, debug} that
log messages based on a global opt_log_level.
opt_log_level for now is set to LOG_NOTICE and might be modified via
command line options or config files in future releases.
This patch is an initial attempt to re-structure cgminer source
code from its monolithic design (with nearly all code being
concentrated in main.c) to a more modular one.
In this first stage, the conditionally compiled functions for
GPU and CPU mining were extracted into dedicated files:
* device-cpu.h and device-cpu.c covering WANT_CPUMINE functions
* device-gpu.h and device-gpu.c covering HAVE_OPENCL functions
The main.c file is left untouched as reference, while the
remainder without the extracted parts is located in cgminer.c.
The Makefile.am has been updated to use the re-structured
source files for the build.
Above pure re-structuring *NO* functional modifications were
made. The sources were tested to compile and run on on a
current Linux system with working CPU and GPU mining
(Bitforce not tested due to loack of hardware).
cgminer will scan for and mine BitForce FPGAs on USB ports by providing the
new --scan-serial <device> option, or autodetect them by searching
/dev/serial/by-id for *BitFORCE_SHA256*
Check for the presence of the ADL header files in ADL_SDK.
Import adl_functions.h from amd overdrive ctrl.
Implement a setup function that tries to detect GPUs that support the ADL and link in the parameters into the gpus struct.
Put a summary of monitoring information from the GPU menu.
That LIBCURL_CHECK_CONFIG macro apparently did some things wrong
too, like adding libraries to a non-standard "LIBCURL" variable
instead of "LIBCURL_LIBS". Fixes linking after the previous commit.