Generate compile_commands.json from GNU make output online

Stuck in getting a compile_commands.json out of a C/C++ project using GNU make as the build tool? Copy and paste the make output here, and then you're done.

To get the output right and efficient, I recommend building projects by the command make clean && make -nw, which will print the directories. It also works perfectly with projects like Redis, which hides the build details from the terminal using ANSI escape code.

Happy playing GNU make C/C++ projects with VSCode/CLion/clang-tidy/Sourcetrail etc!

Additional resources about compilation database: