fpmake.pp 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. {$ifndef ALLPACKAGES}
  2. {$mode objfpc}{$H+}
  3. program fpmake;
  4. uses fpmkunit;
  5. {$endif ALLPACKAGES}
  6. procedure add_rtl_console(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];
  11. WinEventOSes = [win32,win64];
  12. KVMAll = [emx,go32v2,msdos,netware,netwlibc,os2,win32,win64,win16]+UnixLikes+AllAmigaLikeOSes;
  13. // all full KVMers have crt too
  14. CrtOSes = KVMALL+[WatCom];
  15. KbdOSes = KVMALL;
  16. VideoOSes = KVMALL;
  17. MouseOSes = KVMALL;
  18. TerminfoOSes = UnixLikes-[beos,haiku];
  19. rtl_consoleOSes =KVMALL+CrtOSes+TermInfoOSes;
  20. Var
  21. P : TPackage;
  22. T : TTarget;
  23. begin
  24. With Installer do
  25. begin
  26. P:=AddPackage('rtl-console');
  27. P.ShortName:='rtlc';
  28. P.Directory:=ADirectory;
  29. P.Version:='3.3.1';
  30. P.Author := 'FPC core team, Pierre Mueller, Peter Vreman';
  31. P.License := 'LGPL with modification, ';
  32. P.HomepageURL := 'www.freepascal.org';
  33. P.OSes:=Rtl_ConsoleOSes;
  34. if Defaults.CPU=jvm then
  35. P.OSes := P.OSes - [java,android];
  36. P.Email := '';
  37. P.Description := 'Rtl-console, console abstraction';
  38. P.NeedLibC:= false;
  39. P.Dependencies.Add('rtl-extra'); // linux,android gpm.
  40. P.Dependencies.Add('morphunits',[morphos]);
  41. P.Dependencies.Add('arosunits',[aros]);
  42. if Defaults.CPU=m68k then
  43. P.Dependencies.Add('amunits',[amiga]);
  44. if Defaults.CPU=powerpc then
  45. P.Dependencies.Add('os4units',[amiga]);
  46. P.SourcePath.Add('src/inc');
  47. P.SourcePath.Add('src/$(OS)');
  48. P.SourcePath.Add('src/darwin',[iphonesim,ios]);
  49. P.SourcePath.Add('src/unix',AllUnixOSes);
  50. P.SourcePath.Add('src/os2commn',[os2,emx]);
  51. P.SourcePath.Add('src/amicommon',AllAmigaLikeOSes);
  52. P.SourcePath.Add('src/win',WinEventOSes);
  53. P.IncludePath.Add('src/inc');
  54. P.IncludePath.Add('src/unix',AllUnixOSes);
  55. P.IncludePath.add('src/amicommon',AllAmigaLikeOSes);
  56. P.IncludePath.Add('src/$(OS)');
  57. P.IncludePath.Add('src/darwin',[iphonesim,ios]);
  58. T:=P.Targets.AddUnit('winevent.pp',WinEventOSes);
  59. T:=P.Targets.AddUnit('keyboard.pp',KbdOSes);
  60. with T.Dependencies do
  61. begin
  62. AddInclude('keybrdh.inc');
  63. AddInclude('keyboard.inc');
  64. AddInclude('keyscan.inc',AllUnixOSes);
  65. AddUnit ('winevent',[win32,win64]);
  66. AddInclude('nwsys.inc',[netware]);
  67. AddUnit ('mouse',AllUnixOSes);
  68. AddUnit ('video',[win16]);
  69. end;
  70. T:=P.Targets.AddUnit('mouse.pp',MouseOSes);
  71. with T.Dependencies do
  72. begin
  73. AddInclude('mouseh.inc');
  74. AddInclude('mouse.inc');
  75. AddUnit ('winevent',[win32,win64]);
  76. AddUnit ('video',[go32v2,msdos] + AllUnixOSes);
  77. end;
  78. T:=P.Targets.AddUnit('video.pp',VideoOSes);
  79. with T.Dependencies do
  80. begin
  81. AddInclude('videoh.inc');
  82. AddInclude('video.inc');
  83. AddInclude('videodata.inc',AllAmigaLikeOSes);
  84. AddInclude('convert.inc',AllUnixOSes);
  85. AddInclude('nwsys.inc',[netware]);
  86. AddUnit ('mouse',[go32v2,msdos]);
  87. end;
  88. T:=P.Targets.AddUnit('crt.pp',CrtOSes);
  89. with T.Dependencies do
  90. begin
  91. AddInclude('crth.inc');
  92. AddInclude('crt.inc');
  93. AddInclude('nwsys.inc',[netware]);
  94. AddUnit ('video',[win16]);
  95. AddUnit ('keyboard',[win16]);
  96. end;
  97. T:=P.Targets.AddUnit('vidcrt.pp', AllAmigaLikeOSes);
  98. with T.Dependencies do
  99. begin
  100. AddInclude('crth.inc');
  101. AddInclude('crt.inc');
  102. AddUnit ('video', AllAmigaLikeOSes);
  103. AddUnit ('keyboard', AllAmigaLikeOSes);
  104. AddUnit ('mouse', AllAmigaLikeOSes);
  105. end;
  106. T:=P.Targets.AddUnit('vesamode.pp',[go32v2,msdos]);
  107. with T.Dependencies do
  108. begin
  109. AddUnit('video');
  110. AddUnit('mouse');
  111. end;
  112. end
  113. end;
  114. {$ifndef ALLPACKAGES}
  115. begin
  116. add_rtl_console('');
  117. Installer.Run;
  118. end.
  119. {$endif ALLPACKAGES}