Honor CFLAGS

The current code does not honor CFLAGS given by the user. This PR makes the build system honor them.