3 ms·
Compilers like GNU cc (and clang, FWIW) have a flag you can pass to have it dump GNU make compatible dependency files, and you can have it include system header
by saurik 6y ago
Compilers like GNU cc (and clang, FWIW) have a flag you can pass to have it dump GNU make compatible dependency files, and you can have it include system header files (I turn this on); and in the other direction, there is a feature of make designed to fetch and include files if they exist and, if not, to actually consider it a target for the current build system to quickly build, mostly for these dependency output files. If you use GNU automake--which is not at all required (I do not tend to use it, for example) but is the intention of the ecosystem--this is all set up for you (though maybe without turning on the feature for system header files to be included?). If you are having issues with C code and make not knowing the dependencies, you are using the tools wrong.