Adds an OSX framework target and an API for doing the equivalent of what the main function was doing.