Make’s implicit rules are supposedly there to make writing Makefiles easier but, if my understanding is correct, if my C files depend on any header files, I need to write the rule, explicitly. Am I right? This seems to serioiusly lower the usefulness of implicit rules, since most C files depend on a couple of header files, so I thought perhaps there’s something I’m missing.
Make’s implicit rules are supposedly there to make writing Makefiles easier but, if my
Share
You don’t need to write the rule, only the dependencies. Example:
The file foo.o will still be generated by the implicit rule, but have the additional dependencies
foo.handbar.h. This dependency line can also be auto-generated by most compilers.