Makefile: autobuild dependency rules

This uses gcc to generate dependency rules for each `.o` file, based on the
corresponding `.c` file, into a new set of `.d` files (which are also defined
to depend on the same set of source files as their `.o` files).

Result:
* all objectfile dependencies are correctly calculated
* only the necessary dependencies are recalculated when a sourcefile is updated

Inspiration for the build rules:
* http://www.gnu.org/software/make/manual/make.html#Automatic-Prerequisites
* http://make.paulandlesley.org/autodep.html

Signed-off-by: Lars Hjemli <hjemli@gmail.com>
This commit is contained in:
Lars Hjemli
2008-03-24 23:01:44 +01:00
szülő 271818693d
commit df90b51baf
2 fájl változott, egészen pontosan 11 új sor hozzáadva és 1 régi sor törölve

1
.gitignore vendored
Fájl megtekintése

@ -3,3 +3,4 @@ cgit
cgit.conf
VERSION
*.o
*.d