From 8714ddafa54a14e5a089371f2ac67526d11c099b Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 7 Jan 2018 14:56:44 +0000 Subject: [PATCH] * fix pathes of IDE package * cosmetic changes (indention) * cross IDE gets now the CPU name as a prefix * cross IDE units are build into a seperate dir, so after a full build, a cross IDE can be easily build git-svn-id: trunk@37929 - --- packages/ide/Makefile | 4 ++-- packages/ide/Makefile.fpc | 4 ++-- packages/ide/fpmake.pp | 28 +++++++++++++++++++--------- 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/packages/ide/Makefile b/packages/ide/Makefile index 4379781955..bae601cf43 100644 --- a/packages/ide/Makefile +++ b/packages/ide/Makefile @@ -2289,8 +2289,8 @@ override FPCOPT:=$(filter-out $(addprefix -Fu,$(COMPILER_UNITDIR)),$(FPCOPT))# C ifdef FPMAKEOPT FPMAKE_OPT+=$(FPMAKEOPT) endif -FPMAKE_OPT+=--localunitdir=.. -FPMAKE_OPT+=--globalunitdir=../packages +FPMAKE_OPT+=--localunitdir=../.. +FPMAKE_OPT+=--globalunitdir=../../packages FPMAKE_OPT+=$(FPC_TARGETOPT) FPMAKE_OPT+=$(addprefix -o ,$(FPCOPT)) FPMAKE_OPT+=--compiler=$(FPC) diff --git a/packages/ide/Makefile.fpc b/packages/ide/Makefile.fpc index 21eae2e5fa..54425f513a 100644 --- a/packages/ide/Makefile.fpc +++ b/packages/ide/Makefile.fpc @@ -44,8 +44,8 @@ override FPCOPT:=$(filter-out $(addprefix -Fu,$(COMPILER_UNITDIR)),$(FPCOPT))# C ifdef FPMAKEOPT FPMAKE_OPT+=$(FPMAKEOPT) endif -FPMAKE_OPT+=--localunitdir=.. -FPMAKE_OPT+=--globalunitdir=../packages +FPMAKE_OPT+=--localunitdir=../.. +FPMAKE_OPT+=--globalunitdir=../../packages FPMAKE_OPT+=$(FPC_TARGETOPT) FPMAKE_OPT+=$(addprefix -o ,$(FPCOPT)) FPMAKE_OPT+=--compiler=$(FPC) diff --git a/packages/ide/fpmake.pp b/packages/ide/fpmake.pp index b51f1fc3f2..f8ec663aab 100644 --- a/packages/ide/fpmake.pp +++ b/packages/ide/fpmake.pp @@ -165,7 +165,7 @@ begin else CompilerTarget:=Defaults.CPU; - if GDBMIOption or + if GDBMIOption or ( (Defaults.BuildOS=Defaults.OS) and (Defaults.BuildCPU=Defaults.CPU) and (Defaults.OS in [go32v2,win32,win64,linux,freebsd,os2,emx,beos,haiku]) ) then @@ -182,9 +182,9 @@ begin { This one is only needed if DEBUG is set } P.Dependencies.Add('regexpr'); if not (NoGDBOption) and not (GDBMIOption) then - P.Dependencies.Add('gdbint',AllOSes-AllAmigaLikeOSes); + P.Dependencies.Add('gdbint',AllOSes-AllAmigaLikeOSes); if GDBMIOption then - P.Dependencies.Add('fcl-process'); + P.Dependencies.Add('fcl-process'); P.Dependencies.Add('graph',[go32v2]); P.Dependencies.Add('ami-extra',AllAmigaLikeOSes); @@ -195,7 +195,7 @@ begin P.Options.Add('-dBrowserCol'); P.Options.Add('-dGDB'); - CompilerDir:='../compiler'; + CompilerDir:=P.Directory +'../../compiler'; P.Options.Add('-d'+CPUToString(CompilerTarget)); P.Options.Add('-Fu'+CompilerDir); @@ -204,28 +204,38 @@ begin P.Options.Add('-Fu'+CompilerDir+'/systems'); P.Options.Add('-Fi'+CompilerDir+'/'+CPUToString(CompilerTarget)); P.Options.Add('-Fi'+CompilerDir); + + if CompilerTarget<>Defaults.CPU then + begin + P.Options.Add('-o'+CPUToString(CompilerTarget)+'-fp'); + P.SetUnitsOutputDir(P.GetUnitsOutputDir(Defaults.BuildCPU,Defaults.BuildOS)+CPUToString(CompilerTarget)); + end; if CompilerTarget in [x86_64, i386, i8086] then - P.Options.Add('-Fu'+CompilerDir+'/x86'); + P.Options.Add('-Fu'+CompilerDir+'/x86'); + if CompilerTarget in [powerpc, powerpc64] then - P.Options.Add('-Fu'+CompilerDir+'/ppcgen'); + P.Options.Add('-Fu'+CompilerDir+'/ppcgen'); if CompilerTarget in [sparc, sparc64] then begin P.Options.Add('-Fu'+CompilerDir+'/sparcgen'); P.Options.add('-Fi'+CompilerDir+'/sparcgen'); end; if CompilerTarget = x86_64 then - P.Options.Add('-dNOOPT'); + P.Options.Add('-dNOOPT'); + if CompilerTarget = mipsel then - P.Options.Add('-Fu'+CompilerDir+'/mips'); + P.Options.Add('-Fu'+CompilerDir+'/mips'); { powerpc64-aix compiled IDE needs -CTsmalltoc option } if (Defaults.OS=aix) and (Defaults.CPU=powerpc64) then P.Options.Add('-CTsmalltoc'); + { Handle SPECIALLINK environment variable if available } s:=GetEnvironmentVariable('SPECIALLINK'); if s<>'' then - P.Options.Add(s); + P.Options.Add(s); + P.Options.Add('-Sg'); P.IncludePath.Add('compiler');