Re:Practical Makefiles, by example
by atrn on Thursday April 02, 2015 @06:58AM
(#9309851)
I like to put CFLAGS/CXXFLAGS et al in separate files that just define the corresponding macro. These get included in the makefile which has dependencies added to rules that reference such a macro on the file that defines the macro. E.g. the .o rule for C++ has a dependency on the CXXFLAGS which defines CXXFLAGS. Change CXXFLAGS and things rebuild, mess with LDFLAGS and you re-link etc... Handy if you need it but you can end up with lots of little files.
[ Parent
| on HN ]
There are no comments on this comment yet.