Added back gateway build.
Working on mac support.