build: Improve CFLAGS handling.