Waf scripts are largely hardcoded while CMake scripts have followed cpp-netlib template to date. Refactor waf scripts to match CMake logic.