fpmake.pp 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. {$ifndef ALLPACKAGES}
  2. {$mode objfpc}{$H+}
  3. program fpmake;
  4. uses fpmkunit;
  5. {$endif ALLPACKAGES}
  6. procedure add_rtl_extra(const ADirectory: string);
  7. Const
  8. // All Unices have full set of KVM+Crt in unix/ except QNX which is not
  9. // in workable state atm.
  10. UnixLikes = AllUnixOSes -[QNX]; // qnx never was active in 2.x afaik
  11. UComplexOSes = [amiga,emx,gba,go32v2,morphos,msdos,nativent,nds,netware,netwlibc,os2,watcom,wii,wince,win32,win64]+UnixLikes;
  12. MatrixOSes = [amiga,emx,gba,go32v2,morphos,msdos,nativent,nds,netware,netwlibc,os2,wii,win32,win64,wince]+UnixLikes;
  13. ObjectsOSes = [amiga,emx,gba,go32v2,morphos,msdos,netware,netwlibc,os2,win32,win64,wince]+UnixLikes;
  14. WinsockOSes = [win32,win64,wince,os2,emx,netware,netwlibc];
  15. WinSock2OSes = [win32,win64,wince];
  16. // sockets of morphos is implemented, but not active
  17. SocketsOSes = UnixLikes+[netware,netwlibc,os2,wince,win32,win64];
  18. Socksyscall = [beos,freebsd,haiku,linux,netbsd,openbsd];
  19. Socklibc = unixlikes-socksyscall;
  20. gpmOSes = [Linux,Android];
  21. AllTargetsextra = ObjectsOSes + UComplexOSes + MatrixOSes;
  22. Var
  23. P : TPackage;
  24. T : TTarget;
  25. begin
  26. With Installer do
  27. begin
  28. P:=AddPackage('rtl-extra');
  29. P.Directory:=ADirectory;
  30. P.Version:='2.7.1';
  31. P.Author := 'FPC core team';
  32. P.License := 'LGPL with modification, ';
  33. P.HomepageURL := 'www.freepascal.org';
  34. P.OSes:=AllTargetsextra;
  35. P.Email := '';
  36. P.Description := 'Rtl-extra, RTL not needed for bootstrapping';
  37. P.NeedLibC:= false;
  38. P.SourcePath.Add('src/inc');
  39. P.SourcePath.Add('src/$(OS)');
  40. P.SourcePath.Add('src/darwin',[iphonesim]);
  41. P.SourcePath.Add('src/unix',AllUnixOSes);
  42. P.SourcePath.Add('src/bsd',AllBSDOSes);
  43. P.SourcePath.Add('src/os2commn',[os2,emx]);
  44. P.SourcePath.Add('src/netwcomn',[netware,netwlibc]);
  45. // We also need the win/ directory for WinCE as this uses the sockets
  46. // unit from that directory. Maybe we should try to merge the WinSock(2)
  47. // units to remove the wince directory completely...
  48. P.SourcePath.Add('src/win',[win32,win64,wince]);
  49. P.IncludePath.Add('src/bsd',AllBSDOSes);
  50. P.IncludePath.Add('src/inc');
  51. P.IncludePath.Add('src/os2commn',[os2,emx]);
  52. P.IncludePath.Add('../../rtl/os2',[os2,emx]);
  53. P.IncludePath.Add('src/netwcomn',[netware,netwlibc]);
  54. P.IncludePath.Add('src/unix',AllUnixOSes);
  55. P.IncludePath.Add('src/$(OS)');
  56. P.IncludePath.Add('src/darwin',[iphonesim]);
  57. T:=P.Targets.AddUnit('ucomplex.pp',UComplexOSes);
  58. T:=P.Targets.AddUnit('objects.pp',ObjectsOSes);
  59. T:=P.Targets.AddUnit('matrix.pp',MatrixOSes);
  60. with T.Dependencies do
  61. begin
  62. AddInclude('mvecimp.inc');
  63. AddInclude('mmatimp.inc');
  64. end;
  65. T:=P.Targets.AddUnit('winsock.pp',WinSockOSes);
  66. with T.Dependencies do
  67. begin
  68. AddInclude('qos.inc',[netware,netwlibc]);
  69. AddInclude('netwsockh.inc',[netware,netwlibc]);
  70. end;
  71. T:=P.Targets.AddUnit('winsock2.pp',WinSock2OSes);
  72. T:=P.Targets.AddUnit('gpm.pp',gpmOSes);
  73. with T.Dependencies do
  74. AddUnit('sockets');
  75. T:=P.Targets.AddUnit('sockets.pp',SocketsOSes);
  76. with T.Dependencies do
  77. begin
  78. addinclude('socketsh.inc');
  79. addinclude('sockets.inc');
  80. addinclude('sockovl.inc');
  81. addinclude('unxsockh.inc',UnixLikes);
  82. addinclude('stdsock.inc',socklibc);
  83. addinclude('unixsock.inc',socksyscall);
  84. end;
  85. end
  86. end;
  87. {$ifndef ALLPACKAGES}
  88. begin
  89. add_rtl_extra('');
  90. Installer.Run;
  91. end.
  92. {$endif ALLPACKAGES}