Fix crash on empty input.
Better makefile.