diff --git a/Jamrules b/Jamrules index 30ce976af2..8c1b72374e 100644 --- a/Jamrules +++ b/Jamrules @@ -508,7 +508,13 @@ rule SimpleTest rule Addon { - # Addon : : ; + # Addon : : : ; + # : Name of the add-on. + # : Path where the add-on shall live relative to the add-on dir. + # : Source files. + # : true, if the target shall be executable as well + + local isExecutable = $(4) ; # SetupIncludes ; SetupObjectsDir ; @@ -519,8 +525,12 @@ rule Addon targetdir = [ FDirName $(OBOS_ADDON_DIR) $(2) ] ; 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