Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Feb 1999 17:19:00 +0000
From:      Dom Mitchell <Dom.Mitchell@palmerharvey.co.uk>
To:        Roland Jesse <jesse@prinz-atm.CS.Uni-Magdeburg.De>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Makefile: >1 program without a single target each. 
Message-ID:  <E10Co9E-000J2n-00@voodoo.pandhm.co.uk>
In-Reply-To: Roland Jesse's message of "Tue, 16 Feb 1999 15:41:45 %2B0100" <19990216154145.A1700@cs.uni-magdeburg.de> 

next in thread | previous in thread | raw e-mail | index | archive | help
On 16 February 1999, Roland Jesse proclaimed:
> Assumed, I have the source code for more than just one program in a
> directory (because they share a couple source code files). How does
> the Makefile has to / should look like?

From the top of /usr/src/share/mk/bsd.README:

------------------------------------------------------------------------
It's fairly difficult to make the BSD .mk files work when you're
building multiple programs in a single directory. It's a lot easier
split up the programs than to deal with the problem. Most of the agony
comes from making the "obj" directory stuff work right, not because we
switch to a new version of make. So, don't get mad at us, figure out a
better way to handle multiple architectures so we can quit using the
symbolic link stuff. (Imake doesn't count.)
------------------------------------------------------------------------

As to handling common code, you can handle this in other ways using the
Makefile.  I think specifying one of the OBJS files as
../otherprog/mysrc.c will do the trick, although I don't think it's the
cleanest way.  You may want to consider building a small library.
-- 
Dom Mitchell -- Palmer & Harvey McLane -- Unix Systems Administrator

	Free your mind -- http://www.opensource.org/
-- 
**********************************************************************
This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they   
are addressed. If you have received this email in error please notify 
the system manager.

This footnote also confirms that this email message has been swept by 
MIMEsweeper for the presence of computer viruses.
**********************************************************************

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E10Co9E-000J2n-00>