t_wdosx.pas 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. {
  2. $Id$
  3. Copyright (c) 2001-2002 Pavel ??????
  4. This unit implements support import,export,link routines
  5. for the (i386) WDOSX target
  6. This program is free software; you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation; either version 2 of the License, or
  9. (at your option) any later version.
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. GNU General Public License for more details.
  14. You should have received a copy of the GNU General Public License
  15. along with this program; if not, write to the Free Software
  16. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17. ****************************************************************************
  18. }
  19. unit t_wdosx;
  20. {$i fpcdefs.inc}
  21. interface
  22. implementation
  23. uses
  24. cutils,
  25. fmodule,globals,systems,
  26. import,export,link,t_win32,i_wdosx;
  27. type
  28. timportlibwdosx=class(timportlibwin32)
  29. procedure GetDefExt(var N:longint;var P:pStr4);override;
  30. end;
  31. texportlibwdosx=texportlibwin32;
  32. tlinkerwdosx=class(tlinkerwin32)
  33. public
  34. function MakeExecutable:boolean;override;
  35. end;
  36. tDLLScannerWdosx=class(tDLLScannerWin32)
  37. public
  38. procedure GetDefExt(var N:longint;var P:pStr4);override;
  39. end;
  40. const
  41. DefaultDLLExtensions:array[1..2]of string[4]=('.WDL','.DLL');
  42. {*****************************************************************************
  43. TIMPORTLIBWDOSX
  44. *****************************************************************************}
  45. procedure timportlibwdosx.GetDefExt(var N:longint;var P:pStr4);
  46. begin
  47. N:=sizeof(DefaultDLLExtensions)div sizeof(DefaultDLLExtensions[1]);
  48. pointer(P):=@DefaultDLLExtensions;
  49. end;
  50. {*****************************************************************************
  51. TLINKERWDOSX
  52. *****************************************************************************}
  53. function TLinkerWdosx.MakeExecutable:boolean;
  54. var
  55. b: boolean;
  56. begin
  57. b := Inherited MakeExecutable;
  58. if b then
  59. DoExec(FindUtil('stubit'),current_module.exefilename^,false,false);
  60. Result := b;
  61. end;
  62. {****************************************************************************
  63. TDLLScannerWdosx
  64. ****************************************************************************}
  65. procedure tDLLScannerWdosx.GetDefExt(var N:longint;var P:pStr4);
  66. begin
  67. N:=sizeof(DefaultDLLExtensions)div sizeof(DefaultDLLExtensions[1]);
  68. pointer(P):=@DefaultDLLExtensions;
  69. end;
  70. {*****************************************************************************
  71. Initialize
  72. *****************************************************************************}
  73. initialization
  74. RegisterExternalLinker(system_i386_wdosx_info,TLinkerWdosx);
  75. RegisterImport(system_i386_wdosx,TImportLibWdosx);
  76. RegisterExport(system_i386_wdosx,TExportLibWdosx);
  77. RegisterDLLScanner(system_i386_wdosx,TDLLScannerWdosx);
  78. {RegisterAr(ar_gnu_arw_info);}
  79. {RegisterRes(res_gnu_windres_info);}
  80. RegisterTarget(system_i386_wdosx_info);
  81. end.
  82. {
  83. $Log$
  84. Revision 1.4 2004-06-20 08:55:32 florian
  85. * logs truncated
  86. }