updated dependencies to take the BUILD_SHARED_LIBRARIES flag
forwarding compiler flags from top level
small fixes