To compile on windows you need MinGW-32 and MSYS (or Cygwin or Git-Bash) installed in PATH
WARNING! MinGW version from second link is too old, do not install MinGW from mingw-get, install only MSYS
For Debian/Ubuntu:
sudo apt install libpng-dev
Just run make
command to build