https://developer.mozilla.org/en-US/docs/Simple_Firefox_build
This might take a while- perhaps a couple of hours. If you aren't already set up as a developer, you may need to do some other things too. Here are the build prerequisites. There are instructions to install all the tools you will need on various operating systems in order to build Firefox. https://developer.mozilla.org/en-US/docs/Developer_Guide/Build_Instructions#Build_prerequisites
==Update to the latest build==