Improve makefile with dependencies and ability to set local CFLAGS
Remove unneeded include from main.c
Fix to make compilation warning free

Now it can compile with -Wall -Werror, end-users are spared that setting to
avoid compile failures when they use a different compiler.
Ignore non-source files
Use the correct function to enable/disable programming

The formerly used function didn't reset the chip so it just failed for me.