flycheck C header file not found, but makefile is correct

[Originally posted by]:

Flycheck does not use Makefiles, nor does it attempt to parse them. I cannot help but wonder how you even got this idea, given that no such behaviour is documented in the manual, and no syntax checker for make files even exists.

Flycheck runs Clang directly. You need to explicitly configure the include path for syntax checking by setting flycheck-clang-include-path accordingly. You must do so yourself, this is not done automatically based on your Makefile.

You can set the path via file/dir local variables, or write some custom Emacs Lisp code to parse your Makefile.