improve makefile

Signed-off-by: Mattias Andrée <maandree@operamail.com>
static linking

Signed-off-by: Mattias Andrée <maandree@operamail.com>
further improve makefile

Signed-off-by: Mattias Andrée <maandree@operamail.com>
misc

Signed-off-by: Mattias Andrée <maandree@operamail.com>
m + fork so that the terminal is ensured to be properly restored

Signed-off-by: Mattias Andrée <maandree@operamail.com>
simplification

Signed-off-by: Mattias Andrée <maandree@operamail.com>
add posibility to add extra compile flags

Signed-off-by: Mattias Andrée <maandree@operamail.com>
optimisations for binary size

Signed-off-by: Mattias Andrée <maandree@operamail.com>