* prefix for import libraries now configurable rather than hardcoded, plus fixed issue with name of OS/2 import libraries

git-svn-id: trunk@12727 -
This commit is contained in:
Tomas Hajny 2009-02-09 00:01:15 +00:00
parent cf7b755dc0
commit 54f3d28ce8
25 changed files with 111 additions and 10 deletions

View File

@ -640,7 +640,7 @@ uses
asmfilename:=stringdup(p+n+target_info.asmext);
objfilename:=stringdup(p+n+target_info.objext);
ppufilename:=stringdup(p+n+target_info.unitext);
importlibfilename:=stringdup(p+target_info.staticClibprefix+'imp'+n+target_info.staticlibext);
importlibfilename:=stringdup(p+target_info.importlibprefix+n+target_info.importlibext);
staticlibfilename:=stringdup(p+target_info.staticlibprefix+n+target_info.staticlibext);
{ output dir of exe can be specified separatly }

View File

@ -357,6 +357,8 @@ interface
staticClibext,
staticClibprefix : string[4];
sharedClibprefix : string[4];
importlibprefix : string[10];
importlibext : string[4];
Cprefix : string[2];
newline : string[2];
dirsep : char;

View File

@ -56,6 +56,8 @@ unit i_amiga;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : '';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '';
newline : #10;
dirsep : '/';
@ -115,6 +117,8 @@ unit i_amiga;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : '';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '';
newline : #10;
dirsep : '/';

View File

@ -39,8 +39,6 @@ unit i_atari;
short_name : 'ATARI';
unit_env : '';
extradefines : '';
sharedlibext : '.dll';
staticlibext : '.a';
exeext : '.tpp';
defext : '';
scriptext : '';
@ -51,8 +49,16 @@ unit i_atari;
objext : '.o';
resext : '.res';
resobjext : '.or';
sharedlibext : '.dll';
staticlibext : '.a';
staticlibprefix : '';
sharedlibprefix : '';
sharedClibext : '.dll';
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : '';
importlibprefix : 'libimp';
importlibext : '.a';
p_ext_support : false;
Cprefix : '_';
newline : #10;

View File

@ -57,6 +57,8 @@ unit i_beos;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : 'lib';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '';
newline : #10;
dirsep : '/';

View File

@ -85,6 +85,8 @@ unit i_bsd;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : 'lib';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '';
newline : #10;
dirsep : '/';
@ -148,6 +150,8 @@ unit i_bsd;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : 'lib';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '';
newline : #10;
dirsep : '/';
@ -208,6 +212,8 @@ unit i_bsd;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : 'lib';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '_';
newline : #10;
dirsep : '/';
@ -267,6 +273,8 @@ unit i_bsd;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : 'lib';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '_';
newline : #10;
dirsep : '/';
@ -326,6 +334,8 @@ unit i_bsd;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : 'lib';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '';
newline : #10;
dirsep : '/';
@ -385,6 +395,8 @@ unit i_bsd;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : 'lib';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '';
newline : #10;
dirsep : '/';
@ -446,6 +458,8 @@ unit i_bsd;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : 'lib';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '_';
newline : #10;
dirsep : '/';
@ -507,6 +521,8 @@ unit i_bsd;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : 'lib';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '_';
newline : #10;
dirsep : '/';
@ -568,6 +584,8 @@ unit i_bsd;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : 'lib';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '_';
newline : #10;
dirsep : '/';
@ -629,6 +647,8 @@ unit i_bsd;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : 'lib';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '_';
newline : #10;
dirsep : '/';
@ -689,6 +709,8 @@ unit i_bsd;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : 'lib';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '_';
newline : #10;
dirsep : '/';

View File

@ -56,6 +56,8 @@ unit i_embed;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : 'lib';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '';
newline : #10;
dirsep : '/';
@ -116,6 +118,8 @@ unit i_embed;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : 'lib';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '';
newline : #10;
dirsep : '/';

View File

@ -61,12 +61,14 @@ unit i_emx;
resobjext : '.or';
sharedlibext : '.dll';
staticlibext : '.a';
staticlibprefix : '';
staticlibprefix : 'libp';
sharedlibprefix : '';
sharedClibext : '.dll';
staticClibext : '.a';
staticClibprefix : '';
sharedClibprefix : '';
importlibprefix : '';
importlibext : '.a';
Cprefix : '_';
newline : #13#10;
dirsep : '\';

View File

@ -57,6 +57,8 @@ unit i_gba;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : 'lib';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '';
newline : #10;
dirsep : '/';

View File

@ -56,6 +56,8 @@ unit i_go32v2;
staticClibext : '.a';
staticClibprefix : '';
sharedClibprefix : '';
importlibprefix : '';
importlibext : '.al';
Cprefix : '_';
newline : #13#10;
dirsep : '\';

View File

@ -58,6 +58,8 @@ unit i_haiku;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : 'lib';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '';
newline : #10;
dirsep : '/';

View File

@ -61,6 +61,8 @@ unit i_linux;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : 'lib';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '';
newline : #10;
dirsep : '/';
@ -122,6 +124,8 @@ unit i_linux;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : 'lib';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '';
newline : #10;
dirsep : '/';
@ -183,6 +187,8 @@ unit i_linux;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : 'lib';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '';
newline : #10;
dirsep : '/';
@ -244,6 +250,8 @@ unit i_linux;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : 'lib';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '';
newline : #10;
dirsep : '/';
@ -305,6 +313,8 @@ unit i_linux;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : 'lib';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '';
newline : #10;
dirsep : '/';
@ -365,6 +375,8 @@ unit i_linux;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : 'lib';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '';
newline : #10;
dirsep : '/';
@ -426,6 +438,8 @@ unit i_linux;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : 'lib';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '';
newline : #10;
dirsep : '/';
@ -488,6 +502,8 @@ unit i_linux;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : 'lib';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '';
newline : #10;
dirsep : '/';
@ -550,6 +566,8 @@ unit i_linux;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : 'lib';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '';
newline : #10;
dirsep : '/';
@ -611,6 +629,8 @@ unit i_linux;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : 'lib';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '';
newline : #10;
dirsep : '/';

View File

@ -55,6 +55,8 @@ unit i_macos;
staticClibext : 'Lib';
staticClibprefix : '';
sharedClibprefix : '';
importlibprefix : 'imp';
importlibext : 'Lib';
Cprefix : '';
newline : #13;
dirsep : ':';

View File

@ -56,6 +56,8 @@ unit i_morph;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : '';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '';
newline : #10;
dirsep : '/';

View File

@ -58,6 +58,8 @@ unit i_nds;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : 'lib';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '';
newline : #10;
dirsep : '/';

View File

@ -56,6 +56,8 @@ unit i_nwl;
staticClibext : '.a';
staticClibprefix : '';
sharedClibprefix : '';
importlibprefix : 'imp';
importlibext : '.a';
Cprefix : '';
newline : #13#10;
dirsep : '/';

View File

@ -56,6 +56,8 @@ unit i_nwm;
staticClibext : '.a';
staticClibprefix : '';
sharedClibprefix : '';
importlibprefix : 'imp';
importlibext : '.a';
Cprefix : '';
newline : #13#10;
dirsep : '/';

View File

@ -61,12 +61,14 @@ unit i_os2;
resobjext : '.or';
sharedlibext : '.dll';
staticlibext : '.a';
staticlibprefix : '';
staticlibprefix : 'libp';
sharedlibprefix : '';
sharedClibext : '.dll';
staticClibext : '.a';
staticClibprefix : '';
sharedClibprefix : '';
importlibprefix : '';
importlibext : '.a';
Cprefix : '_';
newline : #13#10;
dirsep : '\';

View File

@ -56,6 +56,8 @@ unit i_palmos;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : 'lib';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '_';
newline : #10;
dirsep : '/';
@ -126,6 +128,8 @@ unit i_palmos;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : 'lib';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '_';
newline : #10;
dirsep : '/';

View File

@ -56,6 +56,8 @@ unit i_sunos;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : 'lib';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '';
newline : #10;
dirsep : '/';
@ -116,6 +118,8 @@ unit i_sunos;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : 'lib';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '';
newline : #10;
dirsep : '/';

View File

@ -58,6 +58,8 @@ unit i_symbian;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : '';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '_';
newline : #13#10;
dirsep : '\';
@ -119,6 +121,8 @@ unit i_symbian;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : '';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '_';
newline : #13#10;
dirsep : '\';

View File

@ -56,6 +56,8 @@ unit i_watcom;
staticClibext : '.a';
staticClibprefix : '';
sharedClibprefix : '';
importlibprefix : 'imp';
importlibext : '.a';
Cprefix : '_';
newline : #13#10;
dirsep : '\';

View File

@ -56,6 +56,8 @@ unit i_wdosx;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : '';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '_';
newline : #13#10;
dirsep : '\';

View File

@ -60,6 +60,8 @@ unit i_win;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : '';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '_';
newline : #13#10;
dirsep : '\';
@ -121,6 +123,8 @@ unit i_win;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : '';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '';
newline : #13#10;
dirsep : '\';
@ -182,6 +186,8 @@ unit i_win;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : '';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '';
newline : #13#10;
dirsep : '\';
@ -243,6 +249,8 @@ unit i_win;
staticClibext : '.a';
staticClibprefix : 'lib';
sharedClibprefix : '';
importlibprefix : 'libimp';
importlibext : '.a';
Cprefix : '_';
newline : #13#10;
dirsep : '\';

View File

@ -353,22 +353,19 @@ end;
const
ar_magic:array[1..8] of char='!<arch>'#10;
var
libname : string;
i,j : longint;
ImportLibrary : TImportLibrary;
ImportSymbol : TImportSymbol;
begin
LibName:=FixFileName(Current_Module.RealModuleName^ + Target_Info.StaticLibExt);
seq_no:=1;
current_module.linkotherstaticlibs.add(libname,link_always);
assign(out_file,current_module.outputpath^+libname);
current_module.linkotherstaticlibs.add(Current_Module.ImportLibFilename^,link_always);
assign(out_file,Current_Module.ImportLibFilename^);
rewrite(out_file,1);
blockwrite(out_file,ar_magic,sizeof(ar_magic));
for i:=0 to current_module.ImportLibraryList.Count-1 do
begin
ImportLibrary:=TImportLibrary(current_module.ImportLibraryList[i]);
{ LibName:=FixFileName(ImportLibrary.Name + Target_Info.StaticCLibExt);}
for j:=0 to ImportLibrary.ImportSymbolList.Count-1 do
begin
ImportSymbol:=TImportSymbol(ImportLibrary.ImportSymbolList[j]);