Fixed sign conversion problems in a sloppy fashion.
Added build automation.

It works with GNU Make and GCC or Clang.
Moved things around.
Zapped chunks of spaces to tabs with the exception of one line, where they have semantic value.