Commits (40)
  • Ben Avison's avatar
    Incremental step in cross-compilation support · 5e83cb7e
    Ben Avison authored
    Detail:
      ModuleDB:
      * Correct capitalisation of resgen's TARGET to match its main source file
      GNUmakefiles/AAsmModule:
      * Targets now given ,ffa filetype suffix
      * Support source directory layouts s/<subdir>/<leaf> as used by the
        kernel and printer drivers - define SYMLINK_EXT_FIRST to enable
      * Prevent relinking when running make on an up-to-date component due to
        a difference between amu and GNU make's handling of double-colon rules
      * Support linking with GNU toolchain
      * Fix installation rule (mixup between MERGEDMDIR and MERGEDRDIR)
      * Support up to 16 assembler and 8 C-from-assembler headers, up from 3
        of each (here's looking at you, kernel) - long-term, it might be worth
        changing this to a scheme like that used by CModule to remove any
        limits
      * Fix C-from-assembler exports to have .h suffix
      GNUmakefiles/AppLibs:
      * Define INCLUDE_OSLIB to permit OSLib header search paths to be
        specified in an OS-agnostic way
      GNUmakefiles/CApp:
      * Prevent relinking when running make on an up-to-date component due to
        a difference between amu and GNU make's handling of double-colon rules
      GNUmakefiles/CLibrary:
      * Prevent rearchiving when running make on an up-to-date component due
        to a difference between amu and GNU make's handling of double-colon
        rules
      * Don't use .hdr suffix on exported assembler header files
      * Correct order of dependencies for export_libs phony target
      GNUmakefiles/StdTools:
      * Definition for the module filetype suffix
      * Add LDBIN tool for GNU/Norcroft-agnostic binary link, useful for
        linking position-independent binary code, such as relocatable modules
        (i.e. ones that don't require the linker to create a __RelocCode
        function)
      * FAPPEND function now works if the same file is used for the
        destination as for one of the sources (this is used by CModule)
      GNUmakefiles/CModule, ModStdRule, ModuleLibs:
      * Finally created cross-compilation versions of the last major shared
        makefiles! Warning: these have received limited testing to date.
      Makefiles/AAsmModule:
      * Support up to 16 assembler and 8 C-from-assembler headers
      Makefiles/AppLibs, ModuleLibs:
      * Define INCLUDE_OSLIB
      Makefiles/StdTools:
      * Add LDBIN tool
    
    
    Version 7.24. Tagged as 'BuildSys-7_24'
    5e83cb7e
  • Ben Avison's avatar
    Makefile bugfixes · 53b25b7a
    Ben Avison authored
    Detail:
      Makefiles/AAsmModule:
      * This was the odd-one out amongst top-level shared makefiles in that it
        still required the master makefile to include StdTools explicitly - even
        the GNU version of this makefile did so. Now changed for consistency.
      GNUmakefiles/AAsmModule:
      * Fixed typo in renaming of MERGEDMDIR to MERGEDRDIR.
    Admin:
      Fixes build error in latest FPEmulator
    
    
    Version 7.25. Tagged as 'BuildSys-7_25'
    53b25b7a
  • Ben Avison's avatar
    Fix definition of INCLUDE_OSLIB · 8198f31f
    Ben Avison authored
    Detail:
      Somehow the leading minus signs went missing - this broke ColourPicker,
      which was the only component that relied on it.
    
    Version 7.26. Tagged as 'BuildSys-7_26'
    8198f31f
  • ROOL's avatar
    Component, Makefile, ModuleDB updates · 300a68d2
    ROOL authored
    Detail:
      Disc - add AcornHTTP and URL modules, force en-gb CmdHelp for RouteD in 310 directory.
      OMAP5 - add ADFS/SATADriver/ATAPI, change default CMOS to select FileSystem=ADFS
      Libs makefiles - add path to ZLIB
      ModuleDB - Relocate OMAP5 HAL to mixed/
    
    Version 7.27. Tagged as 'BuildSys-7_27'
    300a68d2
  • Jeffrey Lee's avatar
    Add VideoOverlay to ModuleDB, disc image · a16c52d9
    Jeffrey Lee authored
    Version 7.28. Tagged as 'BuildSys-7_28'
    a16c52d9
  • Robert Sprowson's avatar
    Add PDumperPCL to !Printers · 376dc80c
    Robert Sprowson authored
    The sources were added a few years ago, a dumper number allocated, and printer definition. Complete the set with the dumper too.
    
    Version 7.29. Tagged as 'BuildSys-7_29'
    376dc80c
  • ROOL's avatar
    Addition of Iceland, Portugal & Netherlands Territory modules · 34b3ed6b
    ROOL authored
    Admin:
      Added to ModuleDB and BonusBin components
    
    Version 7.30. Tagged as 'BuildSys-7_30'
    34b3ed6b
  • ROOL's avatar
    Add mbedTLS to Disc build · 38981f43
    ROOL authored
    Version 7.31. Tagged as 'BuildSys-7_31'
    38981f43
  • ROOL's avatar
    Common OMAP5 module ordering · 25b0583e
    ROOL authored
    Admin:
      Move Podule/ADFSFiler/SATADriver around to similar positions to other components file (so they appear after the modules on which they depend, even if that's not alphabetical).
      Update type in ModuleDB.
    
    Version 7.32. Tagged as 'BuildSys-7_32'
    25b0583e
  • Ben Avison's avatar
  • Robert Sprowson's avatar
    Add GateWay to ModuleDB and BonusBin · bb34a35b
    Robert Sprowson authored
    Version 7.33. Tagged as 'BuildSys-7_33'
    bb34a35b
  • ROOL's avatar
    Add AcornSSL to Disc build · 0992a160
    ROOL authored
    Version 7.34. Tagged as 'BuildSys-7_34'
    0992a160
  • Robert Sprowson's avatar
    Add NetUtils to ModuleDB and PlingSystem · 6778d57a
    Robert Sprowson authored
    Rename dummy module NetUtils2 to NetUtils2. Use NetUtils for the real thing.
    RISC OS 3.50 and later had a new enough version of NetFS to not need patching (>=5.79), so on the face of it the simplest solution would be to load the newer NetFS on earlier OS versions. However, that wouldn't work if you were booting via NetFS (compared with loading NetUtils, which can be done while NetFS is being used).
    
    Version 7.35. Tagged as 'BuildSys-7_35'
    6778d57a
  • Robert Sprowson's avatar
    Add FilerUtils to ModuleDB and PlingSystem · a817ef6b
    Robert Sprowson authored
    Version 7.36. Tagged as 'BuildSys-7_36'
    a817ef6b
  • Robert Sprowson's avatar
    Install a disc copy of Resolver/ShareFS in PlingSystem · 16d75e8b
    Robert Sprowson authored
    Version 7.37. Tagged as 'BuildSys-7_37'
    16d75e8b
  • Robert Sprowson's avatar
    Preserve the timestamp when INSERTVERSION operates on Messages · d3b77865
    Robert Sprowson authored
    Those RAM loading modules which pick from VersionNum and insert into their Messages would create a new Messages file with a new date every time they are built. Because the tools to put these in ResourceFS also capture the file's datestamp (via :FLOAD: :FEXEC: in objasm, or via resgen for C modules), you don't create binary identical copies on two successive builds despite the same input source.
    Add a ${TOUCH} step to copy the reference time stamp to the generated Messages file.
    
    Requires Library-1_96 or later for Touch.
    d3b77865
  • Ben Avison's avatar
    Preserve timestamp for INSERTVERSION Messages files when cross compiling too · 64414d79
    Ben Avison authored
    Version 7.38. Tagged as 'BuildSys-7_38'
    64414d79
  • Robert Sprowson's avatar
    Build fix · 4022e43f
    Robert Sprowson authored
    Don't try and be clever using Build$Path, just refer to touch directly (since uses of it elsewhere don't have *Run).
    
    Version 7.39. Tagged as 'BuildSys-7_39'
    4022e43f
  • Willi Theiss's avatar
    Add GPIO module to OMAP5 · 8707a1eb
    Willi Theiss authored
    Version 7.40. Tagged as 'BuildSys-7_40'
    8707a1eb
  • Timothy E Baldwin's avatar
    Fix typo in make function name. · daccce4f
    Timothy E Baldwin authored
    make-cppp-depend => make-cpp-depend
    
    Version 7.40. Not tagged
    daccce4f
  • ROOL's avatar
    Browse components file maintenance · 0473d93b
    ROOL authored
    Detail:
      AcornSSL now built from source.
      AcornHTTP TARGET changed.
      Missing headers from FileSwitch added.
    Admin:
      Build completed (having started from standard Exports in DDE29a).
    
    Version 7.41. Tagged as 'BuildSys-7_41'
    0473d93b
  • Robert Sprowson's avatar
    Shrink oversize HALs · afef5036
    Robert Sprowson authored
    Set the -at address to match reduced HAL size (from Env-1_43).
    Remove EnforceSCSI4 predefine from iMx6, there's no such switch in the Kernel, replace it with best guess as might have been: configure SCSI drive 4.
    afef5036
  • Robert Sprowson's avatar
    Install FormEd · b1fc492e
    Robert Sprowson authored
    Terrible window editor WinEdit is in the bonus bin, so why not FormEd too.
    b1fc492e
  • Robert Sprowson's avatar
    Add XHCIDriver+EtherGENET to BCM2835 · 51810f13
    Robert Sprowson authored
    At time of writing neither works, but they go dormant gracefully.
    
    Version 7.42. Tagged as 'BuildSys-7_42'
    51810f13
  • Robert Sprowson's avatar
    Build fix · 55b4c501
    Robert Sprowson authored
    Add FormEd to ModuleDB now it's used in the BonusBin component.
    
    Version 7.42. Not tagged
    55b4c501
  • Ben Avison's avatar
    Add Dialler to ModuleDB, PPP to Disc · edcacf39
    Ben Avison authored
    PPP also turned out to need Dialler exports, so that got released too.
    Add PPP to the Disc components, and Dialler for its exports.
    
    Version 7.43. Tagged as 'BuildSys-7_43'
    edcacf39
  • Jeffrey Lee's avatar
    Add WindowScroll to ModuleDB + ROMs · 270182cd
    Jeffrey Lee authored
    Replace redundant AUNMsgs module with WindowScroll, to avoid unplugged
    modules being shuffled.
    
    Also remove rogue AcornURI from BCM2835 ROM.
    
    Version 7.44. Tagged as 'BuildSys-7_44'
    270182cd
  • Robert Sprowson's avatar
    Add EtherGENET AutoSense, browser & bonus bin updates · 92858327
    Robert Sprowson authored
    * Put the GENET autosense into !InetSetup
    * Export Dialler's header for !Browse now the component is published.
    * Chuck MailMan in the bonus bin, for that Econet mail experience.
    
    Version 7.45. Tagged as 'BuildSys-7_45'
    92858327
  • Timothy E Baldwin's avatar
    Add .gitignore · 47e3b0f9
    Timothy E Baldwin authored
    Version 7.45. Not tagged
    47e3b0f9
  • Robert Sprowson's avatar
    Add ZeroPain to BonusBin · a90f4c23
    Robert Sprowson authored
    Version 7.46. Tagged as 'BuildSys-7_46'
    a90f4c23
  • Ben Avison's avatar
  • Ben Avison's avatar
    Standardise autogeneration of source files using objasm within CModule clients · 3d3228a9
    Ben Avison authored
    Various components use objasm for its general macro abilities in order to
    generate intermediate source or header files. To date, this has required
    writing of custom rules, which then need separate implementations for
    cross-compilation use.
    
    There is no standardisation of destination directory (it may be generating
    source or header files in any arbitrary language) so the solution here is to
    specify each target using a subdirectory, basename and extension, and leave
    CModule to deal with whether or not the extension should be in prefix or
    suffix position, depending on the host OS. Only one such autogenerated file
    is currently supported per makefile:
    
    ```
    ASM2TXT = <basename> <optional extension>
    ASM2TXT_SUBDIR = <optional subdirectory, each element followed by ${SEP}>
    ```
    
    The source file passed to objasm is derived from `<basename>`, prefixed by
    `s.` or suffixed by `.s` as appropriate.
    3d3228a9
  • Ben Avison's avatar
    Add extra rules to help amu deduce prerequisites of ASM2TXT header exports · d9c576a6
    Ben Avison authored
    GNU make doesn't need this extra hint.
    
    Version 7.47. Tagged as 'BuildSys-7_47'
    d9c576a6
  • Ben Avison's avatar
    Assistance for cross-compilable makefiles · 1f71f8f1
    Ben Avison authored
    StdTools: new symbol SUFFIX_HEADER: '.h' for GNU make, undefined for amu; useful for generating filenames of generated headers
    StdTools: new symbol EXT: filename extension separator character
    CModule: ROM_SYMS: now defined conditionally, permitting it to be overridden higher up the master makefile, to match SA_LIBS and ROM_LIBS
    
    Version 7.47. Not tagged
    1f71f8f1
  • Robert Sprowson's avatar
    Add RMVersion as a library to PlingSystem · c48d0869
    Robert Sprowson authored
    For Installer.
    
    Version 7.48. Tagged as 'BuildSys-7_48'
    c48d0869
  • Ben Avison's avatar
    Enable rom_link target for AAsmModule components · f9c01ed0
    Ben Avison authored
    The ModuleDB classifies modules as being of type either `ASM` or `C`. The
    primary consumer of this information is `srcbuild`. The difference between
    them, as far as `srcbuild` is concerned, is only that in the `install_rom`
    phase, it builds the `rom_link` phony target in `C` components' makefiles,
    instead of the `install_rom` phony target.
    
    These phony targets differ slightly in requirements: `install_rom` uses
    `INSTDIR` where `rom_link` uses `LINKDIR`, but more significantly, `rom_link`
    is passed parameter `ADDRESS` to state where in the ROM the module resides.
    This addesss is not known at the time the `rom` phony target is made, so `C`
    components only produce a partially-linked binary at that stage, where `ASM`
    components have already produced a complete binary. (The reason for this
    difference is that while hand-written assembly modules use position-
    independent code, the output of the Norcroft compiler normally relies on
    run-time code modification to relocate absolute addresses - something that is
    not possible when running from ROM.)
    
    There are implementations of the `install_rom` and `rom_link` rules in the
    `AAsmModule` and `CModule` shared makefiles respectively, so `AAsmModule` is
    currently only used for `ASM` components and `CModule` is only used for `C`
    components. However, occasionally we have reason to change a component from
    using `AAsmModule` to `CModule`, usually for reasons unrelated to the use of
    absolute address relocations, because `CModule` is more flexible than
    `AAsmModule` in various other ways.
    
    This poses a problem for keeping `BuildSys` in step with the component in
    question, because whenever we change the shared makefile type in the
    component's makefile, we have to update the `ModuleDB` in lock step.
    
    The solution presented here is to ensure that at least one shared makefile
    supports both phony targets, so any component using it no longer cares how it
    is recorded in the `ModuleDB`. Adding `install_rom` to `CModule` was rejected,
    on the grounds that it would be too easy to accidentally build a ROM using it
    where the necessary relocations had been skipped at ROM link time. However,
    there are no drawbacks to adding `rom_link` to AAsmModule, because linking
    an object that has no relocations at any base address will always result in
    an identical binary that is safe to execute.
    
    Though the module itself requires no relocations, the symbols file
    traditionally output by `CModule` does contain absolute addresses which are
    useful for debugging, so a new link command is executed during `AAsmModule`'s
    `rom_link` rule in order to ensure this is kept up-to-date, even though the
    binary could otherwise have been re-used from the one generated in the `rom`
    rule.
    f9c01ed0
  • Ben Avison's avatar
    Change a few modules to `C` type · bccb299b
    Ben Avison authored
    These components have pending merge requests that mean they are likely to
    move to use the `CModule` shared makefile in the near future, which will
    require the use of their `rom_link` rule. However, due to the change to
    `AAsmModule` in the last commit, we can change their type now in anticipation.
    
    I'm not going further and change all `ASM` components en masse, because not
    all of them will yet have been converted to use `AAsmModule`. This is also
    the reason for not making the change in `srcbuild` itself.
    
    Version 7.49. Tagged as 'BuildSys-7_49'
    bccb299b
  • Ben Avison's avatar
    Extend `CApp` to support module-wrapped applications · 02c570ff
    Ben Avison authored
    This involves grafting in the `resources`, `rom` and `rom_link` rules from
    `CModule` (support for `CmdHelp` files is not copied across, because no
    module-wrapped application can provide star commands). Module-wrapped
    applications typically want to support `install INSTTYPE=app` in the same way
    as other applications, to permit a non-wrapped version to be built (for
    example, for debugging purposes).
    
    Because this feature is typically used with applications that use RISC_OSLib,
    the rules have been made slightly more sophisticated than those in CModule,
    in the sense that if `LIBS` contains `${RLIB}`, it automatically selects the
    larger ROM stubs and symbols files that include the RISC_OSLib library chunk,
    so there is no need to override these from the calling makefile.
    
    Compared to the `install` phase, where all resource files go into the
    application directory, for ROM builds, only a subset of files go there,
    the remainder being placed under `Resources:$.Resources`, and some of the
    files differ in contents from the `install` versions. The application
    directory resources in the ROM build case are (in a change from previous
    behaviour) all now registered with ResourceFS by the module-wrapped
    application rather than by the Messages module, and they are packaged using
    the `ResGen` tool. This means that you can kill (or unplug) the module and
    teh application will disappear from `Resources:$.Apps`.
    
    The resource files are categorised using the separate macros `INSTAPP_FILES`,
    `RES_FILES` and `RESAPP_FILES`.
    
    Requires RISC_OSLib-6_08.
    02c570ff
  • Ben Avison's avatar
    Define toolchain-agnostic warning suppression flags · a11503f7
    Ben Avison authored
    C_NOWARN_ASSIGNMENT_AS_CONDITION to suppress warnings about assignments within
    condition tests in `if` statements
    
    C_NOWARN_NON_ANSI_INCLUDES to suppress warnings about use of angle brackets
    for #include headers not defined by ISO/ANSI
    
    Version 7.50. Tagged as 'BuildSys-7_50'
    a11503f7
  • Robert Sprowson's avatar
    Build fix · ca85c288
    Robert Sprowson authored
    Edit-1_75's makefile invents trailing application name, remove it here.
    
    Version 7.50. Not tagged
    ca85c288
/ImageName/Version
/Logs/
/Shadow/
......@@ -66,6 +66,7 @@ PortableHAL
RTSupport
USBDriver
DWCDriver
XHCIDriver
VCHIQ
BCMSound
ScreenModes
......@@ -139,7 +140,7 @@ SDCMOS
ColourPicker
DrawFile
BootCommands
AUNMsgs
WindowScroll
MManager
Internet
Resolver
......@@ -149,9 +150,9 @@ Freeway
ShareFS
MimeMap
LanManFS -options OPTIONS=-DCHECK_ARMBOOT_EXISTS ROMSPRITES=TRUE
EtherGENET
EtherUSB
DHCP -options OPTIONS=-DMINIMUM_OPTIONS_LENGTH=4
AcornURI
Edit
Draw
Paint
......
......@@ -101,9 +101,12 @@ DebugLib -type EXP
# Bonus apps
#
Connector -options INSTDIR=<Install$Dir>.BonusBin.Utilities
GateWay -options INSTDIR=<Install$Dir>.BonusBin.Utilities.Econet
MailMan -options INSTDIR=<Install$Dir>.BonusBin.Utilities.Econet
FontEd -options INSTDIR=<Install$Dir>.BonusBin.Utilities.Developer
MakeModes -options INSTDIR=<Install$Dir>.BonusBin.Utilities.Developer
WinEdit -options INSTDIR=<Install$Dir>.BonusBin.Utilities.Developer
FormEd -options INSTDIR=<Install$Dir>.BonusBin.Utilities.Developer
ResEd -options INSTDIR=<Install$Dir>.BonusBin.Apps.DDE
ResTest -options INSTDIR=<Install$Dir>.BonusBin.Apps.DDE
ResCreate -options INSTDIR=<Install$Dir>.BonusBin.Apps.DDE
......@@ -114,6 +117,7 @@ SrcEdit -options INSTDIR=<Install$Dir>.BonusBin.Apps.DDE
#
DebugTools -options INSTDIR=<Install$Dir>.BonusBin.Modules.Developer
DebugButtn -options INSTDIR=<Install$Dir>.BonusBin.Modules.Developer
ZeroPain -options INSTDIR=<Install$Dir>.BonusBin.Modules.Developer
#
# Territory modules (the ReadMe comes from ABRelease)
......@@ -124,9 +128,12 @@ Denmark -options INSTDIR=<Install$Dir>.BonusBin.Modules.Territor
Finland -options INSTDIR=<Install$Dir>.BonusBin.Modules.Territories
France -options INSTDIR=<Install$Dir>.BonusBin.Modules.Territories
Germany -options INSTDIR=<Install$Dir>.BonusBin.Modules.Territories
Iceland -options INSTDIR=<Install$Dir>.BonusBin.Modules.Territories
Ireland -options INSTDIR=<Install$Dir>.BonusBin.Modules.Territories
Italy -options INSTDIR=<Install$Dir>.BonusBin.Modules.Territories
Netherlands -options INSTDIR=<Install$Dir>.BonusBin.Modules.Territories TARGET=Netherland
Norway -options INSTDIR=<Install$Dir>.BonusBin.Modules.Territories
Portugal -options INSTDIR=<Install$Dir>.BonusBin.Modules.Territories
SAfrica -options INSTDIR=<Install$Dir>.BonusBin.Modules.Territories
Spain -options INSTDIR=<Install$Dir>.BonusBin.Modules.Territories
Sweden -options INSTDIR=<Install$Dir>.BonusBin.Modules.Territories
......
......@@ -9,6 +9,20 @@
%JoinerFormat BigSplit
%sigstr Univ
#
# Fundamental components for header export...
#
Dialler -type EXP
FileSwitch -type EXP
#
# Internet and other networking libraries...
#
mbedTLS -type EXP
#
# Key libraries for Browse
#
zlib -type EXP
JSLib -type EXP
Fetchers -type EXP
......@@ -17,13 +31,21 @@ ImageLibPNG
ImageLibJPEG
ImageLib
NSPRLib -type EXP
AcornSSL -type EXP
#
# Modules which Browse depends upon
#
AcornSSL -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.Resources.!System.350.Modules.Network.URL
AcornURI -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.Resources.!System.310.Modules.Network
URL -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.Resources.!System.310.Modules.Network.URL
AcornHTTP -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.Resources.!System.310.Modules.Network.URL TARGET=HTTP
AcornHTTP -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.Resources.!System.310.Modules.Network.URL
FileFetcher -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.Resources.!System.310.Modules.Network.URL
FTP -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.Resources.!System.310.Modules.Network.URL
MimeMap -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.Resources.!System.310.Modules.Network.URL
#
# The application itself
#
Browse -options INSTDIR=<Install$Dir>.HardDisc4.Apps.!Browse SYSTEM=Ursula SUFFIX=ju TARGET=abs.!RIju
#Browse -options INSTDIR=<Install$Dir>.HardDisc4.Apps.!Phoenix SYSTEM=Phoenix SUFFIX=ju TARGET=abs.!RIju
#WebServe <- doesn't build ATM
#WebServe -options INSTDIR=<Install$Dir>.HardDisc4.Apps
......@@ -96,6 +96,7 @@ inetlib -type EXP # Lib.TCPIPLibs.inetlib
rpclib -type EXP # Lib.TCPIPLibs.rpclib.rpc
socklib -type EXP # Lib.TCPIPLibs.socklib
unixlib -type EXP # Lib.TCPIPLibs.unixlib
mbedTLS -type EXP # Lib.mbedTLS
#
# Toolbox libraries...
......@@ -126,6 +127,7 @@ PRISMLib -type EXP # Lib.PRISMLib
# Other header and library exports for the Universal build...
#
ConfigLib -type EXP # Lib.Configure
Dialler -type EXP # Networking.Modem.Dialler
KeyWatch -type EXP # Programmer.KeyWatch
RMVersion -type EXP # Programmer.RMVersion
SoundControl -type EXP # Audio.SoundCtrl
......@@ -180,10 +182,15 @@ RTSupport -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.Resources
AcornURI -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.Resources.!System.310.Modules.Network
NetI -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.Resources.!System.310.Modules.Network CMDHELP=None
NetTime -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.Resources.!System.360.Modules.Network
RouteD -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.Resources.!System.310.Modules.Network
PPP -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.Resources.!System.310.Modules.Network
RouteD -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.Resources.!System.310.Modules.Network CMDHELP=None
AcornHTTP -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.Resources.!System.310.Modules.Network.URL
AcornSSL -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.Resources.!System.350.Modules.Network.URL
URL -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.Resources.!System.310.Modules.Network.URL
ScreenFX -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.Resources.!System.360.Modules.Video
SharedCLibrary -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.Resources.!System.500.Modules
FrontEnd -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.Resources.!System.500.Modules
VideoOverlay -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.Resources.!System.500.Modules
ZLibMod -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.Resources.!System.310.Modules
# Screen savers
......@@ -247,6 +254,7 @@ SCSIFiler -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.RO510Hook
# AutoSense files for InetSetup
EtherCPSW -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.Resources.Configure.!InetSetup.AutoSense TARGET=AutoSense
EtherGENET -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.Resources.Configure.!InetSetup.AutoSense TARGET=AutoSense
EtherK -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.Resources.Configure.!InetSetup.AutoSense TARGET=AutoSense
EtherUSB -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.Resources.Configure.!InetSetup.AutoSense TARGET=AutoSense
EtherY -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.Resources.Configure.!InetSetup.AutoSense TARGET=AutoSense
......@@ -256,7 +264,7 @@ Alarm -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.RO350Hook
Chars -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.RO350Hook.Apps
CloseUp -options INSTDIR=<Install$Dir>.HardDisc4.Apps
Draw -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.RO350Hook.Apps.!Draw
Edit -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.RO350Hook.Apps.!Edit
Edit -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.RO350Hook.Apps
Help -options INSTDIR=<Install$Dir>.HardDisc4.!Boot.RO350Hook.Apps ROMTOKENS=350
Maestro -options INSTDIR=<Install$Dir>.HardDisc4.Apps TARGET=Maestro
OmniApp -options INSTDIR=<Install$Dir>.HardDisc4.Apps
......@@ -297,6 +305,7 @@ PDumperDM -options INSTDIR=<Install$Dir>.HardDisc4.Printing.!Print
PDumperE2 -options INSTDIR=<Install$Dir>.HardDisc4.Printing.!Printers.PDumpers
PDumperIW -options INSTDIR=<Install$Dir>.HardDisc4.Printing.!Printers.PDumpers
PDumperLJ -options INSTDIR=<Install$Dir>.HardDisc4.Printing.!Printers.PDumpers
PDumperPCL -options INSTDIR=<Install$Dir>.HardDisc4.Printing.!Printers.PDumpers
PDumperSpt -options INSTDIR=<Install$Dir>.HardDisc4.Printing.!Printers.Modules
RemotePrinterSupport -options INSTDIR=<Install$Dir>.HardDisc4.Printing.!Printers.Modules
......
......@@ -122,7 +122,7 @@ DOSFS -options PCMCIA=TRUE
ColourPicker
DrawFile
BootCommands
AUNMsgs
WindowScroll
MManager
Internet
Resolver
......
......@@ -38,7 +38,7 @@ MakePSFont -type EXP
# Kernel is first module in ROM seen as the UtilityModule
HAL_OMAP3
Kernel -at 0xFC018000 -options ASFLAGS="-PD \"CMOS_Override SETS \\\"= FileLangCMOS,fsnumber_SCSIFS,CDROMFSCMOS,&C0\\\"\""
Kernel -at 0xFC010000 -options ASFLAGS="-PD \"CMOS_Override SETS \\\"= FileLangCMOS,fsnumber_SCSIFS,CDROMFSCMOS,&C0\\\"\""
Podule -type EXP
PCI
FileSwitch
......@@ -137,7 +137,7 @@ SDCMOS
ColourPicker
DrawFile
BootCommands
AUNMsgs
WindowScroll
MManager
Internet
Resolver
......
......@@ -134,7 +134,7 @@ SDCMOS
ColourPicker
DrawFile
BootCommands
AUNMsgs
WindowScroll
MManager
Internet
Resolver
......
......@@ -32,6 +32,7 @@ Econet -type EXP
DDT -type EXP
HostFS -type EXP
SCSIDriver -type EXP
Podule -type EXP
PCCardFS -type EXP
PDriver -type EXP
PDumperDM -type EXP
......@@ -39,8 +40,7 @@ MakePSFont -type EXP
# Kernel is first module in ROM seen as the UtilityModule
HAL_OMAP5
Kernel -at 0xFC010000 -options ASFLAGS="-PD \"CMOS_Override SETS \\\"= FileLangCMOS,fsnumber_SCSIFS,CDROMFSCMOS,&C0\\\"\""
Podule -type EXP
Kernel -at 0xFC010000 -options ASFLAGS="-PD \"CMOS_Override SETS \\\"= FileLangCMOS,fsnumber_adfs,CDROMFSCMOS,&C0\\\"\""
PCI
FileSwitch
ResourceFS
......@@ -76,7 +76,9 @@ DragAnObj
DrawMod
BBCEconet
FileCore
ADFS -type EXP
SATADriver
ADFS4
ADFSFiler
RamFS
Filer
FilerSWIs
......@@ -137,7 +139,7 @@ SDCMOS
ColourPicker
DrawFile
BootCommands
AUNMsgs
WindowScroll
MManager
Internet
Resolver
......@@ -181,12 +183,14 @@ Gadgets
# CDFS
#
CDFSDriver
ATAPI
CDFSSoftSCSI
CDFS
CDFSFiler
UnSqzAIF
InetRes -options TYPE=EmergencyUtils
GPIO
# some libraries and bits
#
......
......@@ -94,6 +94,7 @@ DeskLib -type EXP
ModMallocLib -type EXP
PlainArgvLib -type EXP
RemoteDebug -type EXP
RMVersion -type EXP
PDebug -type EXP
DDTLib -type EXP
Wild -type EXP
......@@ -115,6 +116,7 @@ FilterManager -options INSTDIR=<Install$Dir>.System.!System.310.Module
FrontEnd -options INSTDIR=<Install$Dir>.System.!System.310.Modules
ColourPicker -options INSTDIR=<Install$Dir>.System.!System.310.Modules OPTIONS="-DNO_INTERNATIONAL_HELP"
DrawFile -options INSTDIR=<Install$Dir>.System.!System.310.Modules CMDHELP=None
FilerUtils -options INSTDIR=<Install$Dir>.System.!System.310.Modules
Freeway -options INSTDIR=<Install$Dir>.System.!System.310.Modules.Network CMDHELP=None
Internet -options INSTDIR=<Install$Dir>.System.!System.310.Modules.Network CMDHELP=None
MimeMap -options INSTDIR=<Install$Dir>.System.!System.310.Modules.Network CMDHELP=None
......@@ -123,6 +125,7 @@ NetFS -options INSTDIR=<Install$Dir>.System.!System.310.Module
NetFiler -options INSTDIR=<Install$Dir>.System.!System.310.Modules.Network CMDHELP=None
NetPrint -options INSTDIR=<Install$Dir>.System.!System.310.Modules.Network CMDHELP=None
NetStatus -options INSTDIR=<Install$Dir>.System.!System.310.Modules.Network
NetUtils -options INSTDIR=<Install$Dir>.System.!System.310.Modules.Network
ITable -options INSTDIR=<Install$Dir>.System.!System.350.Modules
UnSqzAIF -options INSTDIR=<Install$Dir>.System.!System.370.Modules
PatchApp -options INSTDIR=<Install$Dir>.System.!System.370.Modules
......@@ -142,6 +145,8 @@ BASIC64 -options INSTDIR=<Install$Dir>.System.!System.310.Module
DragASprite -options INSTDIR=<Install$Dir>.System.!System.310.Modules
DragAnObj -options INSTDIR=<Install$Dir>.System.!System.310.Modules
RedrawManager -options INSTDIR=<Install$Dir>.System.!System.310.Modules
Resolver -options INSTDIR=<Install$Dir>.System.!System.310.Modules.Network
ShareFS -options INSTDIR=<Install$Dir>.System.!System.310.Modules.Network
# There is no technical need for SharedSnd to be built for MACHINE=All.
# However building for All has benefits for users of old versions of RISC OS 5
......
......@@ -133,7 +133,7 @@ SDFSFiler -options ASFLAGS="-PD \"SDFS SETL {TRUE}\"" TEMPLATES=yes
ColourPicker
DrawFile
BootCommands
AUNMsgs
WindowScroll
MManager
Internet
Resolver
......
......@@ -129,7 +129,7 @@ SCSIFiler -options ASFLAGS="-PD \"SCSI SETL {TRUE}\"" TEMPLATES=no
ColourPicker
DrawFile
BootCommands
AUNMsgs
WindowScroll
MManager
Internet
Resolver
......
......@@ -37,7 +37,7 @@ MakePSFont -type EXP
# kernel is first module in ROM seen as the UtilityModule
HAL_iMx6
Kernel -at 0xFC020000 -options ASFLAGS="-PD \"EnforceSCSI4 SETL {TRUE}\""
Kernel -at 0xFC018000 -options ASFLAGS="-PD \"CMOS_Override SETS \\\"= FileLangCMOS,fsnumber_SCSIFS,SCSIFSDrivesCMOS,&20\\\"\""
Podule -type EXP
PCI
FileSwitch
......@@ -144,7 +144,7 @@ SPIDriver
#NetUtils
RTC
BootCommands
AUNMsgs
WindowScroll
MManager
Internet
Resolver
......
......@@ -8,7 +8,7 @@ INCLUDED_AASMMODULE = YES
#
# This makefile provides the following phony targets:
#
# all rom install_rom resources
# all rom install_rom rom_link resources
# export export_libs export_hdrs standalone install
# clean debug gpa_debug
#
......@@ -49,7 +49,7 @@ INCLUDED_AASMMODULE = YES
# CUSTOMSA (opt) (set to "custom" to override the standalone rules)
# CUSTOMDBG (opt) (set to "custom" to override the debug rules)
# CUSTOMGPA (opt) (set to "custom" to override the GPA rules)
# SOURCES_TO_LINK (opt) (files which need be linked to by the link farm, in addition to contents of hdr and s directories)
# SOURCES_TO_SYMLINK opt) (files which need be linked to by the link farm, in addition to contents of hdr and s directories)
#
#
# It relies on the following from the build system:
......@@ -79,14 +79,14 @@ INCLUDED_AASMMODULE = YES
TARGET ?= ${COMPONENT}
INSTDIR ?= ${INSTALLDIR}
ROM_MODULE ?= ${TARGET}
ROM_MODULE ?= ${TARGET}${SUFFIX_MODULE}
ROM_SOURCE ?= ${TARGET}.s
ROM_OBJECT ?= ${TARGET}.o
DIRS ?= _dirs
EXP_HDR ?= ${EXPORTDIR}
C_EXP_HDR ?= ${CEXPORTDIR}/Interface
SA_MODULE ?= ${TARGET}SA
SA_MODULE ?= ${TARGET}SA${SUFFIX_MODULE}
SA_OBJECT ?= ${TARGET}SA.o
INSTRAM_FILES ?= ${INSTRES_FILES}
INSTRAM_DEPENDS ?= ${INSTRES_DEPENDS}
......@@ -103,7 +103,7 @@ SA_FLAGS ?= -PD "standalone SETL {TRUE}" -PD "MergedMsgs SETS \"${MERGEDMSGS}\
endif
SA_LIBS ?= ${ROM_LIBS}
DBG_MODULE ?= ${TARGET}D
DBG_MODULE ?= ${TARGET}D${SUFFIX_MODULE}
DBG_OBJECT ?= ${TARGET}D.o
DBG_LIBS ?= ${ROM_LIBS}
......@@ -143,10 +143,15 @@ clean::
@rm -rf objs
@echo ${COMPONENT}: cleaned
else
all debug export export_hdrs export_libs gpa_debug install install_rom links resources rom standalone: ${SYMLINK_DEPEND}
ifneq (,${SYMLINK_EXT_FIRST})
SYMLINK_SED_PATTERN = 's,^\([^/]*\)/\(.*\),\2.\1,'
else
SYMLINK_SED_PATTERN = 's,\([^/]*\)/\([^/]*\)$$,\2.\1,'
endif
all debug export export_hdrs export_libs gpa_debug install install_rom rom_link links resources rom standalone: ${SYMLINK_DEPEND}
$(foreach linksource,${SOURCES_TO_SYMLINK}, \
$(shell \
linkdest=`echo ${linksource} | sed -e 's,\([^/]*\)/\([^/]*\)$$,\2.\1,' -e 's,^,objs/,'`; \
linkdest=`echo ${linksource} | sed -e ${SYMLINK_SED_PATTERN} -e 's,^,objs/,'`; \
linkdestdir=`echo $$linkdest | sed -e 's,/[^/]*$$,,'`; \
linkbackpath=`echo $$linkdestdir | sed -e 's,[^/]*,..,g'`; \
[ -d ${linksource} ] || [ -L $$linkdest ] || mkdir -p $$linkdestdir; \
......@@ -170,7 +175,12 @@ endif
all: rom debug standalone
${DIRS} ::
# GNU make seems to treat any double-colon rule with no dependencies as
# always out-of-date, therefore always rebuilds it and anything which in turn
# depends on the target of the double-colon rule. So use a single-colon rule
# instead. If any cross builds need to create extra directories on a
# per-component basis, we'll cross that bridge when we get to it.
${DIRS}:
${TOUCH} $@
#
......@@ -184,10 +194,22 @@ install_rom${CUSTOMROM}: ${ROM_MODULE}
#${CP} ${ROM_MODULE}_gpa ${INSTDIR}/${TARGET}_gpa ${CPFLAGS}
@${ECHO} ${COMPONENT}: rom module installed
rom_link${CUSTOMROM}: ${ROM_MODULE}
ifeq (GNU,${TOOLCHAIN})
${CP} ${ROM_MODULE} ${LINKDIR}/${TARGET} ${CPFLAGS}
else
${LD} -rmf -o ${LINKDIR}/${TARGET} ${ROM_OBJECT} ${ROM_LIBS} -Symbols ${LINKDIR}/${TARGET}_sym -base ${ADDRESS}
endif
@${ECHO} ${COMPONENT}: rom_link complete
${ROM_MODULE}: ${ROM_DEPEND} ${DIRS} ${ROM_LIBS} ${ROM_OBJECT}
ifeq (GNU,${TOOLCHAIN})
${LDBIN} $@ ${ROM_OBJECT} ${ROM_LIBS}
else
${LD} -rmf -o $@ ${ROM_OBJECT} ${ROM_LIBS}
#${LD} -aif -bin -d -Entry 0 -o ${ROM_MODULE}_aif ${ROM_OBJECT} ${ROM_LIBS}
#${TOGPA} -s ${ROM_MODULE}_aif ${ROM_MODULE}_gpa
endif
${ROM_OBJECT}: ${DIRS} ${TOKHELPSRC} ${ROM_SOURCE}
${AS} ${ASFLAGS} -depend $(subst .o,.d,$@) -g -o $@ ${ROM_SOURCE}
......@@ -199,7 +221,11 @@ standalone${CUSTOMSA}: ${SA_MODULE}
@${ECHO} ${COMPONENT}: standalone module built
${SA_MODULE}: ${SA_DEPEND} ${DIRS} ${SA_LIBS} ${SA_OBJECT}
ifeq (GNU,${TOOLCHAIN})
${LDBIN} $@ ${SA_OBJECT} ${SA_LIBS}
else
${LD} -rmf -o $@ ${SA_OBJECT} ${SA_LIBS}
endif
${MODSQZ} -f ${MODSQZFLAGS} $@
${SA_OBJECT}: ${DIRS} ${TOKHELPSRC} ${MERGEDMSGS} ${ROM_SOURCE}
......@@ -208,11 +234,12 @@ ${SA_OBJECT}: ${DIRS} ${TOKHELPSRC} ${MERGEDMSGS} ${ROM_SOURCE}
ifeq ($(filter no custom,${CUSTOMRES}),)
${MERGEDMSGS}:
${MKDIR} ${MERGEDRDIR}/tmp
${TOUCH} ${MERGEDMDIR}/tmp/Messages
${TOUCH} ${MERGEDMDIR}/tmp/CmdHelp
${INSTRES} -I Resources.${USERIF}.${LOCALE},Resources.${USERIF}.UK,Resources.${LOCALE},Resources.UK,Resources ${MERGEDMDIR} [Messages] [CmdHelp]
${CAT} ${MERGEDMDIR}/tmp/Messages ${MERGEDMDIR}/tmp/CmdHelp > $@
${WIPE} ${MERGEDMDIR}/tmp
${MKDIR} ${MERGEDRDIR}/${TARGET}
${TOUCH} ${MERGEDRDIR}/tmp/Messages
${TOUCH} ${MERGEDRDIR}/tmp/CmdHelp
${INSTRES} -I Resources.${USERIF}.${LOCALE},Resources.${USERIF}.UK,Resources.${LOCALE},Resources.UK,Resources ${MERGEDRDIR} [Messages] [CmdHelp]
${CAT} ${MERGEDRDIR}/tmp/Messages ${MERGEDRDIR}/tmp/CmdHelp > $@
${WIPE} ${MERGEDRDIR}/tmp
else
${MERGEDMSGS}::
@${NOP}
......@@ -227,7 +254,11 @@ debug${CUSTOMDBG}: ${DBG_MODULE}
@${ECHO} ${COMPONENT}: standalone debug module built
${DBG_MODULE}: ${DBG_OBJECT} ${DBG_LIBS} ${DIRS} ${SA_DEPEND}
ifeq (GNU,${TOOLCHAIN})
${LDBIN} $@ ${DBG_OBJECT} ${DBG_LIBS}
else
${LD} -rmf -o $@ ${DBG_OBJECT} ${DBG_LIBS}
endif
${DBG_OBJECT}: ${ROM_SOURCE} ${MERGEDMSGS} ${TOKHELPSRC} ${DIRS}
${AS} ${ASFLAGS} ${ASDFLAGS} -g -pd "debugging SETL {TRUE}" -depend $(subst .o,.d,$@) -o $@ ${ROM_SOURCE} ${SA_FLAGS}
......@@ -252,6 +283,32 @@ export_hdrs: ${EXPORTS}
@if [ -e ${HEADER2}.hdr ]; then ${CP} ${HEADER2}.hdr ${EXP_HDR}/${HEADER2} ${CPFLAGS}; fi
@if [ -e ${HEADER3}.hdr ]; then ${ECHO} ${CP} ${HEADER3}.hdr ${EXP_HDR}/${HEADER3} ${CPFLAGS}; fi
@if [ -e ${HEADER3}.hdr ]; then ${CP} ${HEADER3}.hdr ${EXP_HDR}/${HEADER3} ${CPFLAGS}; fi
@if [ -e ${HEADER4}.hdr ]; then ${ECHO} ${CP} ${HEADER4}.hdr ${EXP_HDR}/${HEADER4} ${CPFLAGS}; fi
@if [ -e ${HEADER4}.hdr ]; then ${CP} ${HEADER4}.hdr ${EXP_HDR}/${HEADER4} ${CPFLAGS}; fi
@if [ -e ${HEADER5}.hdr ]; then ${ECHO} ${CP} ${HEADER5}.hdr ${EXP_HDR}/${HEADER5} ${CPFLAGS}; fi
@if [ -e ${HEADER5}.hdr ]; then ${CP} ${HEADER5}.hdr ${EXP_HDR}/${HEADER5} ${CPFLAGS}; fi
@if [ -e ${HEADER6}.hdr ]; then ${ECHO} ${CP} ${HEADER6}.hdr ${EXP_HDR}/${HEADER6} ${CPFLAGS}; fi
@if [ -e ${HEADER6}.hdr ]; then ${CP} ${HEADER6}.hdr ${EXP_HDR}/${HEADER6} ${CPFLAGS}; fi
@if [ -e ${HEADER7}.hdr ]; then ${ECHO} ${CP} ${HEADER7}.hdr ${EXP_HDR}/${HEADER7} ${CPFLAGS}; fi
@if [ -e ${HEADER7}.hdr ]; then ${CP} ${HEADER7}.hdr ${EXP_HDR}/${HEADER7} ${CPFLAGS}; fi
@if [ -e ${HEADER8}.hdr ]; then ${ECHO} ${CP} ${HEADER8}.hdr ${EXP_HDR}/${HEADER8} ${CPFLAGS}; fi
@if [ -e ${HEADER8}.hdr ]; then ${CP} ${HEADER8}.hdr ${EXP_HDR}/${HEADER8} ${CPFLAGS}; fi
@if [ -e ${HEADER9}.hdr ]; then ${ECHO} ${CP} ${HEADER9}.hdr ${EXP_HDR}/${HEADER9} ${CPFLAGS}; fi
@if [ -e ${HEADER9}.hdr ]; then ${CP} ${HEADER9}.hdr ${EXP_HDR}/${HEADER9} ${CPFLAGS}; fi
@if [ -e ${HEADER10}.hdr ]; then ${ECHO} ${CP} ${HEADER10}.hdr ${EXP_HDR}/${HEADER10} ${CPFLAGS}; fi
@if [ -e ${HEADER10}.hdr ]; then ${CP} ${HEADER10}.hdr ${EXP_HDR}/${HEADER10} ${CPFLAGS}; fi
@if [ -e ${HEADER11}.hdr ]; then ${ECHO} ${CP} ${HEADER11}.hdr ${EXP_HDR}/${HEADER11} ${CPFLAGS}; fi
@if [ -e ${HEADER11}.hdr ]; then ${CP} ${HEADER11}.hdr ${EXP_HDR}/${HEADER11} ${CPFLAGS}; fi
@if [ -e ${HEADER12}.hdr ]; then ${ECHO} ${CP} ${HEADER12}.hdr ${EXP_HDR}/${HEADER12} ${CPFLAGS}; fi
@if [ -e ${HEADER12}.hdr ]; then ${CP} ${HEADER12}.hdr ${EXP_HDR}/${HEADER12} ${CPFLAGS}; fi
@if [ -e ${HEADER13}.hdr ]; then ${ECHO} ${CP} ${HEADER13}.hdr ${EXP_HDR}/${HEADER13} ${CPFLAGS}; fi
@if [ -e ${HEADER13}.hdr ]; then ${CP} ${HEADER13}.hdr ${EXP_HDR}/${HEADER13} ${CPFLAGS}; fi
@if [ -e ${HEADER14}.hdr ]; then ${ECHO} ${CP} ${HEADER14}.hdr ${EXP_HDR}/${HEADER14} ${CPFLAGS}; fi
@if [ -e ${HEADER14}.hdr ]; then ${CP} ${HEADER14}.hdr ${EXP_HDR}/${HEADER14} ${CPFLAGS}; fi
@if [ -e ${HEADER15}.hdr ]; then ${ECHO} ${CP} ${HEADER15}.hdr ${EXP_HDR}/${HEADER15} ${CPFLAGS}; fi
@if [ -e ${HEADER15}.hdr ]; then ${CP} ${HEADER15}.hdr ${EXP_HDR}/${HEADER15} ${CPFLAGS}; fi
@if [ -e ${HEADER16}.hdr ]; then ${ECHO} ${CP} ${HEADER16}.hdr ${EXP_HDR}/${HEADER16} ${CPFLAGS}; fi
@if [ -e ${HEADER16}.hdr ]; then ${CP} ${HEADER16}.hdr ${EXP_HDR}/${HEADER16} ${CPFLAGS}; fi
@${ECHO} ${COMPONENT}: header export complete
export_libs:
......@@ -267,26 +324,46 @@ export_:: export_hdrs export_libs
ASMCHEADER1 ?= _!_x_!_
ASMCHEADER2 ?= _!_x_!_
ASMCHEADER3 ?= _!_x_!_
ASMCHEADER4 ?= _!_x_!_
ASMCHEADER5 ?= _!_x_!_
ASMCHEADER6 ?= _!_x_!_
ASMCHEADER7 ?= _!_x_!_
ASMCHEADER8 ?= _!_x_!_
CHEADER1 ?= _!_x_!_
CHEADER2 ?= _!_x_!_
CHEADER3 ?= _!_x_!_
${C_EXP_HDR}/${ASMCHEADER1} :: ${ASMCHEADER1}.hdr
${C_EXP_HDR}/${ASMCHEADER1}.h :: ${ASMCHEADER1}.hdr
${HDR2H} ${ASMCHEADER1}.hdr $@
${C_EXP_HDR}/${ASMCHEADER2} :: ${ASMCHEADER2}.hdr
${C_EXP_HDR}/${ASMCHEADER2}.h :: ${ASMCHEADER2}.hdr
${HDR2H} ${ASMCHEADER2}.hdr $@
${C_EXP_HDR}.${ASMCHEADER3} :: ${ASMCHEADER3}.hdr
${C_EXP_HDR}/${ASMCHEADER3}.h :: ${ASMCHEADER3}.hdr
${HDR2H} ${ASMCHEADER3}.hdr $@
${C_EXP_HDR}.${CHEADER1}.h :: ${CHEADER1}.h
${C_EXP_HDR}/${ASMCHEADER4}.h :: ${ASMCHEADER4}.hdr
${HDR2H} ${ASMCHEADER4}.hdr $@
${C_EXP_HDR}/${ASMCHEADER5}.h :: ${ASMCHEADER5}.hdr
${HDR2H} ${ASMCHEADER5}.hdr $@
${C_EXP_HDR}/${ASMCHEADER6}.h :: ${ASMCHEADER6}.hdr
${HDR2H} ${ASMCHEADER6}.hdr $@
${C_EXP_HDR}/${ASMCHEADER7}.h :: ${ASMCHEADER7}.hdr
${HDR2H} ${ASMCHEADER7}.hdr $@
${C_EXP_HDR}/${ASMCHEADER8}.h :: ${ASMCHEADER8}.hdr
${HDR2H} ${ASMCHEADER8}.hdr $@
${C_EXP_HDR}/${CHEADER1}.h :: ${CHEADER1}.h
${CP} ${CHEADER1}.h $@ ${CPFLAGS}
${C_EXP_HDR}.${CHEADER2}.h :: ${CHEADER2}.h
${C_EXP_HDR}/${CHEADER2}.h :: ${CHEADER2}.h
${CP} ${CHEADER2}.h $@ ${CPFLAGS}
${C_EXP_HDR}.${CHEADER3}.h :: ${CHEADER3}.h
${C_EXP_HDR}/${CHEADER3}.h :: ${CHEADER3}.h
${CP} ${CHEADER3}.h $@ ${CPFLAGS}
#
......@@ -308,6 +385,7 @@ ifneq (,$(filter Messages,${INSTRES_VERSION}))
${INSERTVERSION} ${RESFSDIR}/Messages > ${RESFSDIR}/_Awk_
${CP} ${RESFSDIR}/_Awk_ ${RESFSDIR}/Messages ${CPFLAGS}
${RM} ${RESFSDIR}/_Awk_
for path in ${USERIF}/${LOCALE} ${USERIF}/UK ${LOCALE} UK ""; do if [ -f Resources/$$path/Messages ]; then touch -r Resources/$$path/Messages ${RESFSDIR}/Messages; break; fi; done
endif
@${NOP}
......
......@@ -66,8 +66,13 @@ TGRLIB = ${LIBDIR}/TGRLib/tgrlib.a
TRACELIB = ${LIBDIR}/Trace/Trace.a
UNICODELIB = ${LIBDIR}/Unicode/ucode.a
WILDLIB = ${LIBDIR}/Wild/Wild.a
ZLIB = ${LIBDIR}/zlib/zlib.a
DEBUGLIB = ${LIBDIR}/DebugLib/DebugLib.a
DEBUGLIBS = # ${DEBUGLIB} ${REMOTEDBLIB} ${TRACELIB} ${PDEBUGLIB} ${MODMALLOCLIB} ${WILDLIB} ${DDTLIB} ${DESKLIB}
# Library include paths, where these can't easily be specified explicitly
# If this list gets too long, it may be worth de-duplicating the definitions in AppLibs
INCLUDE_OSLIB = -I${LIBDIR}/OSLib/Core,${LIBDIR}/OSLib/Computer,${LIBDIR}/OSLib/User,${LIBDIR}/OSLib/Toolbox,{LIBDIR}/OSLib/Core/oslib,${LIBDIR}/OSLib/Computer/oslib,${LIBDIR}/OSLib/User/oslib,${LIBDIR}/OSLib/Toolbox/oslib
# EOF
......@@ -5,7 +5,7 @@ INCLUDED_CAPP = YES
#
# This makefile provides the following phony targets:
#
# all install debug
# all install debug resources rom rom_link
#
#
# This fragment uses the following macros set by the master makefile.
......@@ -14,25 +14,36 @@ INCLUDED_CAPP = YES
# COMPONENT (the name of the component)
# TARGET (opt) (the leafname of the application - otherwise ${COMPONENT})
# DBG_TARGET (opt) (debug application leafname - otherwise ${TARGET}-D)
# ROM_TARGET (opt) (partially linked module-wrapped leafname - otherwise ${TARGET}.aof)
# LNK_TARGET (opt) (fixed-position module-wrapped leafname - otherwise ${TARGET}.linked)
# INSTAPP (opt) (the application target directory - otherwise ${INSTDIR}/!${COMPONENT})
# INSTDIR (opt) (the target directory - otherwise ${INSTALLDIR}/${TARGET})
# RESFSDIR (opt) (actual directory to export non-application-dir resources to - otherwise ${RESDIR}/${COMPONENT})
# RESFSAPPDIR (opt) (where to register application-dir resources to within ResourceFS, using RISC OS style directory separators - otherwise Apps.!${COMPONENT})
# DIRS (opt) (stamp object for directory creation - otherwise _dirs)
# OBJS (opt) (object files, no o. prefixes - otherwise ${TARGET})
# APP_OBJS (opt) (release build object files, no prefixes - otherwise ${OBJS})
# DBG_OBJS (opt) (debug build object files, no prefixes - otherwise ${OBJS})
# ROM_OBJS (opt) (ROM module-wrap build objects - otherwise ${OBJS} plus modulewrap and ${RES_OBJ})
# LIBS (opt) (extra libraries; ${CLIB} is always used)
# APP_LIBS (opt) (extra release libraries - otherwise ${LIBS}; ${CLIB} is always used)
# DBG_LIBS (opt) (extra debug libraries - otherwise ${LIBS}; ${CLIB} and ${DEBUGLIBS} always used)
# ROM_LIBS (opt) (libraries to link for ROM module-wrap targets - otherwise ${LIBS}; ${ROMSTUBS} or ${ROMCSTUBS} is always used, depending on whether ${LIBS} contains ${RLIB} or not)
# WRAPPER (opt) (module-wrap source file to use - defaults to $LIBDIR/RISC_OSLib/modulewrap.s)
# ROM_DEPEND (opt) (any extra dependency to assert on ROM_TARGET)
# LINK_TYPE (opt) (variant of linking command, eg C++ - defaults to C)
# INSTTYPE (opt) (use "tool" or "app" to install executable vs application - defaults to "tool")
# INSTAPP_FILES (opt) (list of files to be installed in application directory - use InstRes specification rules)
# INSTAPP_DEPENDS (opt) (list of dependencies to be satisfied before doing application install - ${TARGET} assumed if in INSTAPP_FILES)
# INSTAPP_VERSION (opt) (list of Messages/!Run/Desc files to insert app version from VersionNum - include in INSTAPP_FILES as well)
# RES_FILES (opt) (list of files to be installed in ${RESFSDIR} when building a module-wrap ROM - use InstRes specification rules. Where these conflict with the files in INSTAPP_FILES, prefer a subdirectory named 'ROM')
# RESAPP_FILES (opt) (list of files to be installed in ${RESFSAPPDIR} when building a module-wrap ROM - use InstRes specification rules. Where these conflict with the files in INSTAPP_FILES, prefer a subdirectory named 'ROM')
# CUSTOMLINK (opt) (set to "custom" to override the link rule)
# CUSTOMINSTALLAPP (opt) (set to "custom" to override the install rule for resource files)
# CUSTOMINSTALLTOOL (opt) (set to "custom" to override the install rule for target binary)
# CUSTOMINSTALLDBGAPP (opt) (set to "custom" to override the install rule for debug resources)
# SOURCES_TO_LINK (opt) (files which need be linked to by the link farm, in addition to contents of c and h directories)
# CUSTOMROM (opt) (set to "custom" to override the rom module-wrap rules)
# SOURCES_TO_SYMLINK (opt) (files which need be linked to by the link farm, in addition to contents of c and h directories)
#
#
# It relies on the following generic tool macros from the StdTools makefile
......@@ -67,24 +78,44 @@ INCLUDED_CAPP = YES
TARGET ?= ${COMPONENT}
DBG_TARGET ?= ${TARGET}-D
ROM_TARGET ?= ${TARGET}
LNK_TARGET ?= ${TARGET}
INSTDIR ?= ${INSTALLDIR}/${TARGET}
INSTAPP ?= ${INSTDIR}/!${COMPONENT}
RESFSDIR ?= ${RESDIR}/${COMPONENT}
RESFSAPPDIR ?= Apps.!${COMPONENT}
MERGEDRDIR ?= _ResData_
RES_AREA ?= Resources
RES_OBJ ?= resources
DIRS ?= _dirs
OBJS ?= ${TARGET}
APP_OBJS ?= ${OBJS}
DBG_OBJS ?= ${OBJS}
ROM_OBJS ?= ${OBJS} modulewrap ${RES_OBJ}
APP_LIBS ?= ${LIBS}
DBG_LIBS ?= ${LIBS}
DBG_LIBS += ${DEBUGLIBS}
ROM_LIBS ?= ${LIBS}
ifeq (C++,${LINK_TYPE})
APP_LIBS += ${C++LIB}
DBG_LIBS += ${C++LIB}
ROM_LIBS += ${C++LIB}
endif
APP_LIBS += ${CLIB}
DBG_LIBS += ${CLIB}
ifeq ($(filter ${RLIB},${ROM_LIBS}),)
ROM_LIBS_ = $(filter-out ${RLIB},${ROM_LIBS})
ROM_LIBS_ += ${ROMSTUBS}
ROM_SYMS = ${ABSSYM}
else
ROM_LIBS_ = ${ROM_LIBS} ${ROMCSTUBS}
ROM_SYMS = ${C_ABSSYM}
endif
WRAPPER ?= ${LIBDIR}/RISC_OSLib/modulewrap.s
APP_OBJS_ = $(addsuffix .o,${APP_OBJS})
DBG_OBJS_ = $(addsuffix .od,${DBG_OBJS})
ROM_OBJS_ = $(addsuffix .oz,${ROM_OBJS})
SOURCES_TO_SYMLINK += $(wildcard c/*) $(wildcard c++/*) $(wildcard h/*) $(wildcard s/*) VersionNum VersionASM
......@@ -107,7 +138,7 @@ clean::
@rm -rf objs
@echo ${COMPONENT}: cleaned
else
all install debug links: ${SYMLINK_DEPEND}
all install debug resources rom rom_link links: ${SYMLINK_DEPEND}
$(foreach linksource,${SOURCES_TO_SYMLINK}, \
$(shell \
linkdest=`echo ${linksource} | sed -e 's,\([^/]*\)/\([^/]*\)$$,\2.\1,' -e 's,^,objs/,'`; \
......@@ -133,9 +164,16 @@ ifeq ("${INCLUDED_HOSTTOOLS}","")
include StdTools
endif
endif
ifeq ($(filter rom%,${MAKECMDGOALS}),)
ifeq ("${INCLUDED_APPLIBS}","")
include AppLibs
endif
else
ifeq ("${INCLUDED_MODULELIBS}","")
include ModuleLibs
endif
endif
ifeq ("${INCLUDED_APPSTDRULE}","")
include AppStdRule
......@@ -147,7 +185,12 @@ endif
all: ${TARGET}${SUFFIX_ABSOLUTE}
@${ECHO} ${COMPONENT}: application built
${DIRS}::
# GNU make seems to treat any double-colon rule with no dependencies as
# always out-of-date, therefore always rebuilds it and anything which in turn
# depends on the target of the double-colon rule. So use a single-colon rule
# instead. If any cross builds need to create extra directories on a
# per-component basis, we'll cross that bridge when we get to it.
${DIRS}:
${TOUCH} $@
install: install_${INSTTYPE}
......@@ -182,6 +225,27 @@ install_tool${CUSTOMINSTALLTOOL}: ${TARGET}${SUFFIX_ABSOLUTE}
debug: ${DBG_TARGET}${SUFFIX_DEBIMAGE}
@${ECHO} ${COMPONENT}: debug application built
resources:
${MKDIR} ${RESFSDIR}
ifneq (${RES_FILES},)
${INSTRES} -I Resources.${LOCALE}.ROM,Resources.UK.ROM,Resources.ROM,Resources.{LOCALE},Resources.UK,Resources ${RESFSDIR} ${RES_FILES}
endif
ifneq (,$(filter Messages,${INSTAPP_VERSION}))
${INSERTVERSION} ${RESFSDIR}/Messages > ${RESFSDIR}/_Awk_
${CP} ${RESFSDIR}/_Awk_ ${RESFSDIR}/Messages ${CPFLAGS}
${RM} ${RESFSDIR}/_Awk_
for path in ${LOCALE}/ROM UK/ROM ROM ${LOCALE} UK ""; do if [ -f Resources/$$path/Messages ]; then touch -r Resources/$$path/Messages ${RESFSDIR}/Messages; break; fi; done
endif
@${ECHO} ${COMPONENT}: resources copied to Messages module
rom${CUSTOMROM}: ${ROM_TARGET}.aof
@${ECHO} ${COMPONENT}: rom module built
rom_link${CUSTOMROM}: ${LNK_TARGET}.linked
${CP} ${LNK_TARGET}.linked ${LINKDIR}/${COMPONENT} ${CPFLAGS}
${CP} ${LNK_TARGET}_sym.linked ${LINKDIR}/${COMPONENT}_sym ${CPFLAGS}
@${ECHO} ${COMPONENT}: rom_link complete
${TARGET}${SUFFIX_ABSOLUTE}${CUSTOMLINK}: ${DIRS} ${APP_OBJS_} ${APP_LIBS}
${LD} ${LDFLAGS} -o $@ ${APP_OBJS_} ${APP_LIBS}
${STRIP} $@
......@@ -190,6 +254,21 @@ ${TARGET}${SUFFIX_ABSOLUTE}${CUSTOMLINK}: ${DIRS} ${APP_OBJS_} ${APP_LIBS}
${DBG_TARGET}${SUFFIX_DEBIMAGE}${CUSTOMLINK}: ${DIRS} ${DBG_OBJS_} ${DBG_LIBS}
${LD} ${LDFLAGS} ${LDDFLAGS} -o $@ ${DBG_OBJS_} ${DBG_LIBS}
${ROM_TARGET}.aof: ${ROM_OBJS_} ${ROM_LIBS_} ${DIRS} ${ROM_DEPEND}
${LD} -o $@ -aof ${ROM_OBJS_} ${ROM_LIBS_}
${LNK_TARGET}.linked: ${ROM_TARGET}.aof ${ROM_SYMS} ${FORCEROMLINK}
${LD} ${LDFLAGS} ${LDLINKFLAGS} -o $@ -rmf -base ${ADDRESS} ${ROM_TARGET}.aof ${ROM_SYMS} -symbols ${LNK_TARGET}_sym.linked
modulewrap.oz: ${WRAPPER} AppName.s
${AS} ${ASFLAGS} ${WRAPPER} $@
${RES_OBJ}.oz:
${MKDIR} ${MERGEDRDIR}
${INSTRES} -I Resources.${LOCALE}.ROM,Resources.UK.ROM,Resources.ROM,Resources.${LOCALE},Resources.UK,Resources ${MERGEDRDIR} ${RESAPP_FILES}
${INSTVIARG} ${MERGEDRDIR} ${RESFSAPPDIR} _ResGen_
${RESGEN} ${RES_AREA} $@ -via _ResGen_
include $(wildcard *.d)
include $(wildcard *.dd)
......
......@@ -35,7 +35,7 @@ INCLUDED_CLIBRARY = YES
# CUSTOMLIBZM (opt) (set to "custom" to override the module library rule)
# CUSTOMLIBD (opt) (set to "custom" to override the debug application library rule)
# CUSTOMLIBDZM (opt) (set to "custom" to override the debug module library rule)
# SOURCES_TO_LINK (opt) (files which need be linked to by the link farm, in addition to contents of c and h directories)
# SOURCES_TO_SYMLINK (opt) (files which need be linked to by the link farm, in addition to contents of c and h directories)
#
#
# It relies on the following from the build system:
......@@ -160,7 +160,12 @@ endif
all_libs: ${TARGET_LIBS}
@${ECHO} ${COMPONENT}: library built
${DIRS} ::
# GNU make seems to treat any double-colon rule with no dependencies as
# always out-of-date, therefore always rebuilds it and anything which in turn
# depends on the target of the double-colon rule. So use a single-colon rule
# instead. If any cross builds need to create extra directories on a
# per-component basis, we'll cross that bridge when we get to it.
${DIRS}:
${TOUCH} $@
export: export_${PHASE}
......@@ -177,14 +182,14 @@ create_exp_lib_dir:
.SUFFIXES: .exphdr .expasm .explib .h .Hdr .${LIBEXT}
.h.exphdr:; ${CP} $< ${EXPDIR}/$< ${CPFLAGS}
.Hdr.expasm:; ${CP} $< ${EXPDIR}/$< ${CPFLAGS}
.Hdr.expasm:; ${CP} $< ${EXPDIR}/$* ${CPFLAGS}
.${LIBEXT}.explib:; ${CP} $< ${EXPDIR}/$< ${CPFLAGS}
export_hdrs: create_exp_hdr_dirs ${DIRS} ${EXPORTING_ASMHDRS} ${EXPORTING_HDRS}
[ ! -f ../VersionNum ] || ${CP} ../VersionNum ${EXPDIR}/LibVersion ${CPFLAGS}
@${ECHO} ${COMPONENT}: header export complete
export_libs: create_exp_lib_dir ${DIRS} ${EXPORTING_LIBS} ${TARGET_LIBS}
export_libs: create_exp_lib_dir ${DIRS} ${TARGET_LIBS} ${EXPORTING_LIBS}
[ ! -f ../VersionNum ] || ${CP} ../VersionNum ${EXPDIR}/LibVersion ${CPFLAGS}
@${ECHO} ${COMPONENT}: library export complete
......
# Makefile fragment for C and C++ modules
INCLUDED_CMODULE = YES
#
# This makefile provides the following phony targets:
#
# all
# export export_hdrs export_libs
# resources
# rom rom_link
# standalone install
# debug gpa_debug
# prepro
# clean
#
#
# This fragment uses the following macros set by the master makefile.
#
#
# COMPONENT (the name of the component)
# TARGET (opt) (the leafname of the module - otherwise ${COMPONENT})
# ROM_TARGET (opt) (partially linked module leafname - otherwise ${TARGET}.aof)
# LNK_TARGET (opt) (fixed-position module leafname - otherwise ${TARGET}.linked)
# SA_TARGET (opt) (standalone module leafname - otherwise ${TARGET})
# DBG_TARGET (opt) (debug module leafname - otherwise ${TARGET}D)
# AIF_TARGET (opt) (GPA-intermediate leafname - otherwise ${TARGET}.aif)
# GPA_TARGET (opt) (GPA debug leafname - otherwise ${TARGET}.gpa)
# INSTDIR (opt) (the target directory - otherwise ${INSTALLDIR})
# C_EXP_HDR (opt) (C header target directory - otherwise ${CEXPORTDIR}/Interface)
# EXP_HDR (opt) (assembly header target directory - otherwise ${EXPORTDIR}
# DIRS (opt) (stamp object for directory creation - otherwise _dirs)
# HDRS (opt) (C header files to export, no .h suffix - otherwise ${TARGET})
# ASMHDRS (opt) (assembly header files to export, no .hdr suffix - otherwise none)
# ASMCHDRS (opt) (C-from-assembly auto-generated header files to export, no .hdr suffix - otherwise none)
# INSTRES_FILES (opt) (extra resource files in addition to Messages - use InstRes specification rules)
# INSTRAM_FILES (opt) (RAM build specific resources - otherwise ${INSTRES_FILES})
# INSTROM_FILES (opt) (ROM build specific resources - otherwise ${INSTRES_FILES})
# INSTR??_DEPENDS (opt) (any extra dependency to assert on INSTRES/INSTRAM/INSTROM_FILES)
# MERGEDRDIR (r/o) (directory for generating exported resources, for information only)
# MERGEDMSGS (r/o) (leafname of generated Messages file, for compatibility with AAsmModule)
# RESFSDIR (opt) (actual directory to export resources to - otherwise ${RESDIR}/${TARGET})
# RES_AREA (opt) (area name to use for embedded messages in standalone build - otherwise Resources)
# RES_OBJ (opt) (object file for embedded messages in standalone build, no .o suffix - otherwise ${TARGET}Msgs)
# RES_PATH (opt) (path relative to ResourceFS root to be suffixed by ${TARGET} - otherwise Resources)
# CMHGFILE (opt) (name of CMHG source file, no .cmhg suffix - otherwise ${TARGET}Hdr)
# CMHGAUTOHDR (opt) (header file, if any, from HDRS or ASMCHDRS, to which to append the SWI defines from CMHG)
# CMHGFILE_SWIPREFIX (opt) (name of SWI prefix used in CMHG file - otherwise ${TARGET})
# OBJS (opt) (object files, no .o suffixes - otherwise ${TARGET} ${CMHGFILE})
# ROM_OBJS (opt) (ROM build objects - otherwise ${OBJS})
# SA_OBJS (opt) (standalone build objects - otherwise ${OBJS})
# DBG_OBJS (opt) (debug build object files, no prefixes - otherwise ${OBJS})
# LIBS (opt) (extra libraries; ${CLIB} is always used)
# ROM_LIBS (opt) (libraries to link for ROM targets - otherwise ${LIBS})
# SA_LIBS (opt) (libraries to link for standalone targets - otherwise ${LIBS})
# DBG_LIBS (opt) (extra debug libraries in addition to SA_LIBS and DEBUGLIBS)
# ROM_DEPEND (opt) (any extra dependency to assert on ROM_TARGET)
# SA_DEPEND (opt) (any extra dependency to assert on SA_TARGET and DBG_TARGET)
# CUSTOMEXP (opt) (set to "custom" to override the export rules)
# CUSTOMRES (opt) (set to "custom" to override the resources rules, or "no" for no resources)
# CUSTOMROM (opt) (set to "custom" to override the rom rules)
# CUSTOMSA (opt) (set to "custom" to override the standalone rules)
# CUSTOMDBG (opt) (set to "custom" to override the debug rules)
# CUSTOMGPA (opt) (set to "custom" to override the GPA rules)
# RAMCDEFINES (opt) (additions to CDEFINES for RAM builds - requires ModStdRule to be included later)
# ROMCDEFINES (opt) (additions to CDEFINES for ROM builds - requires ModStdRule to be included later)
# RAMASMDEFINES (opt) (additions to ASMDEFINES for RAM builds - requires ModStdRule to be included later)
# ROMASMDEFINES (opt) (additions to ASMDEFINES for ROM builds - requires ModStdRule to be included later)
# CMHGDEPENDS (opt) (source files which need to include the .h file autogenerated from the CMHG file)
# ASM2TXT (opt) (source file to be autogenerated using objasm as a text generator; second word if present is "extension" subdirectory to place output into)
# ASM2TXT_SUBDIR (opt) (non-"extension" subdirectory to place ASM2TXT file into)
# MODULEWRAP (opt) (set to "yes" to build and link with the modulewrap veneer from RISC_OSLib)
#
#
# It relies on the following from the build system:
#
#
# PHASE (export phase discriminator)
# CMDHELP (whether star command help/syntax strings are included)
# RESDIR (installation directory for resources - cf. RESFSDIR)
# FORCEROMLINK (set to force a relink of the ROM target, used in BBE)
# LINKDIR (installation directory for LNK_TARGET)
# ADDRESS (base address for LNK_TARGET)
# INSERTVERSION (awk script to substitute from VersionNum)
#
#
# It relies on the following generic tool macros from the StdTools makefile
#
#
# C + CFLAGS (C compiler; CDFLAGS also used in debug builds; -g implicit)
# CP + CPFLAGS (copy, cp etc.)
# WIPE + WFLAGS (recursive delete)
# RM (non-recursive delete)
# AS + ASFLAGS (assembler)
# LD + LDFLAGS (linker; LDDFLAGS also used in debug builds; -d implicit)
# LDRAMFLAGS (more linker flags)
# LDROMFLAGS (more linker flags)
# LDLINKFLAGS (flags for the rom_link phase)
# MODSQZ + MODSQZFLAGS (module binary compressor)
# CHMOD
# MKDIR (cdir/mkdir -p)
# ECHO
# TOUCH (create/touch)
# RESGEN
# TOGPA
#
#
# It relies on the following from the StdRules makefile
#
#
# .c.o .c++.o .cpp.o .s.o
#
#
# It relies on the following from the ModStdRule makefile
#
#
# .cmhg.h .cmhg.o
#
#
# It relies on the following from the DbgRules makefile
#
#
# CDFLAGS C++DFLAGS ASDFLAGS LDDFLAGS
# .c.od .c++.od .cpp.od .s.od
#
#
TARGET ?= ${COMPONENT}
ROM_TARGET ?= ${TARGET}
LNK_TARGET ?= ${TARGET}
SA_TARGET ?= ${TARGET}
DBG_TARGET ?= ${TARGET}D
AIF_TARGET ?= ${TARGET}
GPA_TARGET ?= ${TARGET}
INSTDIR ?= ${INSTALLDIR}
C_EXP_HDR ?= ${CEXPORTDIR}/Interface
EXP_HDR ?= ${EXPORTDIR}
DIRS ?= _dirs
HDRS ?= ${TARGET}
ASMHDRS ?=
ASMCHDRS ?=
INSTRAM_FILES ?= ${INSTRES_FILES}
INSTRAM_DEPENDS ?= ${INSTRES_DEPENDS}
INSTROM_FILES ?= ${INSTRES_FILES}
INSTROM_DEPENDS ?= ${INSTRES_DEPENDS}
MERGEDRDIR ?= _ResData_
MERGEDMSGS ?= ${MERGEDRDIR}/${TARGET}/Messages
RES_AREA ?= Resources
RES_OBJ ?= ${TARGET}Msgs
RES_PATH ?= Resources
RESFSDIR ?= ${RESDIR}/${TARGET}
CMHGFILE ?= ${TARGET}Hdr
CMHGFILE_SWIPREFIX ?= ${TARGET}
OBJS ?= ${TARGET}
ifeq ("${MODULEWRAP}","yes")
OBJS += modulewrap
endif
ROM_OBJS ?= ${OBJS}
SA_OBJS ?= ${OBJS}
DBG_OBJS ?= ${OBJS}
ROM_OBJS += ${CMHGFILE}
SA_OBJS += ${CMHGFILE}
DBG_OBJS += ${CMHGFILE}
ifeq ($(filter no custom,${CUSTOMRES}),)
RESDIR ?= ${MERGEDRDIR} # Place to internally collect up contents of RES_OBJ
SA_OBJS += ${RES_OBJ}
DBG_OBJS += ${RES_OBJ}
endif
ROM_LIBS ?= ${LIBS}
SA_LIBS ?= ${LIBS}
ROM_LIBS += ${ROMCSTUBS}
ROM_SYMS = ${C_ABSSYM}
SA_LIBS += ${CLIB}
DBG_LIBS += ${DEBUGLIBS}
ROM_OBJS_ = $(addsuffix .o,${ROM_OBJS})
SA_OBJS_ = $(addsuffix .o,${SA_OBJS})
DBG_OBJS_ = $(addsuffix .od,${DBG_OBJS})
PP_OBJS_ = $(addsuffix .i,$(filter-out ${CMHGFILE} ${RES_OBJ},${DBG_OBJS}))
EXPORTING_HDRS = $(addsuffix .exphdr,${HDRS})
EXPORTING_ASMHDRS = $(addsuffix .expasm,${ASMHDRS})
EXPORTING_ASMCHDRS = $(addsuffix .expasmc,${ASMCHDRS})
ifeq ($(filter rom%,${MAKECMDGOALS}),)
CDEFINES += ${RAMCDEFINES}
ASMDEFINES += ${RAMASMDEFINES}
RES_FILES_ = ${INSTRAM_FILES}
RES_DEPENDS_ = ${INSTRAM_DEPENDS}
else
CDEFINES += ${ROMCDEFINES}
ASMDEFINES += ${ROMASMDEFINES}
RES_FILES_ = ${INSTROM_FILES}
RES_DEPENDS_ = ${INSTROM_DEPENDS}
endif
ifneq ($(filter debug%,${MAKECMDGOALS}),)
CMHGFLAGS += ${CMHGDFLAGS} # Affects both object and header generation
endif
SOURCES_TO_SYMLINK += $(wildcard c/*) $(wildcard c++/*) $(wildcard cmhg/*) $(wildcard h/*) $(wildcard hdr/*) $(wildcard s/*) VersionNum VersionASM
ifneq (objs,$(notdir ${CURDIR}))
# Makefile invoked from same directory
# Create link farm, then execute the makefile from within it
ifeq (clean,${MAKECMDGOALS})
# With a double-colon rule which can have additional actions assigned from the
# master makefile, we'd normally need the master makefile to include the
# ${CURDIR} check to ensure that it's performed on the same invocation as us.
# However, there's no real benefit to performing clean from within the objs
# directory, and it adds an ordering problem between the different double-colon
# rules (the one that deletes the objs directory has to be last otherwise the
# cwd is invalid for the others) so to simplify things, we only ever do cleans
# from the same directory as the Makefile.
clean::
@echo Cleaning...
@rm -rf objs
@echo ${COMPONENT}: cleaned
else
all export export_hdrs export_libs resources rom rom_link standalone install debug gpa_debug prepro links: ${SYMLINK_DEPEND}
$(foreach linksource,${SOURCES_TO_SYMLINK}, \
$(shell \
linkdest=`echo ${linksource} | sed -e 's,\([^/]*\)/\([^/]*\)$$,\2.\1,' -e 's,^,objs/,'`; \
linkdestdir=`echo $$linkdest | sed -e 's,/[^/]*$$,,'`; \
linkbackpath=`echo $$linkdestdir | sed -e 's,[^/]*,..,g'`; \
[ -d ${linksource} ] || [ -L $$linkdest ] || mkdir -p $$linkdestdir; \
[ -d ${linksource} ] || [ -L $$linkdest ] || ln -s $$linkbackpath/${linksource} $$linkdest; \
) \
)
@[ -L objs/Resources ] || ln -s ../Resources objs/Resources
@mkdir -p objs
ifneq (links,${MAKECMDGOALS})
@${MAKE} -C objs -f ../$(firstword ${MAKEFILE_LIST}) ${MAKECMDGOALS}
endif
endif
else
# Makefile invoked from objs subdirectory
ASM2TXT_BASE := $(word 1,${ASM2TXT})
ASM2TXT_EXT := $(word 2,${ASM2TXT})
ifneq ("${ASM2TXT_EXT}","")
ASM2TXT_EXT := .${ASM2TXT_EXT}
endif
ifeq ("${INCLUDED_STDTOOLS}","")
include StdTools
endif
ifeq ("${INCLUDED_MODULELIBS}","")
include ModuleLibs
endif
CFLAGS := ${C_MODULE} ${C_NO_STKCHK} ${CFLAGS}
ifeq ("${INCLUDED_MODSTDRULE}","")
include ModStdRule
endif
ifeq ("${INCLUDED_DBGRULES}","")
include DbgRules
endif
ifneq ("${ASM2TXT}","")
${ASM2TXT_SUBDIR}${ASM2TXT_BASE}${ASM2TXT_EXT}: ${ASM2TXT_BASE}.o
${LDBIN} $@ $^
endif
#
# General rules
#
all: ${DBG_TARGET}${SUFFIX_MODULE} ${SA_TARGET}${SUFFIX_MODULE} ${ROM_TARGET}.aof
@${ECHO} ${COMPONENT}: all built
# GNU make seems to treat any double-colon rule with no dependencies as
# always out-of-date, therefore always rebuilds it and anything which in turn
# depends on the target of the double-colon rule. So use a single-colon rule
# instead. If any cross builds need to create extra directories on a
# per-component basis, we'll cross that bridge when we get to it.
${DIRS}:
${TOUCH} $@
#
# Export phases
#
export${CUSTOMEXP}: export_${PHASE}
@${NOP}
export_: export_hdrs export_libs
@${NOP}
create_exp_hdr_dirs:
${MKDIR} ${C_EXP_HDR}
${MKDIR} ${EXP_HDR}
ifneq (${CMHGFILE},)
${CMHGAUTOHDR}_h_: ${DIRS} ${CMHGFILE}.h
${AWK} -- "/.ifndef ${CMHGFILE_SWIPREFIX}/,/endif/" ${CMHGFILE}.h > ${CMHGAUTOHDR}_h_
endif
ifneq ($(findstring ${CMHGAUTOHDR},${HDRS}),)
${CMHGAUTOHDR}.exphdr: ${CMHGAUTOHDR}_h_ ${CMHGAUTOHDR}.h
${FAPPEND} ${C_EXP_HDR}/${CMHGAUTOHDR}.h ${CMHGAUTOHDR}.h ${CMHGAUTOHDR}_h_
endif
ifneq ($(findstring ${CMHGAUTOHDR},${ASMCHDRS}),)
${CMHGAUTOHDR}.expasmc: ${CMHGAUTOHDR}_h_ ${CMHGAUTOHDR}.hdr
${HDR2H} ${CMHGAUTOHDR}.hdr ${C_EXP_HDR}/${CMHGAUTOHDR}.h
${FAPPEND} ${C_EXP_HDR}/${CMHGAUTOHDR}.h ${C_EXP_HDR}/${CMHGAUTOHDR}.h ${CMHGAUTOHDR}_h_
endif
ifneq (${CMHGDEPENDS},)
CMHGDEPENDS_ = $(addsuffix .o,${CMHGDEPENDS}) $(addsuffix .od,${CMHGDEPENDS}) $(addsuffix .i,${CMHGDEPENDS})
${CMHGDEPENDS_}: ${CMHGFILE}.h
endif
ifeq ("${MODULEWRAP}","yes")
modulewrap.s: ${LIBDIR}/RISC_OSLib/modulewrap.s
${CP} $^ $@
endif
.SUFFIXES: .exphdr .expasm .expasmc .h .hdr
.h.exphdr:; ${CP} $< ${C_EXP_HDR}/$<
.hdr.expasm:; ${CP} $< ${EXP_HDR}/$*
.hdr.expasmc:; ${HDR2H} $< ${C_EXP_HDR}/$*.h
export_hdrs${CUSTOMEXP}: create_exp_hdr_dirs ${DIRS} ${EXPORTING_HDRS} ${EXPORTING_ASMHDRS} ${EXPORTING_ASMCHDRS}
@${ECHO} ${COMPONENT}: header export complete
export_libs${CUSTOMEXP}:
@${ECHO} ${COMPONENT}: no exported libraries
#
# Resources rules
#
resources${CUSTOMRES}:: resources-${CMDHELP}
@${ECHO} ${COMPONENT}: resources copied to Messages module
ifeq (${CUSTOMRES},no)
resources:
@${ECHO} ${COMPONENT}: no resources to export
endif
resources_extra: ${RES_DEPENDS_}
ifneq (${RES_FILES_},)
${INSTRES} -I Resources.${USERIF}.${LOCALE},Resources.${USERIF}.UK,Resources.${LOCALE},Resources.UK,Resources ${RESFSDIR} ${RES_FILES_}
endif
ifneq (,$(filter Messages,${INSTRES_VERSION}))
${INSERTVERSION} ${RESFSDIR}/Messages > ${RESFSDIR}/_Awk_
${CP} ${RESFSDIR}/_Awk_ ${RESFSDIR}/Messages ${CPFLAGS}
${RM} ${RESFSDIR}/_Awk_
for path in ${USERIF}/${LOCALE} ${USERIF}/UK ${LOCALE} UK ""; do if [ -f Resources/$$path/Messages ]; then touch -r Resources/$$path/Messages ${RESFSDIR}/Messages; break; fi; done
endif
@${NOP}
resources_common:
${MKDIR} ${RESFSDIR}
${INSTRES} -I Resources.${USERIF}.${LOCALE},Resources.${USERIF}.UK,Resources.${LOCALE},Resources.UK,Resources ${RESFSDIR} [Messages]
resources_cmdhelp: ${MERGEDMSGS}
${CP} ${MERGEDMSGS} ${RESFSDIR}/Messages
resources-None: resources_common resources_extra
@${NOP}
resources-: resources_common resources_cmdhelp resources_extra
@${NOP}
${RES_OBJ}.o: ${DIRS} resources-${CMDHELP}
${INSTVIARG} ${MERGEDRDIR} ${RES_PATH} _ResGen_
${RESGEN} ${RES_AREA} $@ -via _ResGen_
${RES_OBJ}.od: ${RES_OBJ}.o
${CP} $< $@
#
# ROM build rules
#
rom${CUSTOMROM}: ${ROM_TARGET}.aof
@${ECHO} ${COMPONENT}: rom module built
rom_link${CUSTOMROM}: ${LNK_TARGET}.linked
${CP} ${LNK_TARGET}.linked ${LINKDIR}/${TARGET}
${CP} ${LNK_TARGET}_sym.linked ${LINKDIR}/${TARGET}_sym
@${ECHO} ${COMPONENT}: rom_link complete
${ROM_TARGET}.aof: ${ROM_DEPEND} ${DIRS} ${ROM_OBJS_} ${ROM_LIBS}
${LD} -o $@ -aof ${ROM_OBJS_} ${ROM_LIBS}
${LNK_TARGET}.linked: ${FORCEROMLINK} ${ROM_SYMS} ${ROM_TARGET}.aof
${LD} ${LDFLAGS} ${LDLINKFLAGS} -o $@ -rmf -base ${ADDRESS} ${ROM_TARGET}.aof ${ROM_SYMS} -Symbols ${LNK_TARGET}_sym.linked
#
# Standalone rules
#
install${CUSTOMSA}: ${SA_TARGET}${SUFFIX_MODULE}
${MKDIR} ${INSTDIR}
${CP} ${SA_TARGET}${SUFFIX_MODULE} ${INSTDIR}/${TARGET}${SUFFIX_MODULE}
@${ECHO} ${COMPONENT}: ram module installed
standalone${CUSTOMSA}: ${SA_TARGET}${SUFFIX_MODULE}
@${ECHO} ${COMPONENT}: ram module built
debug${CUSTOMDBG}: ${DBG_TARGET}${SUFFIX_MODULE}
@${ECHO} ${COMPONENT}: debug module built
gpa_debug${CUSTOMGPA}: ${GPA_TARGET}.gpa
@${ECHO} ${COMPONENT}: GPA debug built
prepro: ${DIRS} ${PP_OBJS_}
@${ECHO} ${COMPONENT}: sources preprocessed
${SA_TARGET}${SUFFIX_MODULE}: ${SA_DEPEND} ${DIRS} ${SA_OBJS_} ${SA_LIBS}
${LD} ${LDFLAGS} ${LDRAMFLAGS} -o $@ -rmf ${SA_OBJS_} ${SA_LIBS}
${MODSQZ} ${MODSQZFLAGS} $@
${DBG_TARGET}${SUFFIX_MODULE}: ${SA_DEPEND} ${DIRS} ${DBG_OBJS_} ${SA_LIBS} ${DBG_LIBS}
${LD} ${LDFLAGS} ${LDRAMFLAGS} -o $@ -rmf ${DBG_OBJS_} ${DBG_LIBS} ${SA_LIBS}
${GPA_TARGET}.gpa: ${AIF_TARGET}.aif
${TOGPA} -s aif.${AIF_TARGET} $@
${AIF_TARGET}.aif: ${DBG_TARGET}${SUFFIX_MODULE}
${LD} -aif -bin -d -o ${AIF_TARGET}.aif ${DBG_OBJS_} ${DBG_LIBS} ${SA_LIBS}
include $(wildcard *.d)
include $(wildcard *.dd)
endif
# EOF
# Makefile fragment for defining standard rules for various tools
# when building modules
INCLUDED_MODSTDRULE = YES
# Get the generic rules first
ifeq ("${INCLUDED_STDRULES}","")
include StdRules
endif
.SUFFIXES: .cmhg .od
# Generate C header definitions from CMHG source file
.cmhg.h:; ${CMHG} ${CINCLUDES} ${CMHGFLAGS} -d $@ $<
# CMHG source files -> object file
.cmhg.o:; ${CMHG} ${CINCLUDES} ${CMHGFLAGS} -o $@ $<
.cmhg.od:; ${CMHG} ${CINCLUDES} ${CMHGFLAGS} -o $@ $<
# EOF
# Makefile fragment for libraries linked against modules (RAM or ROM)
INCLUDED_MODULELIBS = YES
ANSILIB = ${LIBDIR}/CLib/ansilibm.a
ifeq (GNU,${TOOLCHAIN})
CLIB =
else
CLIB = ${LIBDIR}/CLib/stubs.a
endif
RLIB = ${LIBDIR}/RISC_OSLib/riscoslibm.a
RSTUBS = ${LIBDIR}/RISC_OSLib/rstubs.a
ROMSTUBS = ${LIBDIR}/RISC_OSLib/romstubs.a
ROMCSTUBS = ${LIBDIR}/RISC_OSLib/romcstubs.a
ABSSYM = ${LIBDIR}/RISC_OSLib/abssym.a
C_ABSSYM = ${LIBDIR}/RISC_OSLib/c_abssym.a
A_ABSSYM = ${LIBDIR}/RISC_OSLib/a_abssym.a
ASMUTILS = ${LIBDIR}/AsmUtils/AsmUtilsZM.a
ifeq (GNU,${TOOLCHAIN})
C++LIB =
else
C++LIB = ${LIBDIR}/c++lib/c++libz.a
endif
CLXLIB = ${LIBDIR}/CLX/clxlibz.a
TBOXLIB = ${LIBDIR}/tboxlibs/toolboxlib.a
FLEXLIB = ${LIBDIR}/tboxlibs/flexlibzm.a
EVENTLIB = ${LIBDIR}/tboxlibs/eventlibm.a
WIMPLIB = ${LIBDIR}/tboxlibs/wimplib.a
RENDERLIB = ${LIBDIR}/tboxlibs/renderlib.a
TBOXLIBS = ${EVENTLIB} ${TBOXLIB} ${RENDERLIB} ${WIMPLIB}
TBOXINTLIB = ${LIBDIR}/tboxlibint/tboxlibm.a
TBOXINTDBGLIB = ${LIBDIR}/tboxlibint/debuglibm.a
SOCK4LIB = ${LIBDIR}/TCPIPLibs/socklibzm.a
SOCK5LIB = ${LIBDIR}/TCPIPLibs/socklib5zm.a
INETLIB = ${LIBDIR}/TCPIPLibs/inetlibzm.a
UNIXLIB = ${LIBDIR}/TCPIPLibs/unixlibzm.a
RPCLIB = ${LIBDIR}/TCPIPLibs/rpc/rpc_datazm.a ${LIBDIR}/TCPIPLibs/rpc/rpclibzm.a
CRYPTLIB = ${LIBDIR}/SSLeay/ssl.a ${LIBDIR}/SSLeay/libcrypto.a
NET4LIBS = ${UNIXLIB} ${INETLIB} ${SOCK4LIB}
NET5LIBS = ${UNIXLIB} ${INETLIB} ${SOCK5LIB}
ABCLIB = ${LIBDIR}/ABCLib/ABCLib.a
CALLXLIB = ${LIBDIR}/callx/callxzm.a
CONLIB = ${LIBDIR}/ConfigLib/ConfigLibzm.a
DDTLIB = ${LIBDIR}/DDTLib/DDTLibzm.a
DESKLIB = ${LIBDIR}/Desk/Desk_M.a
FETCHLIB = ${LIBDIR}/Fetchers/FetchLibZM.a
JSLIB = ${LIBDIR}/JSLib/JSLibzm.a
LDAPLIBS = ${LIBDIR}/LDAP/LDAPzm.a ${LIBDIR}/LDAP/LBERzm.a
MODMALLOCLIB = ${LIBDIR}/ModMalloc/ModMalloczm.a
NCMALIB = ${LIBDIR}/NCMALib/NCMALibZM.a
NSPRLIB = ${LIBDIR}/NSPRLib/NSPRLibzm.a
OSLIB = ${LIBDIR}/OSLib/OSLib.a
PDEBUGLIB = ${LIBDIR}/PDebug/PDebugzm.a
PRISMLIB = ${LIBDIR}/PRISMLib/PRISMLibzm.a
REMOTEDBLIB = ${LIBDIR}/remotedb/remotedbzm.a
RMVSN = ${LIBDIR}/RMVersion/RMVersionZ.a
SYNCLIB = ${LIBDIR}/SyncLib/SyncLibzm.a
TGRLIB = ${LIBDIR}/TGRLib/tgrlib.a
TRACELIB = ${LIBDIR}/Trace/Tracezm.a
UNICODELIB = ${LIBDIR}/Unicode/ucodezm.a
WILDLIB = ${LIBDIR}/Wild/Wildzm.a
ZLIB = ${LIBDIR}/zlib/zlibzm.a
DEBUGLIB = ${LIBDIR}/DebugLib/DebugLibZM.a
DEBUGLIBS = ${DEBUGLIB} ${REMOTEDBLIB} ${TRACELIB} ${PDEBUGLIB} ${MODMALLOCLIB} ${WILDLIB} ${DDTLIB} ${DESKLIB}
# Library include paths, where these can't easily be specified explicitly
# If this list gets too long, it may be worth de-duplicating the definitions in AppLibs
INCLUDE_OSLIB = -I${LIBDIR}/OSLib/Core,${LIBDIR}/OSLib/Computer,${LIBDIR}/OSLib/User,${LIBDIR}/OSLib/Toolbox,{LIBDIR}/OSLib/Core/oslib,${LIBDIR}/OSLib/Computer/oslib,${LIBDIR}/OSLib/User/oslib,${LIBDIR}/OSLib/Toolbox/oslib
# EOF