Date: Sun, 06 Jan 2013 11:32:12 -0700 From: Ian Lepore <freebsd@damnhippie.dyndns.org> To: lev@freebsd.org Cc: hackers@freebsd.org Subject: Re: Proper way to determine place of system sources in makefile? Message-ID: <1357497132.1088.82.camel@revolution.hippie.lan> In-Reply-To: <1582957716.20130106221709@serebryakov.spb.ru> References: <1582957716.20130106221709@serebryakov.spb.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 2013-01-06 at 22:17 +0400, Lev Serebryakov wrote: > Hello, Hackers. > > I'm writing some code, which is built outside of system sources but > depends on them. > > I'm using FreeBSD mk infrastructure. > > When code is kernel module (uses <bsd.kmod.mk>) here is SYSDIR > variable. > > But which is proper way to refer to system sources when makefile is > prepared for shared library (<bsd.lib.mk>) or program (<bsd.prog.mk>)? > That may depend on what you mean by "system sources." In particular, some header files which are generated during the build don't live under /usr/src/sys, they're in $OBJDIR/sys/<kernconf>/. I was struggling with how to include such a file (in a non-hacky way) while building a bootloader from sys/boot/arm the other day, and I never did come up with a clean answer. (I do understand why -- the header files I wanted have content that changes based on KERNCONF=, and sys/boot is built during buildworld, not buildkernel.) -- Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1357497132.1088.82.camel>