scandum / tintin

TinTin++, aka tt++, is an extensible console MUD client.
https://tintin.mudhalla.net
GNU General Public License v3.0
201 stars 56 forks source link

Fix Makefile #10

Closed lucianposton closed 4 years ago

lucianposton commented 4 years ago

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.