Added all to makefile
Not sure which png.h to use, picking the one from cmist's /usr/include. Will poke Andrew about it.
Fixed lack of vars x and y in average