fpmake.pp 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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.1.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. P.Email := '';
  36. P.Description := 'Rtl-console, console abstraction';
  37. P.NeedLibC:= false;
  38. P.Dependencies.Add('rtl-extra'); // linux,android gpm.
  39. P.Dependencies.Add('morphunits',[morphos]);
  40. P.Dependencies.Add('arosunits',[aros]);
  41. if Defaults.CPU=m68k then
  42. P.Dependencies.Add('amunits',[amiga]);
  43. if Defaults.CPU=powerpc then
  44. P.Dependencies.Add('os4units',[amiga]);
  45. P.SourcePath.Add('src/inc');
  46. P.SourcePath.Add('src/$(OS)');
  47. P.SourcePath.Add('src/darwin',[iphonesim]);
  48. P.SourcePath.Add('src/unix',AllUnixOSes);
  49. P.SourcePath.Add('src/os2commn',[os2,emx]);
  50. P.SourcePath.Add('src/amicommon',AllAmigaLikeOSes);
  51. P.SourcePath.Add('src/win',WinEventOSes);
  52. P.IncludePath.Add('src/inc');
  53. P.IncludePath.Add('src/unix',AllUnixOSes);
  54. P.IncludePath.add('src/amicommon',AllAmigaLikeOSes);
  55. P.IncludePath.Add('src/$(OS)');
  56. P.IncludePath.Add('src/darwin',[iphonesim]);
  57. T:=P.Targets.AddUnit('winevent.pp',WinEventOSes);
  58. T:=P.Targets.AddUnit('keyboard.pp',KbdOSes);
  59. with T.Dependencies do
  60. begin
  61. AddInclude('keybrdh.inc');
  62. AddInclude('keyboard.inc');
  63. AddInclude('keyscan.inc',AllUnixOSes);
  64. AddUnit ('winevent',[win32,win64]);
  65. AddInclude('nwsys.inc',[netware]);
  66. AddUnit ('video',[win16]);
  67. end;
  68. T:=P.Targets.AddUnit('mouse.pp',MouseOSes);
  69. with T.Dependencies do
  70. begin
  71. AddInclude('mouseh.inc');
  72. AddInclude('mouse.inc');
  73. AddUnit ('winevent',[win32,win64]);
  74. AddUnit ('video',[go32v2,msdos]);
  75. end;
  76. T:=P.Targets.AddUnit('video.pp',VideoOSes);
  77. with T.Dependencies do
  78. begin
  79. AddInclude('videoh.inc');
  80. AddInclude('video.inc');
  81. AddInclude('videodata.inc',AllAmigaLikeOSes);
  82. AddInclude('convert.inc',AllUnixOSes);
  83. AddInclude('nwsys.inc',[netware]);
  84. AddUnit ('mouse',[go32v2,msdos]);
  85. end;
  86. T:=P.Targets.AddUnit('crt.pp',CrtOSes);
  87. with T.Dependencies do
  88. begin
  89. AddInclude('crth.inc');
  90. AddInclude('crt.inc');
  91. AddInclude('nwsys.inc',[netware]);
  92. AddUnit ('video',[win16]);
  93. AddUnit ('keyboard',[win16]);
  94. end;
  95. T:=P.Targets.AddUnit('vesamode.pp',[go32v2,msdos]);
  96. with T.Dependencies do
  97. begin
  98. AddUnit('video');
  99. AddUnit('mouse');
  100. end;
  101. end
  102. end;
  103. {$ifndef ALLPACKAGES}
  104. begin
  105. add_rtl_console('');
  106. Installer.Run;
  107. end.
  108. {$endif ALLPACKAGES}