mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-09 00:35:56 +02:00
added wince defines for RTL sources
git-svn-id: trunk@8677 -
This commit is contained in:
parent
da053da649
commit
3e7bfb3ea5
@ -3278,6 +3278,8 @@ var
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure AddProcessorTypeDefine(ParentDefTempl: TDefineTemplate);
|
procedure AddProcessorTypeDefine(ParentDefTempl: TDefineTemplate);
|
||||||
|
// some FPC source files expects defines 'i386' instead of 'CPUi386'
|
||||||
|
// define them automatically with IF..THEN constructs
|
||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
CPUName: String;
|
CPUName: String;
|
||||||
@ -3286,6 +3288,10 @@ var
|
|||||||
// FPC defines CPUxxx defines (e.g. CPUI386, CPUPOWERPC).
|
// FPC defines CPUxxx defines (e.g. CPUI386, CPUPOWERPC).
|
||||||
// These defines are created by the compiler depending
|
// These defines are created by the compiler depending
|
||||||
// on xxx defines (i386, powerpc).
|
// on xxx defines (i386, powerpc).
|
||||||
|
// Create:
|
||||||
|
// IF CPUi386 then define i386
|
||||||
|
// IF CPUpowerpc then define powerpc
|
||||||
|
// ...
|
||||||
for i:=Low(FPCProcessorNames) to high(FPCProcessorNames) do begin
|
for i:=Low(FPCProcessorNames) to high(FPCProcessorNames) do begin
|
||||||
CPUName:=FPCProcessorNames[i];
|
CPUName:=FPCProcessorNames[i];
|
||||||
IfTemplate:=TDefineTemplate.Create('IFDEF CPU'+CPUName,
|
IfTemplate:=TDefineTemplate.Create('IFDEF CPU'+CPUName,
|
||||||
@ -3344,6 +3350,7 @@ var
|
|||||||
FCLDBInterbaseDir: TDefineTemplate;
|
FCLDBInterbaseDir: TDefineTemplate;
|
||||||
InstallerDir: TDefineTemplate;
|
InstallerDir: TDefineTemplate;
|
||||||
RTLWin64Dir: TDefineTemplate;
|
RTLWin64Dir: TDefineTemplate;
|
||||||
|
RTLWinCEDir: TDefineTemplate;
|
||||||
begin
|
begin
|
||||||
{$IFDEF VerboseFPCSrcScan}
|
{$IFDEF VerboseFPCSrcScan}
|
||||||
DebugLn('CreateFPCSrcTemplate ',FPCSrcDir,': length(UnitSearchPath)=',DbgS(length(UnitSearchPath)),' Valid=',DbgS(UnitLinkListValid),' PPUExt=',PPUExt);
|
DebugLn('CreateFPCSrcTemplate ',FPCSrcDir,': length(UnitSearchPath)=',DbgS(length(UnitSearchPath)),' Valid=',DbgS(UnitLinkListValid),' PPUExt=',PPUExt);
|
||||||
@ -3404,6 +3411,7 @@ begin
|
|||||||
// rtl
|
// rtl
|
||||||
RTLDir:=TDefineTemplate.Create('RTL',ctsRuntimeLibrary,'','rtl',da_Directory);
|
RTLDir:=TDefineTemplate.Create('RTL',ctsRuntimeLibrary,'','rtl',da_Directory);
|
||||||
MainDir.AddChild(RTLDir);
|
MainDir.AddChild(RTLDir);
|
||||||
|
|
||||||
// rtl include paths
|
// rtl include paths
|
||||||
s:=IncPathMacro
|
s:=IncPathMacro
|
||||||
+';'+Dir+'rtl'+DS+'objpas'+DS
|
+';'+Dir+'rtl'+DS+'objpas'+DS
|
||||||
@ -3423,6 +3431,7 @@ begin
|
|||||||
Format(ctsIncludeDirectoriesPlusDirs,
|
Format(ctsIncludeDirectoriesPlusDirs,
|
||||||
['objpas, inc,'+TargetProcessor+','+SrcOS]),
|
['objpas, inc,'+TargetProcessor+','+SrcOS]),
|
||||||
ExternalMacroStart+'IncPath',s,da_DefineRecurse));
|
ExternalMacroStart+'IncPath',s,da_DefineRecurse));
|
||||||
|
|
||||||
// rtl/$(#TargetOS)
|
// rtl/$(#TargetOS)
|
||||||
if TargetOS<>'' then begin
|
if TargetOS<>'' then begin
|
||||||
RTLOSDir:=TDefineTemplate.Create('TargetOS','Target OS','',
|
RTLOSDir:=TDefineTemplate.Create('TargetOS','Target OS','',
|
||||||
@ -3439,6 +3448,7 @@ begin
|
|||||||
ExternalMacroStart+'SrcPath',s,da_DefineRecurse));
|
ExternalMacroStart+'SrcPath',s,da_DefineRecurse));
|
||||||
RTLDir.AddChild(RTLOSDir);
|
RTLDir.AddChild(RTLOSDir);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// rtl/win32
|
// rtl/win32
|
||||||
RTLWin32Dir:=TDefineTemplate.Create('Win32','Win32','','win32',da_Directory);
|
RTLWin32Dir:=TDefineTemplate.Create('Win32','Win32','','win32',da_Directory);
|
||||||
RTLDir.AddChild(RTLWin32Dir);
|
RTLDir.AddChild(RTLWin32Dir);
|
||||||
@ -3447,8 +3457,6 @@ begin
|
|||||||
ExternalMacroStart+'IncPath',
|
ExternalMacroStart+'IncPath',
|
||||||
IncPathMacro+';wininc;..'+DS+'win',da_Define));
|
IncPathMacro+';wininc;..'+DS+'win',da_Define));
|
||||||
|
|
||||||
AddProcessorTypeDefine(RTLDir);
|
|
||||||
AddSrcOSDefines(RTLDir);
|
|
||||||
// rtl/win64
|
// rtl/win64
|
||||||
RTLWin64Dir:=TDefineTemplate.Create('Win64','Win64','','win64',da_Directory);
|
RTLWin64Dir:=TDefineTemplate.Create('Win64','Win64','','win64',da_Directory);
|
||||||
RTLDir.AddChild(RTLWin64Dir);
|
RTLDir.AddChild(RTLWin64Dir);
|
||||||
@ -3457,9 +3465,19 @@ begin
|
|||||||
ExternalMacroStart+'IncPath',
|
ExternalMacroStart+'IncPath',
|
||||||
IncPathMacro+';wininc;..'+DS+'win',da_Define));
|
IncPathMacro+';wininc;..'+DS+'win',da_Define));
|
||||||
|
|
||||||
|
// rtl/wince
|
||||||
|
RTLWinCEDir:=TDefineTemplate.Create('WinCE','WinCE','','wince',da_Directory);
|
||||||
|
RTLDir.AddChild(RTLWinCEDir);
|
||||||
|
RTLWinCEDir.AddChild(TDefineTemplate.Create('Include Path',
|
||||||
|
Format(ctsIncludeDirectoriesPlusDirs,['wininc']),
|
||||||
|
ExternalMacroStart+'IncPath',
|
||||||
|
IncPathMacro+';wininc;..'+DS+'win',da_Define));
|
||||||
|
|
||||||
|
// add processor and SrcOS alias defines for the RTL
|
||||||
AddProcessorTypeDefine(RTLDir);
|
AddProcessorTypeDefine(RTLDir);
|
||||||
AddSrcOSDefines(RTLDir);
|
AddSrcOSDefines(RTLDir);
|
||||||
|
|
||||||
|
|
||||||
// fcl
|
// fcl
|
||||||
FCLDir:=TDefineTemplate.Create('FCL',ctsFreePascalComponentLibrary,'','fcl',
|
FCLDir:=TDefineTemplate.Create('FCL',ctsFreePascalComponentLibrary,'','fcl',
|
||||||
da_Directory);
|
da_Directory);
|
||||||
@ -3473,6 +3491,7 @@ begin
|
|||||||
+';'+Dir+'fcl'+DS+'classes'+DS
|
+';'+Dir+'fcl'+DS+'classes'+DS
|
||||||
+';'+Dir+'rtl'+DS+TargetOS+DS
|
+';'+Dir+'rtl'+DS+TargetOS+DS
|
||||||
,da_DefineRecurse));
|
,da_DefineRecurse));
|
||||||
|
|
||||||
// fcl/db
|
// fcl/db
|
||||||
FCLDBDir:=TDefineTemplate.Create('DB','DB','','db',da_Directory);
|
FCLDBDir:=TDefineTemplate.Create('DB','DB','','db',da_Directory);
|
||||||
FCLDir.AddChild(FCLDBDir);
|
FCLDir.AddChild(FCLDBDir);
|
||||||
@ -3495,6 +3514,7 @@ begin
|
|||||||
UtilsDir:=TDefineTemplate.Create('Utils',ctsUtilsDirectories,'',
|
UtilsDir:=TDefineTemplate.Create('Utils',ctsUtilsDirectories,'',
|
||||||
'utils',da_Directory);
|
'utils',da_Directory);
|
||||||
MainDir.AddChild(UtilsDir);
|
MainDir.AddChild(UtilsDir);
|
||||||
|
|
||||||
// utils/debugsvr
|
// utils/debugsvr
|
||||||
DebugSvrDir:=TDefineTemplate.Create('DebugSvr','Debug Server','',
|
DebugSvrDir:=TDefineTemplate.Create('DebugSvr','Debug Server','',
|
||||||
'debugsvr',da_Directory);
|
'debugsvr',da_Directory);
|
||||||
|
Loading…
Reference in New Issue
Block a user