...
One could in theory maintain these by hand - but it would be very error prone and time consuming. Instead most good (not Microsoft) C++ compilers can generate these automatically using the -MMD flag. The precise flag will vary depending on the compiler.
Dependency files can be problem for builds. If a change is made such that say a header file is deleted then old dependency files can break the build since they may refer to the deleted header file.
...