added logic to use default flags for compiler optimisations, but still retain flexibility to provide custom CFLAGS through command line