From owner-freebsd-hackers Wed Nov 8 13: 4:42 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp01.primenet.com (smtp01.primenet.com [206.165.6.131]) by hub.freebsd.org (Postfix) with ESMTP id 0A4FA37B479 for ; Wed, 8 Nov 2000 13:04:38 -0800 (PST) Received: (from daemon@localhost) by smtp01.primenet.com (8.9.3/8.9.3) id OAA06749; Wed, 8 Nov 2000 14:03:40 -0700 (MST) Received: from usr08.primenet.com(206.165.6.208) via SMTP by smtp01.primenet.com, id smtpdAAATeaqan; Wed Nov 8 14:03:26 2000 Received: (from tlambert@localhost) by usr08.primenet.com (8.8.5/8.8.5) id OAA26181; Wed, 8 Nov 2000 14:04:19 -0700 (MST) From: Terry Lambert Message-Id: <200011082104.OAA26181@usr08.primenet.com> Subject: Re: bsd.prog.mk and /usr/local/include To: andrew@ugh.net.au Date: Wed, 8 Nov 2000 21:04:19 +0000 (GMT) Cc: freebsd-hackers@FreeBSD.ORG In-Reply-To: from "andrew@ugh.net.au" at Nov 04, 2000 12:00:50 AM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > What is the proper way to get the C compiler to look in ${PREFIX}/include > for header files and ${PREFIX}/lib for libraries when using bsd.prog.mk? > > I can just use CFLAGS+= -I${PREFIX}/include -L${PREFIX}/lib but I suspect > there may be a better way. grepping for -I in bsd.prog.mk didn't show up > much however. Depends on why you are doing it. If you are using a compiler that is not the default compiler, and setting DESTDIR, you will have to set it by doctoring the CC line itself, since DESTDIR will cause your include path and library path to be overridden in this case (I saw this while using a newer g++ for exception handling and RTTI). If you are doing it for any other reason, setting CFLAGS for the include path and LDFLAGS for the library path is probably the right way to do it. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message