The CPP and LD flags were being defined by an empty string that was supposed to be "pkg-config". Just use that instead to unbreak the build.