|
@@ -9898,11 +9898,20 @@ end;
|
|
|
|
|
|
|
|
|
function TTarget.GetBinFileBase: String;
|
|
|
+
|
|
|
+var
|
|
|
+ S : String;
|
|
|
+
|
|
|
begin
|
|
|
if FExeName <> '' then
|
|
|
Result := FExeName
|
|
|
else
|
|
|
+ begin
|
|
|
Result:=Name;
|
|
|
+ for S in Options do
|
|
|
+ if Copy(S,1,2)='-o' then
|
|
|
+ Result:=Copy(S,3);
|
|
|
+ end;
|
|
|
end;
|
|
|
|
|
|
|
|
@@ -9919,9 +9928,12 @@ end;
|
|
|
|
|
|
function TTarget.GetLibraryFileName(AOS : TOS): String;
|
|
|
begin
|
|
|
- result := AddLibraryExtension(GetBinFileBase, AOS);
|
|
|
+ Result:=GetBinFileBase;
|
|
|
+ if ExtractFileExt(Result)='' then
|
|
|
+ result := AddLibraryExtension(Result, AOS);
|
|
|
if aOS in AllUnixOSes then
|
|
|
- Result:='lib'+Result;
|
|
|
+ if Copy(Result,1,3)<>'lib' then
|
|
|
+ Result:='lib'+Result;
|
|
|
end;
|
|
|
|
|
|
|