CFLAGS and LDFLAGS had bad values.
The -I flag in gcc is a preprocessor flag. Replace CFLAGS with CPPFLAGS. It should not take link options.
The LDFLAGS should not take preprocessor options.