Refactor define_dependency_libs macro.

Change to remove the references to engine's sub-library targets which are now defunct. General cleanup of the build scripts.