2
0

fpmake.pp 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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,MorphOS,aros,netware,netwlibc,os2,win32,win64]+UnixLikes;
  13. // all full KVMers have crt too, except MorphOS
  14. CrtOSes = KVMALL+[msdos,WatCom]-[MorphOS,aros];
  15. KbdOSes = KVMALL+[msdos];
  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.Directory:=ADirectory;
  29. P.Version:='2.7.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. P.Email := '';
  35. P.Description := 'Rtl-console, console abstraction';
  36. P.NeedLibC:= false;
  37. P.Dependencies.Add('rtl-extra'); // linux,android gpm.
  38. P.Dependencies.Add('morphunits',[morphos]);
  39. P.Dependencies.Add('arosunits',[aros]);
  40. P.SourcePath.Add('src/inc');
  41. P.SourcePath.Add('src/$(OS)');
  42. P.SourcePath.Add('src/darwin',[iphonesim]);
  43. P.SourcePath.Add('src/unix',AllUnixOSes);
  44. P.SourcePath.Add('src/os2commn',[os2,emx]);
  45. P.SourcePath.Add('src/win',WinEventOSes);
  46. P.IncludePath.Add('src/inc');
  47. P.IncludePath.Add('src/unix',AllUnixOSes);
  48. P.IncludePath.Add('src/$(OS)');
  49. P.IncludePath.Add('src/darwin',[iphonesim]);
  50. T:=P.Targets.AddUnit('winevent.pp',WinEventOSes);
  51. T:=P.Targets.AddUnit('keyboard.pp',KbdOSes);
  52. with T.Dependencies do
  53. begin
  54. AddInclude('keybrdh.inc');
  55. AddInclude('keyboard.inc');
  56. AddInclude('keyscan.inc',AllUnixOSes);
  57. AddUnit ('winevent',[win32,win64]);
  58. AddInclude('nwsys.inc',[netware]);
  59. end;
  60. T:=P.Targets.AddUnit('mouse.pp',MouseOSes);
  61. with T.Dependencies do
  62. begin
  63. AddInclude('mouseh.inc');
  64. AddInclude('mouse.inc');
  65. AddUnit ('winevent',[win32,win64]);
  66. end;
  67. T:=P.Targets.AddUnit('video.pp',VideoOSes);
  68. with T.Dependencies do
  69. begin
  70. AddInclude('videoh.inc');
  71. AddInclude('video.inc');
  72. AddInclude('videodata.inc',[MorphOS]);
  73. AddInclude('convert.inc',AllUnixOSes);
  74. AddInclude('nwsys.inc',[netware]);
  75. end;
  76. T:=P.Targets.AddUnit('crt.pp',CrtOSes);
  77. with T.Dependencies do
  78. begin
  79. AddInclude('crth.inc');
  80. AddInclude('crt.inc');
  81. AddInclude('nwsys.inc',[netware]);
  82. end;
  83. T:=P.Targets.AddUnit('vesamode.pp',[go32v2]);
  84. with T.Dependencies do
  85. AddUnit('video');
  86. end
  87. end;
  88. {$ifndef ALLPACKAGES}
  89. begin
  90. add_rtl_console('');
  91. Installer.Run;
  92. end.
  93. {$endif ALLPACKAGES}