Code clean up and fixes

This will simplify code maintenance by using a common header file and same version for both binaries
Fixes all compiler warnings
Adds a proper Makefile to compile static binaries and a make clean function
To compile: make
To clean: make clean
Just edit the CC part to your NDK cross compiler or a custom compiler by editing CFLAGS and any needed LDFLAGS