!Common,feb 5.77 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
| Copyright 2008 Castle Technology Ltd
|
| Licensed under the Apache License, Version 2.0 (the "License");
| you may not use this file except in compliance with the License.
| You may obtain a copy of the License at
|
|     http://www.apache.org/licenses/LICENSE-2.0
|
| Unless required by applicable law or agreed to in writing, software
| distributed under the License is distributed on an "AS IS" BASIS,
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
| See the License for the specific language governing permissions and
| limitations under the License.
|
| Common setup for build environment
|
| Notes:
|   Used in makefiles: Tools$Dir     (Utilities only)
|                      Export$Dir    (all components with interface hdr files)
|                      Lib$Dir       (RISC_OSLib and OSLib)
|                      OSLibDef$Dir  (ColourPicker)
|
if "<Machine>" = "" then error No system defined - Run a !Env
if "<UserIF>" = "" then error User interface not defined - Update !Env
if "<APCS>" = "" then error APCS not defined - Update !Env
|
Set File$Type_FE5 EPROM
Set File$Type_FD3 DebImage
Set Alias$@RunType_FD3 DebugAIF %%*0
Set Alias$@LoadType_FD3 Load %%*0 8000
|
|
set Build$Dir      <Obey$Dir>.^
/<Build$Dir>.Library.build.canonical Build$Dir
set Tools$Dir      <Build$Dir>.Library

|
RMEnsure DDEUtils 1.66 RMLoad <Build$Dir>.Modules.DDEUtils
RMEnsure FrontEnd 1.29 RMLoad <Build$Dir>.Modules.FrontEnd
RMEnsure Shrinkwrap 0.02 RMLoad <Build$Dir>.Modules.ShrinkWrap
RMEnsure International 1.59 RMLoad <Build$Dir>.Modules.Inter
RMEnsure SharedUnixLibrary 1.02 RMLoad <Build$Dir>.Modules.SharedULib
| This will be needed to be softloaded for 32-bit builds.
RMEnsure SharedCLibrary 5.18 RMLoad System:Modules.CLib
RMEnsure SharedCLibrary 5.18

|
| Determine whether we have a working or broken amu - if it is working (5.13 or later), the system variable
| BuildSys$AMU$Fixed will be set to "yes" - otherwise "yes".   To cope with the broken Makefiles in the build
| tree, for the time being the compatibility option is required for the fixed version of AMU.  Older versions
| do not require this fix, but also need to pass environment variables in explicitly.
|
/<Tools$Dir>.Acorn.amu -f <Build$Dir>.Env.Makefile FIXED=yes find-amu-version
set alias$amu_machine amu MACHINE=<Machine> LOCALE=<Locale> SYSTEM=<System> BUILD=<Build> UserIF=<UserIF> APCS=<APCS> %%*0
if "<BuildSys$AMU$Fixed>"="yes" Then set alias$amu_machine amu -E %%*0
|

| This is setup so this can be run multiple times without extending Run$Path
if "<Build$Setup>" = "" then set Run$Path Build:,Apps:,<Run$Path>
setmacro Build$Path     <Tools$Dir>.Acorn.,<Tools$Dir>.Build.,<Tools$Dir>.Unix.,<Tools$Dir>.Misc.,<Tools$Dir>.,<Tools$Dir>.DrSmiths.Utilities.
set BASIC$Path     Build:
Set Apps$Path      <Build$Dir>.Apps.
Set Makefiles$Path <Build$Dir>.BuildSys.Makefiles.
|
65
|set Src$Dir        <Build$Dir>.Sources
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
set Install$Dir    <Build$Dir>.Install

| Locate the export directories and set the tool options
/Build:ToolOptions.<APCS>
|
Set APCSExport$Dir <Build$Dir>.Export.<APCS>

set Export$Dir     <APCSExport$Dir>.Hdr.Interface
set CExport$Dir    <APCSExport$Dir>.C
set Hdr$Dir        <APCSExport$Dir>.Hdr
set Lib$Dir        <APCSExport$Dir>.Lib

| Location for messages is now extracted from Messages entry in Components. Woo!
| set Messages$Dir   <Build$Dir>.Sources.OS_Core.Internat.Messages
| set Resource$Dir   <Build$Dir>.Sources.OS_Core.Internat.Messages.Resources.<Locale>.<System>
Set Alias$TokenCheck ||
SetMacro LocalRes$Path  Resources.<Locale>.,Resources.UK.
SetMacro LocalUserIFRes$Path  Resources.<UserIF>.<Locale>.,Resources.<UserIF>.UK.
SetMacro LocalSystemRes$Path  Resources.<System>.<Locale>.,Resources.<System>.UK.
|
| Assembler header files includes (GETs)
|
set Hdr$Path       hdr.,<Hdr$Dir>.Global.,<Hdr$Dir>.Interface.,<Hdr$Dir>.Interface2.
set GlobalHdr$Path <Hdr$Dir>.Global.
|
| Libraries
|
set C$CLib         <Lib$Dir>.CLib
| Can't have ++ in path variable so use CPP$Path instead of C++$Path
Set CPP$Path       <Lib$Dir>.C++Lib.
set C$RISC_OSLib   <Lib$Dir>.RISC_OSLib
set C$Path         <C$CLib>.,<C$RISC_OSLib>.,<CExport$Dir>.,<Lib$Dir>.
set C$libroot       C:
|
set CLIB$Path      <C$CLib>.
set RISCOSLIB$Path <C$RISC_OSLib>.
setmacro RISC_OSLib$Path <RISCOSLIB$Path>
|
104
|set OSLibDef$Dir   <Src$Dir>.Lib.OSLib.def
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136
Set OSLib$Dir <Lib$Dir>.OSLib
SetMacro OS1$Path <OSLib$Dir>.Core.,<OSLib$Dir>.Computer.,<OSLib$Dir>.User.,<OSLib$Dir>.Toolbox.
SetMacro OS2$Path <OSLib$Dir>.Core.oslib.,<OSLib$Dir>.Computer.oslib.,<OSLib$Dir>.User.oslib.,<OSLib$Dir>.Toolbox.oslib.
Set OS$Path <OS1$Path>,<OS2$Path>
Set OSLibInclude$Path <OS$Path>
|Set OS$Path <OSLib$Dir>.
Set OSLib$Path <OSLib$Dir>.,<OS1$Path>
|
|set Support$Path   <Src$Dir>.Lib.Support.
|set Support$Dir    <Src$Dir>.Lib.Support
|
| Networking:
|
Set TCPIPLibs$Path <Lib$Dir>.TCPIPLibs.
set alias$prefix echo AMU: prefix %*0|Mdir %*0
|
| Aquarius:
| NOTE: Absolutely do NOT put tboxlibint on this path.  That directory is
|       internal to the Toolbox build and exported for general convenience
|       to the Toolbox build process.
|
Set tbox$path <Lib$Dir>.tboxlibs.
|
| Sentry value: has !Common been run before (i.e. build environment set up)?
Set Build$Setup 1
|
| Auto Language Translation Support
|
SetMacro TranslateRes$Path        Translate.<UserIF>.<Locale>.,Translate.<UserIF>.UK.
|
| Location of !Perl, !Builder & !EraseCVS.  Used by AutoBuild.
|
137 138 139 140
IfThere Apps:!Builder.!Boot   Then Filer_Run Apps:!Builder.!Boot  Else x IconSprites Apps:!Builder.!Sprites
IfThere Apps:!EraseCVS.!Boot  Then Filer_Run Apps:!EraseCVS.!Boot Else x IconSprites Apps:!EraseCVS.!Sprites
IfThere Apps:!Perl.!Boot      Then Filer_Run Apps:!Perl.!Boot     Else x IconSprites Apps:!Perl.!Sprites
IfThere Apps:!gcc2_95_4       Then Filer_Run Apps:!gcc2_95_4
141 142 143 144 145
|
| Initialise UnixLib tools
|
Set UnixEnv$gawk$nonametrans 1
|
146
| End.