From owner-freebsd-hackers@freebsd.org Wed Jun 27 19:39:24 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18D811004531 for ; Wed, 27 Jun 2018 19:39:24 +0000 (UTC) (envelope-from leres@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id AA64D8F59E for ; Wed, 27 Jun 2018 19:39:23 +0000 (UTC) (envelope-from leres@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 69775100452E; Wed, 27 Jun 2018 19:39:23 +0000 (UTC) Delivered-To: hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56DD6100452B for ; Wed, 27 Jun 2018 19:39:23 +0000 (UTC) (envelope-from leres@freebsd.org) Received: from xse.com (xse.com [IPv6:2607:f2f8:abb8::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "xse.com", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DADA48F59C for ; Wed, 27 Jun 2018 19:39:22 +0000 (UTC) (envelope-from leres@freebsd.org) Received-SPF: pass (dot.xse.com: authenticated connection) receiver=dot.xse.com; client-ip=2001:558:6045:10:9084:9e0:4b6d:eb99; helo=[IPv6:fd:1965::50]; envelope-from=leres@freebsd.org; x-software=spfmilter 2.001 http://www.acme.com/software/spfmilter/ with libspf2-1.2.10; Received: from [IPv6:fd:1965::50] (ice.xse.com [IPv6:2001:558:6045:10:9084:9e0:4b6d:eb99]) (authenticated bits=0) by dot.xse.com (8.15.2/8.15.2) with ESMTPSA id w5RJdCgR094254 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Wed, 27 Jun 2018 12:39:15 -0700 (PDT) (envelope-from leres@freebsd.org) X-Authentication-Warning: dot.xse.com: Host ice.xse.com [IPv6:2001:558:6045:10:9084:9e0:4b6d:eb99] claimed to be [IPv6:fd:1965::50] Subject: Re: makefile question To: Hartmut Brandt , hackers@freebsd.org References: From: Craig Leres Message-ID: <88473e08-4207-1dad-6377-951ff14c277d@freebsd.org> Date: Wed, 27 Jun 2018 12:39:10 -0700 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.100.0 at dot.xse.com X-Virus-Status: Clean X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2018 19:39:24 -0000 On 6/27/2018 12:33 PM, Hartmut Brandt wrote: > I'm preparing an update for bsnmp and have the following problem: > > In libbsnmp a header file is created during the build process, which > obviously ends up in the object tree. Now I need to include this file > when building the daemon and modules from usr.sbin. I have the feeling > that doing > > CFLAGS += -I../../../lib/libbsnmp/libbsnmp > > in usr.sbin/bsnmp/bsnmp to reach into the library object directory > doesn't look right. > > Or is this the right way to do this? Check out usr.bin/w/Makefile, it uses a module from bin/ps. Craig # @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD: releng/11.2/usr.bin/w/Makefile 319186 2017-05-30 04:27:05Z ngie $ PROG= w SRCS= fmt.c pr_time.c proc_compare.c w.c MAN= w.1 uptime.1 LIBADD= kvm sbuf xo util LINKS= ${BINDIR}/w ${BINDIR}/uptime .PATH: ${SRCTOP}/bin/ps .include