sets dependencies and linking in the library

It was actually broken (detected on other machine) because the library didn't have the _gencfg dependency.
Now works and the dependencies are factorized.

Sorry for the "noise".