For UNIX/Linux, the following commands are supposed to install all the necessary packages.
sudo apt-get install freeglut3 freeglut3-dev
sudo apt-get install freeglut freeglut-devel
sudo yum install freeglut
sudo yum install freeglut-devel
make
./stlviewer <stlfile>
./stlviewer --help