Parsing issues in a manual makefile project

I use a hand-written Makefile in my project. I've produced build/compile_commands.json by running 'bear make', but jucipp shows parsing errors, mostly related to unresolved include paths, and possibly other issues.

My project can be found here: https://github.com/miki151/keeperrl/

To reproduce the issue:

  • install: libsdl2-dev, libsdl2-image-dev, libopenal-dev, libvorbis-dev, libcurl-dev
  • compile: run 'bear make'
  • run 'mkdir build'
  • run 'cp compile_commands.json build'
  • open the project in jucipp
  • almost every file in the project will show errors, and there are multiple errors in jucipp's stderr.
  • In particular, in 'extern/optional.h', the 'debug.h' include is unresolved, possibly due to debug.h being in the parent directory. Maybe the -I. flag to g++ was ignored?
  • an immediate issue with precompiled headers can be fixed by commenting out lines 136 and 137 in Makefile, but most other issues persist.