I\'ve trying to learn the \"best practice\" makefile\'s for a project.
Please review my Makefile file below and suggest changes to enhance it.
The dir layout:>
See this and that answers for examples about Makefile
. Also run make -p
to understand the builtin rules inside GNU make, so use $(LINK.cc)
for e.g. your bin/tengine
target.
For complex builds, consider upgrading to GNU make 4.0 and use its Guile ability.
You may want to generate automatically dependencies. Read automatic prerequisites and about autodependencies; read also about GCC preprocessor options like -M
or -MD
etc etc ....