The man page for xcodebuild reads:
xcodebuild
Run xcodebuild from the directory containing your project (i.e. the directory containing the project
You should set the SYMROOT build setting to your desired location. All of the other relevant build settings are derived from it.
SYMROOT