fpmake.pp 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. {$ifndef ALLPACKAGES}
  2. {$mode objfpc}{$H+}
  3. program fpmake;
  4. uses fpmkunit;
  5. {$endif ALLPACKAGES}
  6. procedure add_rtl_objpas(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]; // qnx never was active in 2.x afaik
  11. // AllUnixOSes = [Linux,FreeBSD,NetBSD,OpenBSD,Darwin,QNX,BeOS,Solaris,Haiku,iphonesim,aix,Android];
  12. // unixlikes-[beos];
  13. //
  14. StrUtilsOSes = [atari,emx,gba,go32v2,msdos,nds,netware,wince,nativent,os2,netwlibc,symbian,watcom,wii,win32,win64]+UnixLikes+AllAmigaLikeOSes;
  15. VarUtilsOSes = [atari,emx,gba,go32v2,msdos,nds,netware,wince,nativent,os2,netwlibc,symbian,watcom,wii,win32,win64]+UnixLikes+AllAmigaLikeOSes;
  16. ConvUtilsOSes = [nativent,netware,netwlibc,win32,win64,wince]+AllAmigaLikeOSes+UnixLikes-[BeOS];
  17. ConvUtilOSes = [atari,Go32v2,msdos,os2,emx];
  18. DateUtilsOSes = [gba,nativent,nds,netware,netwlibc,symbian,wii,win32,win64,wince]+UnixLikes+AllAmigaLikeOSes;
  19. DateUtilOSes = [atari,Go32v2,msdos,os2,emx];
  20. StdConvsOSes = [NativeNT,Win32,win64,os2,msdos,go32v2]+UnixLikes-[BeOS];
  21. FmtBCDOSes = [atari,emx,gba,go32v2,msdos,nativent,nds,netware,netwlibc,os2,symbian,watcom,wii,win32,win64,wince]+UnixLikes+AllAmigaLikeOSes;
  22. VariantsOSes = [atari,emx,gba,go32v2,msdos,nativent,nds,netware,netwlibc,os2,symbian,watcom,wii,win32,win64,wince]+UnixLikes+AllAmigaLikeOSes;
  23. RttiOSes = [atari,emx,gba,go32v2,msdos,nativent,nds,netware,netwlibc,os2,watcom,wii,win32,win64,wince]+UnixLikes+AllAmigaLikeOSes;
  24. AllTargetsObjPas = DateUtilsOses +DateUtilOSes+
  25. VarutilsOses + ConvutilsOSes + ConvutilOSes + StdConvsOSes+
  26. FmtBCDOSes + StrUtilsOSes;
  27. CommonSrcOSes = [atari,emx,gba,go32v2,msdos,nds,netware,wince,nativent,os2,netwlibc,symbian,watcom,wii]+UnixLikes+AllAmigaLikeOSes;
  28. Var
  29. P : TPackage;
  30. T : TTarget;
  31. begin
  32. With Installer do
  33. begin
  34. P:=AddPackage('rtl-objpas');
  35. P.ShortName:='rtlo';
  36. P.Directory:=ADirectory;
  37. P.Version:='3.3.1';
  38. P.Author := 'FPC core team';
  39. P.License := 'LGPL with modification, ';
  40. P.HomepageURL := 'www.freepascal.org';
  41. P.OSes:=AllTargetsObjPas;
  42. if Defaults.CPU=jvm then
  43. P.OSes := P.OSes - [java,android];
  44. P.Email := '';
  45. P.Description := 'Rtl-objpas, aux. Delphi compat units';
  46. P.NeedLibC:= false;
  47. P.SourcePath.Add('src/inc');
  48. P.SourcePath.Add('src/$(OS)');
  49. P.SourcePath.Add('src/win',[win32,win64]);
  50. P.SourcePath.Add('src/common',CommonSrcOSes);
  51. P.IncludePath.Add('src/inc');
  52. P.IncludePath.Add('src/$(OS)');
  53. P.IncludePath.Add('src/common',CommonSrcOSes);
  54. T:=P.Targets.AddUnit('strutils.pp',StrUtilsOses);
  55. T:=P.Targets.AddUnit('widestrutils.pp',StrUtilsOses-ConvUtilOSes);
  56. T:=P.Targets.AddUnit('varutils.pp',VarUtilsOses);
  57. with T.Dependencies do
  58. begin
  59. AddInclude('varutilh.inc');
  60. AddInclude('varerror.inc');
  61. AddInclude('varutils.inc',VarUtilsOSes-[win32,win64]);
  62. AddInclude('cvarutil.inc');
  63. end;
  64. // 8.3
  65. T:=P.Targets.AddUnit('convutil.pp',ConvutilOSes);
  66. with T.Dependencies do
  67. begin
  68. AddInclude('convutil.inc');
  69. end;
  70. // normal
  71. T:=P.Targets.AddUnit('convutils.pp',ConvutilsOSes);
  72. with T.Dependencies do
  73. begin
  74. AddInclude('convutil.inc');
  75. end;
  76. // 8.3
  77. T:=P.Targets.AddUnit('dateutil.pp',dateutilOSes);
  78. with T.Dependencies do
  79. begin
  80. AddInclude('dateutil.inc');
  81. end;
  82. // normal
  83. T:=P.Targets.AddUnit('dateutils.pp',dateutilsOSes);
  84. with T.Dependencies do
  85. begin
  86. AddInclude('dateutil.inc');
  87. end;
  88. T:=P.Targets.AddUnit('stdconvs.pp',StdConvsOSes);
  89. T.ResourceStrings:=true;
  90. with T.Dependencies do
  91. begin
  92. AddUnit('convutils',ConvUtilsOSes);
  93. AddUnit('convutil',ConvUtilOSes);
  94. end;
  95. T:=P.Targets.AddUnit('fmtbcd.pp',FmtBCDOSes);
  96. with T.Dependencies do
  97. AddUnit('variants');
  98. T:=P.Targets.AddUnit('variants.pp',VariantsOSes);
  99. T.ResourceStrings:=true;
  100. with T.Dependencies do
  101. begin
  102. AddUnit('varutils');
  103. // AddUnit('Math');
  104. end;
  105. T:=P.Targets.AddUnit('rtti.pp',RttiOSes);
  106. T.ResourceStrings:=true;
  107. end
  108. end;
  109. {$ifndef ALLPACKAGES}
  110. begin
  111. add_rtl_objpas('');
  112. Installer.Run;
  113. end.
  114. {$endif ALLPACKAGES}