Improved LinkSharedOSLibs. It does now look, if a supplied "library" has a dirname or grist, which makes the rule handle it as if the basename would start with "lib". Needed e.g. when linking against servers.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@37 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -316,16 +316,28 @@ rule LinkSharedOSLibs
|
|||||||
{
|
{
|
||||||
# LinkSharedOSLibs <name> : <libs> ;
|
# LinkSharedOSLibs <name> : <libs> ;
|
||||||
# Valid elements for <libs> are e.g. "be" or "libopenbeos.so" or
|
# Valid elements for <libs> are e.g. "be" or "libopenbeos.so" or
|
||||||
# "/boot/.../libfoo.so". If the basename starts with "lib", it is added
|
# "/boot/.../libfoo.so". If the basename starts with "lib" or the thingy
|
||||||
# to the NEEDLIBS variable (i.e. the file will be bound!), otherwise it is
|
# has a dirname or grist, it is added to the NEEDLIBS variable (i.e. the
|
||||||
# prefixed "-l" and added to LINKLIBS.
|
# file will be bound!), otherwise it is prefixed "-l" and added to
|
||||||
|
# LINKLIBS.
|
||||||
|
|
||||||
for i in $(>)
|
for i in $(>)
|
||||||
{
|
{
|
||||||
switch $(i:B)
|
local isfile = ;
|
||||||
{
|
if $(i:D) || $(i:G) {
|
||||||
case lib* : NEEDLIBS on $(1) += $(i) ; DEPENDS $(1) : $(i) ;
|
isfile = true ;
|
||||||
case * : LINKLIBS on $(1) += -l$(i) ;
|
} else {
|
||||||
|
switch $(i:B)
|
||||||
|
{
|
||||||
|
case lib* : isfile = true ;
|
||||||
|
case * : isfile = ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if $(isfile) {
|
||||||
|
NEEDLIBS on $(1) += $(i) ;
|
||||||
|
DEPENDS $(1) : $(i) ;
|
||||||
|
} else {
|
||||||
|
LINKLIBS on $(1) += -l$(i) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user