Extended the Addon rule by another parameter: <is executable>. Supply "true" to prevent the usage of the -nostart linker option.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1196 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -508,7 +508,13 @@ rule SimpleTest
|
|||||||
|
|
||||||
rule Addon
|
rule Addon
|
||||||
{
|
{
|
||||||
# Addon <name> : <relpath> : <sources> ;
|
# Addon <name> : <relpath> : <sources> : <is executable> ;
|
||||||
|
# <name>: Name of the add-on.
|
||||||
|
# <relpath>: Path where the add-on shall live relative to the add-on dir.
|
||||||
|
# <sources>: Source files.
|
||||||
|
# <is executable>: true, if the target shall be executable as well
|
||||||
|
|
||||||
|
local isExecutable = $(4) ;
|
||||||
|
|
||||||
# SetupIncludes ;
|
# SetupIncludes ;
|
||||||
SetupObjectsDir ;
|
SetupObjectsDir ;
|
||||||
@@ -519,8 +525,12 @@ rule Addon
|
|||||||
targetdir = [ FDirName $(OBOS_ADDON_DIR) $(2) ] ;
|
targetdir = [ FDirName $(OBOS_ADDON_DIR) $(2) ] ;
|
||||||
|
|
||||||
MakeLocate $(1) : $(targetdir) ;
|
MakeLocate $(1) : $(targetdir) ;
|
||||||
LINKFLAGS on $(1) = [ on $(1) return $(LINKFLAGS) ]
|
|
||||||
-nostart -Xlinker -soname=\"$(1)\" ;
|
local linkFlags = -Xlinker -soname=\"$(1)\" ;
|
||||||
|
if $(isExecutable) != true {
|
||||||
|
linkFlags = -nostart $(linkFlags) ;
|
||||||
|
}
|
||||||
|
LINKFLAGS on $(1) = [ on $(1) return $(LINKFLAGS) ] $(linkFlags) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
rule R5KernelAddon
|
rule R5KernelAddon
|
||||||
|
|||||||
Reference in New Issue
Block a user