Build-script : Make the script standalone as it's not needed to keep a link with CM tree. Also externalize some settings.

Signed-off-by: Tk-Glitch <Ti3noU@gmail.com>