make makefile more flexible

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

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