It has the following dependancies which you will need to install before compiling:
glm
glew
glfw3
With all these libraries installed you should be able to run the following to compile:
make all
make build
Once compiled sucessfully you can run the terragen:
./terragen
Press G to generate map
Press B to smooth map
Press S to save map in {rootFolder}/heightmaps