Add header files as dependency to object files. This causes object to be rebuilt when header files change. This is necessary since the header files are part of the translation unit for each object file (i.e. the header files are part of the input to the compiler, along with the object file's .c file, so since the input sent to the compiler has changed, the compiler output will of course be different, and that needs to be reflected in the makefile's dependencies).
Technically, each object file only needs to depend on those header files that are included. I just added them all. You can always go through each and make sure only those header files that are included in the obj file's source (including transitive includes) are marked as a dependency.
Add header files as dependency to object files. This causes object to be rebuilt when header files change. This is necessary since the header files are part of the translation unit for each object file (i.e. the header files are part of the input to the compiler, along with the object file's .c file, so since the input sent to the compiler has changed, the compiler output will of course be different, and that needs to be reflected in the makefile's dependencies).
Technically, each object file only needs to depend on those header files that are included. I just added them all. You can always go through each and make sure only those header files that are included in the obj file's source (including transitive includes) are marked as a dependency.