use CFLAGS, CPPFLAGS and LDFLAGS properly