Merge "Updates to makefiles and sources to support third-party builds"