How to include header files in makefiles
jcm at FreeBSD-uk.eu.org
Fri Mar 18 20:08:25 PST 2005
On Fri, Mar 18, 2005 at 04:38:15PM +0000, Chuck Robey wrote:
: 1) relative addressing means you have to be forever translating paths in
: listings, and very often the number of include paths gets to be rather long.
Okay, I can fix that easily.
: The Make(1) man page doesn't show "include", the advertised command is
: ".include". If you use .include, then you can modify your make, if you
: >How can I include the .h files so the .c files are recompiled when the
: >header files they require are changed? GNU make has 'make depend' but I'd
: >like a better, BSDmake-centric way, if possible.
: Well, did you look at the files in /usr/share/mk, and specifically
: bsd.dep.mk? You can even use the FreeBSD sources to figure out (to use
: as examples) how things should work.
This is the key I want to get working. I'll take a look at those files, but
they are pretty deep.
: I honestly keep on switching back and forth, between thinking that the
: best make is bmake, or gmake. They both have key items that make them
: uniquely better.
I haven't decided yet. Most BSD people are (predictably) anti-gmake. I
have to use gmake for a Linux project I'm on.
My other computer is your Windows box.
More information about the freebsd-questions