fpmake.pp 3.6 KB

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