From owner-freebsd-hackers Tue Feb 16 9:17: 3 1999 Received: from mail.palmerharvey.co.uk (mail.palmerharvey.co.uk [62.172.109.58]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA11791 for ; Tue, 16 Feb 1999 09:16:54 -0800 (PST) (envelope-from Dom.Mitchell@palmerharvey.co.uk) Received: from ho-nt-01.pandhm.co.uk (unverified) by mail.palmerharvey.co.uk (Content Technologies SMTPRS 2.0.15) with ESMTP id ; Tue, 16 Feb 1999 17:16:38 +0000 Received: from voodoo.pandhm.co.uk ([10.100.35.12]) by ho-nt-01.pandhm.co.uk with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2232.9) id 1LNB7XA8; Tue, 16 Feb 1999 17:11:12 -0000 Received: from dom by voodoo.pandhm.co.uk with local (Exim 2.10 #1) id 10Co9E-000J2n-00; Tue, 16 Feb 1999 17:19:00 +0000 To: Roland Jesse Cc: freebsd-hackers@freebsd.org Subject: Re: Makefile: >1 program without a single target each. X-Mailer: nmh v0.26 X-Colour: Green Organization: Palmer & Harvey McLane In-Reply-To: Roland Jesse's message of "Tue, 16 Feb 1999 15:41:45 +0100" <19990216154145.A1700@cs.uni-magdeburg.de> Date: Tue, 16 Feb 1999 17:19:00 +0000 From: Dom Mitchell Message-Id: Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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