1{$ifndef ALLPACKAGES} 2{$mode objfpc}{$H+} 3program fpmake; 4 5uses fpmkunit; 6{$endif ALLPACKAGES} 7 8procedure add_rtl_console(const ADirectory: string); 9 10Const 11 // All Unices have full set of KVM+Crt in unix/ except QNX which is not 12 // in workable state atm. 13 UnixLikes = AllUnixOSes -[QNX]; 14 15 WinEventOSes = [win32,win64]; 16 KVMAll = [emx,go32v2,msdos,netware,netwlibc,os2,win32,win64,win16]+UnixLikes+AllAmigaLikeOSes; 17 18 // all full KVMers have crt too 19 CrtOSes = KVMALL+[WatCom]; 20 KbdOSes = KVMALL; 21 VideoOSes = KVMALL; 22 MouseOSes = KVMALL; 23 TerminfoOSes = UnixLikes-[beos,haiku]; 24 25 rtl_consoleOSes =KVMALL+CrtOSes+TermInfoOSes; 26 27Var 28 P : TPackage; 29 T : TTarget; 30 31begin 32 With Installer do 33 begin 34 P:=AddPackage('rtl-console'); 35 P.ShortName:='rtlc'; 36 P.Directory:=ADirectory; 37 P.Version:='3.2.2'; 38 P.Author := 'FPC core team, Pierre Mueller, Peter Vreman'; 39 P.License := 'LGPL with modification, '; 40 P.HomepageURL := 'www.freepascal.org'; 41 P.OSes:=Rtl_ConsoleOSes; 42 if Defaults.CPU=jvm then 43 P.OSes := P.OSes - [java,android]; 44 45 P.Email := ''; 46 P.Description := 'Rtl-console, console abstraction'; 47 P.NeedLibC:= false; 48 P.Dependencies.Add('rtl-extra'); // linux,android gpm. 49 P.Dependencies.Add('morphunits',[morphos]); 50 P.Dependencies.Add('arosunits',[aros]); 51 if Defaults.CPU=m68k then 52 P.Dependencies.Add('amunits',[amiga]); 53 if Defaults.CPU=powerpc then 54 P.Dependencies.Add('os4units',[amiga]); 55 P.SourcePath.Add('src/inc'); 56 P.SourcePath.Add('src/$(OS)'); 57 P.SourcePath.Add('src/darwin',[iphonesim,ios]); 58 P.SourcePath.Add('src/unix',AllUnixOSes); 59 P.SourcePath.Add('src/os2commn',[os2,emx]); 60 P.SourcePath.Add('src/amicommon',AllAmigaLikeOSes); 61 P.SourcePath.Add('src/win',WinEventOSes); 62 63 P.IncludePath.Add('src/inc'); 64 P.IncludePath.Add('src/unix',AllUnixOSes); 65 P.IncludePath.add('src/amicommon',AllAmigaLikeOSes); 66 P.IncludePath.Add('src/$(OS)'); 67 P.IncludePath.Add('src/darwin',[iphonesim,ios]); 68 69 T:=P.Targets.AddUnit('winevent.pp',WinEventOSes); 70 71 T:=P.Targets.AddUnit('keyboard.pp',KbdOSes); 72 with T.Dependencies do 73 begin 74 AddInclude('keybrdh.inc'); 75 AddInclude('keyboard.inc'); 76 AddInclude('keyscan.inc',AllUnixOSes); 77 AddUnit ('winevent',[win32,win64]); 78 AddInclude('nwsys.inc',[netware]); 79 AddUnit ('mouse',AllUnixOSes); 80 AddUnit ('video',[win16]); 81 end; 82 83 T:=P.Targets.AddUnit('mouse.pp',MouseOSes); 84 with T.Dependencies do 85 begin 86 AddInclude('mouseh.inc'); 87 AddInclude('mouse.inc'); 88 AddUnit ('winevent',[win32,win64]); 89 AddUnit ('video',[go32v2,msdos] + AllUnixOSes); 90 end; 91 92 T:=P.Targets.AddUnit('video.pp',VideoOSes); 93 with T.Dependencies do 94 begin 95 AddInclude('videoh.inc'); 96 AddInclude('video.inc'); 97 AddInclude('videodata.inc',AllAmigaLikeOSes); 98 AddInclude('convert.inc',AllUnixOSes); 99 AddInclude('nwsys.inc',[netware]); 100 AddUnit ('mouse',[go32v2,msdos]); 101 end; 102 103 T:=P.Targets.AddUnit('crt.pp',CrtOSes); 104 with T.Dependencies do 105 begin 106 AddInclude('crth.inc'); 107 AddInclude('crt.inc'); 108 AddInclude('nwsys.inc',[netware]); 109 AddUnit ('video',[win16]); 110 AddUnit ('keyboard',[win16]); 111 end; 112 113 T:=P.Targets.AddUnit('vesamode.pp',[go32v2,msdos]); 114 with T.Dependencies do 115 begin 116 AddUnit('video'); 117 AddUnit('mouse'); 118 end; 119 end 120end; 121 122{$ifndef ALLPACKAGES} 123begin 124 add_rtl_console(''); 125 Installer.Run; 126end. 127{$endif ALLPACKAGES} 128 129