fpmake.pp 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  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,netware,netwlibc,os2,win32,win64]+UnixLikes;
  13. // all full KVMers have crt too, except MorphOS
  14. CrtOSes = KVMALL+[msdos,WatCom]-[MorphOS];
  15. KbdOSes = KVMALL+[msdos];
  16. VideoOSes = KVMALL;
  17. MouseOSes = KVMALL;
  18. // Amiga has a crt in its RTL dir, but it is commented in the makefile
  19. Var
  20. P : TPackage;
  21. T : TTarget;
  22. begin
  23. With Installer do
  24. begin
  25. P:=AddPackage('rtl-console');
  26. P.Directory:=ADirectory;
  27. P.Version:='2.7.1';
  28. P.Author := 'FPC core team, Pierre Mueller, Peter Vreman';
  29. P.License := 'LGPL with modification, ';
  30. P.HomepageURL := 'www.freepascal.org';
  31. P.OSes:=KVMALL+CrtOSes;
  32. P.Email := '';
  33. P.Description := 'Rtl-console, console abstraction';
  34. P.NeedLibC:= false;
  35. P.Dependencies.Add('rtl-extra'); // linux,android gpm.
  36. P.SourcePath.Add('src/inc');
  37. P.SourcePath.Add('src/$(OS)');
  38. P.SourcePath.Add('src/darwin',[iphonesim]);
  39. P.SourcePath.Add('src/unix',AllUnixOSes);
  40. P.SourcePath.Add('src/os2commn',[os2,emx]);
  41. P.SourcePath.Add('src/win',WinEventOSes);
  42. P.IncludePath.Add('src/inc');
  43. P.IncludePath.Add('src/unix',AllUnixOSes);
  44. P.IncludePath.Add('src/$(OS)');
  45. P.IncludePath.Add('src/darwin',[iphonesim]);
  46. T:=P.Targets.AddUnit('winevent.pp',WinEventOSes);
  47. T:=P.Targets.AddUnit('keyboard.pp',KbdOSes);
  48. with T.Dependencies do
  49. begin
  50. AddInclude('keybrdh.inc');
  51. AddInclude('keyboard.inc');
  52. AddInclude('keyscan.inc',AllUnixOSes);
  53. AddUnit ('winevent',[win32,win64]);
  54. AddInclude('nwsys.inc',[netware]);
  55. end;
  56. T:=P.Targets.AddUnit('mouse.pp',MouseOSes);
  57. with T.Dependencies do
  58. begin
  59. AddInclude('mouseh.inc');
  60. AddInclude('mouse.inc');
  61. AddUnit ('winevent',[win32,win64]);
  62. end;
  63. T:=P.Targets.AddUnit('video.pp',VideoOSes);
  64. with T.Dependencies do
  65. begin
  66. AddInclude('videoh.inc');
  67. AddInclude('video.inc');
  68. AddInclude('videodata.inc',[MorphOS]);
  69. AddInclude('convert.inc',AllUnixOSes);
  70. AddInclude('nwsys.inc',[netware]);
  71. end;
  72. T:=P.Targets.AddUnit('crt.pp',CrtOSes);
  73. with T.Dependencies do
  74. begin
  75. AddInclude('crth.inc');
  76. AddInclude('crt.inc');
  77. AddInclude('nwsys.inc',[netware]);
  78. end;
  79. T:=P.Targets.AddUnit('vesamode.pp',[go32v2]);
  80. with T.Dependencies do
  81. AddUnit('video');
  82. end
  83. end;
  84. {$ifndef ALLPACKAGES}
  85. begin
  86. add_rtl_console('');
  87. Installer.Run;
  88. end.
  89. {$endif ALLPACKAGES}