mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 08:09:33 +02:00
+ Initial check-in
git-svn-id: trunk@973 -
This commit is contained in:
parent
aea94c8707
commit
03f441c966
3
.gitattributes
vendored
3
.gitattributes
vendored
@ -3344,6 +3344,7 @@ rtl/emx/sysosh.inc svneol=native#text/plain
|
||||
rtl/emx/system.pas svneol=native#text/plain
|
||||
rtl/emx/systhrd.inc svneol=native#text/plain
|
||||
rtl/emx/sysutils.pp svneol=native#text/plain
|
||||
rtl/fpmake.pp svneol=native#text/plain
|
||||
rtl/freebsd/Makefile svneol=native#text/plain
|
||||
rtl/freebsd/Makefile.fpc svneol=native#text/plain
|
||||
rtl/freebsd/bsdport.txt svneol=native#text/plain
|
||||
@ -3540,6 +3541,7 @@ rtl/linux/arm/syscallh.inc svneol=native#text/plain
|
||||
rtl/linux/arm/sysnr.inc svneol=native#text/plain
|
||||
rtl/linux/bunxsysc.inc svneol=native#text/plain
|
||||
rtl/linux/errno.inc svneol=native#text/plain
|
||||
rtl/linux/fpmake.inc svneol=native#text/plain
|
||||
rtl/linux/gpm.pp svneol=native#text/plain
|
||||
rtl/linux/i386/bsyscall.inc svneol=native#text/plain
|
||||
rtl/linux/i386/cprt0.as -text
|
||||
@ -4082,6 +4084,7 @@ rtl/unix/dl.pp svneol=native#text/plain
|
||||
rtl/unix/dos.pp svneol=native#text/plain
|
||||
rtl/unix/dynlibs.inc svneol=native#text/plain
|
||||
rtl/unix/errors.pp svneol=native#text/plain
|
||||
rtl/unix/fpmake.inc svneol=native#text/plain
|
||||
rtl/unix/genfdset.inc svneol=native#text/plain
|
||||
rtl/unix/genfuncs.inc svneol=native#text/plain
|
||||
rtl/unix/gensigset.inc svneol=native#text/plain
|
||||
|
50
rtl/fpmake.pp
Normal file
50
rtl/fpmake.pp
Normal file
@ -0,0 +1,50 @@
|
||||
{$mode objfpc}{$H+}
|
||||
{$define allpackages}
|
||||
program fpmake;
|
||||
|
||||
uses sysutils,fpmkunit;
|
||||
|
||||
{ Read RTL definitions. }
|
||||
{$i fpmake.inc}
|
||||
|
||||
{ Unix/Posix defines }
|
||||
{$i unix/fpmake.inc}
|
||||
|
||||
{ Load OS-specific targets and corrections }
|
||||
{$i linux/fpmake.inc}
|
||||
(*
|
||||
{$i amiga/fpmake.inc}
|
||||
{$i darwin/fpmake.inc}
|
||||
{$i freebsd/fpmake.inc}
|
||||
{$i palmos/fpmake.inc}
|
||||
{$i emx/fpmake.inc}
|
||||
{$i go32v2/fpmake.inc}
|
||||
{$i morphos/fpmake.inc}
|
||||
{$i atari/fpmake.inc}
|
||||
{$i macos/fpmake.inc}
|
||||
{$i netbsd/fpmake.inc}
|
||||
{$i openbsd/fpmake.inc}
|
||||
{$i win32/fpmake.inc}
|
||||
{$i beos/fpmake.inc}
|
||||
{$i netware/fpmake.inc}
|
||||
{$i os2/fpmake.inc}
|
||||
{$i solaris/fpmake.inc}
|
||||
*)
|
||||
|
||||
Var
|
||||
T : TTarget;
|
||||
|
||||
begin
|
||||
InitRTL(Installer); // Define RTL package.
|
||||
AddDefaultTargets(Installer); // Add all cross-platform units.
|
||||
// A line must be added here when adding support for a new OS.
|
||||
Case Installer.Defaults.OS of
|
||||
linux : ApplyLinuxTargets(Installer);
|
||||
|
||||
else
|
||||
Raise EInstallerError.Create('OS not yet supported by makefile: '+OsToString(Defaults.OS));
|
||||
end;
|
||||
Installer.EndPackage;
|
||||
Installer.Run; // Go.
|
||||
end.
|
||||
|
39
rtl/linux/fpmake.inc
Normal file
39
rtl/linux/fpmake.inc
Normal file
@ -0,0 +1,39 @@
|
||||
Procedure ApplyLinuxTargets(Installer : TInstaller);
|
||||
|
||||
Var
|
||||
C : String;
|
||||
|
||||
Procedure AddLoader (Loader : String);
|
||||
|
||||
Const
|
||||
asbin = 'as';
|
||||
asopt = '-o $(OUTPUTDIR)/$(DEST) $(SOURCE)';
|
||||
|
||||
begin
|
||||
With Installer.DefaultPackage.Commands do
|
||||
AddCommand(asbin,asopt,loader+'.o',c+loader+'.as');
|
||||
end;
|
||||
|
||||
begin
|
||||
ApplyUnixTargets(Installer);
|
||||
with Installer do
|
||||
begin
|
||||
DefaultPackage.Options:=DefaultPackage.Options+' -Filinux/'+CurrentCPU;
|
||||
ExcludeCurrentOS(Targets['utf8bidi']);
|
||||
end;
|
||||
C:=IncludeTrailingPathDelimiter('linux/'+CPUToString(Defaults.CPU));
|
||||
AddLoader('prt0');
|
||||
If (Defaults.CPU<>m68k) then
|
||||
begin
|
||||
AddLoader('cprt0');
|
||||
AddLoader('dllprt0');
|
||||
AddLoader('gprt0');
|
||||
end
|
||||
else
|
||||
AddLoader('prt1');
|
||||
If (Defaults.CPU=i386) Then
|
||||
begin
|
||||
AddLoader('cprt21');
|
||||
AddLoader('gprt21');
|
||||
end;
|
||||
end;
|
41
rtl/unix/fpmake.inc
Normal file
41
rtl/unix/fpmake.inc
Normal file
@ -0,0 +1,41 @@
|
||||
Procedure ApplyUnixTargets(Installer : TInstaller);
|
||||
|
||||
Var
|
||||
T : TTarget;
|
||||
|
||||
begin
|
||||
With Installer,Targets do
|
||||
begin
|
||||
T:=AddUnit('unix/syscall.pp');
|
||||
T:=AddUnit('unix/unixtype.pp');
|
||||
T:=AddUnit('unix/baseunix.pp');
|
||||
T.Dependencies.Add('unixtype');
|
||||
T:=AddUnit('unix/errors.pp');
|
||||
T.Dependencies.Add('strings');
|
||||
T:=AddUnit('unix/unix.pp');
|
||||
T.Dependencies.Add('baseunix');
|
||||
T.Dependencies.Add('unixtype');
|
||||
T.Dependencies.Add('strings');
|
||||
T:=AddUnit('unix/terminfo.pp');
|
||||
T.Dependencies.Add('baseunix');
|
||||
T:=AddUnit('unix/linux.pp');
|
||||
T:=AddUnit('unix/oldlinux.pp');
|
||||
T:=AddUnit('unix/unixutil.pp');
|
||||
if Defaults.CPU=i386 then
|
||||
T:=AddUnit('unix/x86');
|
||||
With Targets['sysutils'].dependencies do
|
||||
begin
|
||||
add('unix');
|
||||
add('errors');
|
||||
Add('unixtype');
|
||||
Add('baseunix');
|
||||
end;
|
||||
With Targets['Dos'].dependencies do
|
||||
begin
|
||||
Add('strings');
|
||||
Add('unix');
|
||||
Add('baseunix');
|
||||
Add('syscall');
|
||||
end;
|
||||
end;
|
||||
end;
|
Loading…
Reference in New Issue
Block a user