fpmake.pp 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. {$ifndef ALLPACKAGES}
  2. {$mode objfpc}{$H+}
  3. program fpmake;
  4. uses fpmkunit;
  5. Var
  6. T : TTarget;
  7. P : TPackage;
  8. begin
  9. With Installer do
  10. begin
  11. {$endif ALLPACKAGES}
  12. P:=AddPackage('rtl');
  13. {$ifdef ALLPACKAGES}
  14. P.Directory:='rtl';
  15. {$endif ALLPACKAGES}
  16. P.Version:='2.2.0';
  17. // Where to find the sources using firstmatch
  18. P.SourcePath.Add('$(OS)');
  19. P.SourcePath.Add('unix',AllUnixOSes);
  20. P.SourcePath.Add('win',AllWindowsOSes);
  21. P.SourcePath.Add('$(CPU)');
  22. P.SourcePath.Add('inc');
  23. P.SourcePath.Add('objpas');
  24. // System unit
  25. T:=P.Targets.AddUnit('system.pp');
  26. T.IncludePath.Add('inc');
  27. T.IncludePath.Add('$(CPU)');
  28. T.IncludePath.Add('$(OS)');
  29. T.IncludePath.Add('$(OS)/$(CPU)',TOSes([Linux]));
  30. T.IncludePath.Add('unix',AllUnixOSes);
  31. T.IncludePath.Add('win',AllWindowsOSes);
  32. With T.Dependencies do
  33. begin
  34. // Headers
  35. AddInclude('setjumph.inc');
  36. AddInclude('systemh.inc');
  37. AddInclude('objpash.inc');
  38. AddInclude('dynarrh.inc');
  39. AddInclude('compproc.inc');
  40. AddInclude('heaph.inc');
  41. AddInclude('threadh.inc');
  42. AddInclude('varianth.inc');
  43. // Implementations
  44. AddInclude('$(CPU).inc');
  45. AddInclude('set.inc');
  46. AddInclude('math.inc');
  47. AddInclude('int64p.inc');
  48. AddInclude('setjump.inc');
  49. AddInclude('systhrd.inc');
  50. AddInclude('sysos.inc');
  51. AddInclude('sysheap.inc');
  52. AddInclude('sysdir.inc');
  53. AddInclude('filerec.inc');
  54. AddInclude('textrec.inc');
  55. AddInclude('generic.inc');
  56. AddInclude('genset.inc');
  57. AddInclude('genmath.inc');
  58. AddInclude('sstrings.inc');
  59. AddInclude('int64.inc');
  60. AddInclude('astrings.inc');
  61. AddInclude('wstrings.inc');
  62. AddInclude('aliases.inc');
  63. AddInclude('dynarr.inc');
  64. AddInclude('objpas.inc');
  65. AddInclude('variant.inc');
  66. AddInclude('rtti.inc');
  67. AddInclude('heap.inc');
  68. AddInclude('thread.inc');
  69. AddInclude('text.inc');
  70. AddInclude('file.inc');
  71. AddInclude('typefile.inc');
  72. end;
  73. // Compile mode units
  74. T:=P.Targets.AddUnit('objpas.pp');
  75. T.Dependencies.AddUnit('system');
  76. T:=P.Targets.AddUnit('macpas.pp');
  77. T.Dependencies.AddUnit('system');
  78. // Unix units
  79. T:=P.Targets.AddUnit('unixtype.pp',AllUnixOSes);
  80. T.IncludePath.Add('$(OS)/$(CPU)',TOSes([Linux]));
  81. T.IncludePath.Add('$(OS)');
  82. T.IncludePath.Add('unix');
  83. With T.Dependencies do
  84. begin
  85. AddUnit('system');
  86. end;
  87. T:=P.Targets.AddUnit('baseunix.pp',AllUnixOSes);
  88. T.IncludePath.Add('$(OS)/$(CPU)',TOSes([Linux]));
  89. T.IncludePath.Add('$(OS)');
  90. T.IncludePath.Add('unix');
  91. T.IncludePath.Add('inc');
  92. With T.Dependencies do
  93. begin
  94. AddUnit('unixtype');
  95. end;
  96. // Turbo Pascal RTL units
  97. T:=P.Targets.AddUnit('dos.pp');
  98. With T.Dependencies do
  99. begin
  100. AddUnit('baseunix',AllUnixOSes);
  101. AddInclude('inc/dosh.inc');
  102. end;
  103. T:=P.Targets.AddUnit('crt.pp');
  104. With T.Dependencies do
  105. begin
  106. AddUnit('baseunix',AllUnixOSes);
  107. AddInclude('inc/crth.inc');
  108. end;
  109. T:=P.Targets.AddUnit('strings.pp');
  110. T.IncludePath.Add('$(CPU)');
  111. T.IncludePath.Add('inc');
  112. With T.Dependencies do
  113. begin
  114. AddUnit('system');
  115. AddInclude('strings.inc');
  116. AddInclude('stringss.inc');
  117. AddInclude('genstr.inc');
  118. AddInclude('genstrs.inc');
  119. AddInclude('stringsi.inc');
  120. end;
  121. {$ifndef ALLPACKAGES}
  122. Run;
  123. end;
  124. end.
  125. {$endif ALLPACKAGES}