add CFLAGS optimizations
small changes to scripts for deterministic builds