tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: NetBSD make: determining a relative OBJDIR?
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>>
# TODO[#271]: Reduce the code duplication below.
.if defined(LDADD)
_LDADD_LIBDWARF=${LDADD:M-ldwarf}
.if !empty(_LDADD_LIBDWARF)
CFLAGS+= -I${.CURDIR}/${TOP}/libdwarf
.if exists(${.OBJDIR}/${TOP}/libdwarf)
LDFLAGS+= -L${.OBJDIR}/${TOP}/libdwarf
.elif exists(${TOP}/libdwarf/${.OBJDIR:S,${.CURDIR}/,,})
LDFLAGS+= -L${.CURDIR}/${TOP}/libdwarf/${.OBJDIR:S,${.CURDIR}/,,}
.else
.error "cannot determine LDFLAGS for -ldwarf"
.endif
.endif
<</snip>>
Regards,
Joseph Koshy
Home |
Main Index |
Thread Index |
Old Index