add missing function prototypes
add config.def.h, and options for env-var
use stdbool instead of custom bool type
do not use zero-sized array hack
update Makefile

 - better variable declaration
 - use pedantic C99
 - remove useless BIN variable
 - suppress rm error under 'clean'