You can get SOFA by cloning the Git repository hosted on GitHub.
Get the current stable version on the v16.08 branch:
git clone -b v16.08 https://github.com/sofa-framework/sofa.git sofa/v16.08/src/
Or get the development unstable version on the master branch:
git clone -b master https://github.com/sofa-framework/sofa.git sofa/master/src/
Next, follow step by step the guidelines: