tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: NetBSD make: determining a relative OBJDIR?



On Apr 15,  3:31am, dholland-tech%netbsd.org@localhost (David Holland) wrote:
-- Subject: Re: NetBSD make: determining a relative OBJDIR?

| On Fri, Apr 13, 2018 at 07:12:39PM +0100, Joseph Koshy wrote:
|  > jk> What would be the cleanest way to is there a way to
|  > jk> determine the path to an obj/ directory, given relative
|  > jk> locations of source directories (A) and (B)?
|  > 
|  > christos> There is BINDPLIBS and LIBDPLIBS. Where is the actual example?
|  > 
|  > Example Elftoolchain build rules:
|  > 
|  >   https://sourceforge.net/p/elftoolchain/code/HEAD/tree/trunk/mk/elftoolchain.prog.mk
|  > 
|  >   <<snip>>
|  >   <</snip>>
|  > 
|  > Regards,
|  > Joseph Koshy
| 
| Unless you are specifically integrating with an existing build system
| that uses it and is too expensive to migate away... don't use the
| objdir misfeature of bmake.

On NetBSD the rules to do this [from line 12-72] are:

.for lib in dwarf elf elftc
PROGDPLIBS+=	${lib} ${.CURDIR}/${TOP}/lib${lib}
CPPFLAGS+=	-I${.CURDIR}/${TOP}/lib${lib}
.endfor

there is no ${OBJDIR} exposure...

christos


Home | Main Index | Thread Index | Old Index