1. 15 May, 2021 1 commit
    • Ben Avison's avatar
      Add tokenised help file functionality to `CModule` · ee10b29f
      Ben Avison authored
      `TOKHELPSRC`, `HELPSRC` and `TOKENS` have the same meaning as in `AAsmModule`.
      Because `CModule`, unlike `AAsmModule`, can build a binary from multiple
      linked object files, it is also necessary to specify which object file(s)
      depend on the autogenerated source file. This is achieved with the new input
      variable `TOKHELPDEPENDS`. This defaults to `OBJS` which in turn defaults to
      `TARGET`, which should mean that any components converted from `AAsmModule`
      will not require any such line to be specified in their master makefile.
      Requires RiscOS/Sources/Programmer/Debugger!4
  2. 27 Jun, 2020 4 commits
    • 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
    • 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'
    • 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.
    • Ben Avison's avatar
  3. 20 May, 2019 1 commit
    • 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.
  4. 11 Apr, 2018 1 commit
    • Ben Avison's avatar
      Incremental step in cross-compilation support · 5e83cb7e
      Ben Avison authored
        * Correct capitalisation of resgen's TARGET to match its main source file
        * 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
        * Fix C-from-assembler exports to have .h suffix
        * Define INCLUDE_OSLIB to permit OSLib header search paths to be
          specified in an OS-agnostic way
        * 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
        * 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
        * Don't use .hdr suffix on exported assembler header files
        * Correct order of dependencies for export_libs phony target
        * 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
        * 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.
        * Support up to 16 assembler and 8 C-from-assembler headers
        Makefiles/AppLibs, ModuleLibs:
        * Define INCLUDE_OSLIB
        * Add LDBIN tool
      Version 7.24. Tagged as 'BuildSys-7_24'
  5. 29 May, 2016 1 commit
    • Robert Sprowson's avatar
      Use the same optional resources syntax for AAsmModule as for CModule · 6d8a8a45
      Robert Sprowson authored
      Copy over the rules that use platform agnostic InstRes to copy their extra resources (for those modules wanting more than just the default Messages+CmdHelp).
      Copy over the logic that allows INSERTVERSION to be run on Messages files (from CApp shared makefile) so modules which have a front end can get their dates from Messages.
      Add INSERTVERSION facility to CModule too.
      Version 6.91. Tagged as 'BuildSys-6_91'
  6. 02 Aug, 2015 1 commit
    • Robert Sprowson's avatar
      Extend resources phase to handle more than just Messages · e416ad84
      Robert Sprowson authored
      Using the InstViaRG script CModule will now collate a list of files (using the syntax for the InstRes script employed by the CApp shared makefile) for resources, rather than the previous Messages file only.
      The list is specified in INSTRES_FILES, or if for some reason the standalone and ROM versions need to be different INSTRAM_FILES and INSTROM_FILES (cf. INSTAPP_FILES in CApp).
      Shock new documentation for CModule added.
      Version 6.70. Tagged as 'BuildSys-6_70'
  7. 01 Aug, 2015 1 commit
  8. 24 Oct, 2014 1 commit
    • Robert Sprowson's avatar
      Do 'rom_link' against the same thing you do 'rom' with · 3b88d112
      Robert Sprowson authored
      During the rom phase, ROM C modules would be linked against ${ROMCSTUBS}, ie. clib.
      During the rom_link phase, they'd be linked against ${ABSSYM}, ie. clib and rlib.
      As RISC_OSLib contains various wimp_ symbol names which clash with ${WIMPLIB} from the Toolbox, so you can't write a ROMmable C module which links against the Toolbox and uses the shared makefiles.
      We define a new variable ROM_SYMS which is initialised to ${C_ABSSYM}, ie. just the clib to match the stubs used during the rom phase, and the ${ROMCSTUBS} is now appended to ${ROM_LIBS} so it can be overridden rather than being hardwired into the rule.
      For completeness SA_LIBS can now also be overridden to remove ${CLIB} if desired.
      CApp/CLibrary now use ${NOP} silently.
      Version 6.60. Tagged as 'BuildSys-6_60'
  9. 19 Oct, 2014 1 commit
    • Steve Revill's avatar
      CTools build will now export things into an "Exports" directory. · 1638c6ef
      Steve Revill authored
      This replaces the "AcornC/C++.Libraries" directory that we had
      before, which was a random mash-up of bits of a real "Exports"
      Also reverted the CModule change - leave this job to components
      to deal with in their own makefiles.
      Version 6.58. Tagged as 'BuildSys-6_58'
  10. 18 Oct, 2014 1 commit
    • Steve Revill's avatar
      Tweak to the ModuleDB to allow builds (e.g. CTools) to include some more of... · 3d0ad197
      Steve Revill authored
      Tweak to the ModuleDB to allow builds (e.g. CTools) to include some more of the common librabries in their install phase. The ones I've added are (almost) all required by shared makefiles - e.g. for debug app builds.
      Also a minor fix to CModule shared makefile to cope with certain arrangements
      of source files in a component.
      Version 6.57. Tagged as 'BuildSys-6_57'
  11. 27 Sep, 2014 1 commit
    • Robert Sprowson's avatar
      Change less useful resources_messages for resources_sprites · cb1c7449
      Robert Sprowson authored
       Swap round ${RESOURCEEXTRA} to come later, since otherwise the ${RESDIR} hasn't been created
      AAsmModule & CModule:
       Recemtly added resources_messages was a bit pointless as resources_common did the same thing, instead add resources_sprites.
       Debug library for internal Toolbox objects added.
      Retagged as BuildSys-6_50.
  12. 24 Sep, 2014 1 commit
    • Robert Sprowson's avatar
      Make debug builds a bit simpler · a4135210
      Robert Sprowson authored
       Remove SA_DEBUG override, instead use ASDFLAGS like CModule does.
       If the target is 'debug' allow CMHGDFLAGS to pass extra defines into CMHG, this avoids the common problem of having to have 2 CMHG files and select between them.
      Other - sync the messages token check/copying, use ${NOP} and ${FAPPEND} and ${DO}, and od.${RES_OBJ} isn't dependent on ${DIRS} since it already has that when creating o.${RES_OBJ}.
      Version 6.50. Tagged as 'BuildSys-6_50'
  13. 18 Sep, 2014 1 commit
    • Robert Sprowson's avatar
      Improvements to resources phase rules · cfc0ecf2
      Robert Sprowson authored
      The preferred override is now 'CUSTOMRES' to match CModule, though the former 'RESOURCES' is still accepted as a transitional step.
      The internal phoney targets (like resources-None) can no longer be augmented with :: since that doesn't make sense.
      Copied some block comments from CModule so they're easier to compare.
      Fixed the resourcesno/resourcesNo never appearing, this is because when CUSTOMRES=no you end up with two rules called resourcesno and no rule called resources.
      Added resources_res and resources_messages and resources_templates as well as RESOURCEEXTRA support (from AAsmModule).
      Copied some block comments from AAsmModule so they're easier to compare.
      Tested in an IOMD ROM resources phase.
      Version 6.48. Tagged as 'BuildSys-6_48'
  14. 11 Nov, 2013 1 commit
    • Ben Avison's avatar
      Changes to keep GNUmakefiles and Makefiles compatible · 3542e171
      Ben Avison authored
        * Naming of object file variables rationalised in line with CModule
        * Noted that INSTAPP_VERSION files must also be present in INSTAPP_FILES for
          compatibility with GNUmakefiles - requires changes to individual top-level
          makefiles, but not BuildSys
        * Naming of object file variables rationalised in line with CModule
        * Removed unused variable OBJS_
        * Retired TIDYDESC
        * Default definition of INSTAPP
        * Naming of object file variables rationalised in line with CModule
        * CLEAN_DEPEND removed, clean made a double-colon rule (it's worth noting
          that such additional clean rules are now only executed from the component's
          top-level directory: this was not true for the old extra_clean rules that
          this replaces, in the GNUmakefiles case)
        * Insertion of component version into Desc files now done using AwkVers
          script rather than the C preprocessor (note, will require editing of Desc
          files to comply). Also supports versions in Messages and !Run files,
          controlled by new variable INSTAPP_VERSION
        * Naming of object file variables rationalised in line with CModule
        * clean rules now only executed from the component's top-level directory, as
          with CApp
        * Added INSERTVERSION (AwkVers), retired TIDYDESC
        * Perl scripts now explicitly passed to perl - no need to chmod +x the
          scripts in RiscOS/Library
        * asasm/objasm include paths and APCS/Machine/UserIF predefines set to match
        Tested in a CTools build
      Version 6.32. Tagged as 'BuildSys-6_32'
  15. 01 Sep, 2012 1 commit
    • Jeffrey Lee's avatar
      Modify makefile fragments to generate GPA & symbol files when building ROM... · 278ac74a
      Jeffrey Lee authored
      Modify makefile fragments to generate GPA & symbol files when building ROM modules. Add HangWatch to ModuleDB.
        Makefiles/AAsmModule, Makefiles/CModule - Modified to generate GPA (for assembler) and symbols (for C) files when building ROM modules. These files are copied into the install folder, allowing them to easily be picked up by debugging tools.
        ModuleDB - Added entry for HangWatch module
        Makefile changes tested with BCM2835, OMAP3, and Disc builds
      Version 5.87. Tagged as 'BuildSys-5_87'
  16. 05 Feb, 2012 1 commit
  17. 04 Feb, 2012 1 commit
    • Robert Sprowson's avatar
      Add optional CLEAN_DEPEND to the clean rule in CModule. · 940518eb
      Robert Sprowson authored
      Do actively report when the CMHG file is deleted in CModule.
      Add PRISMLIB to the available module libraries.
      Components files updated to pass USB driver switches via CDEFINES not
      Tested with OMAP3 ROM build, other components files modified by eye but
      not tested.
      Version 5.39. Tagged as 'BuildSys-5_39'
  18. 03 Apr, 2011 1 commit
    • Ben Avison's avatar
      Bugfix to CModule makefile from previous commit · aacc2b74
      Ben Avison authored
        A line in this makefile evaluates CFLAGS so that the default static data
        relocation and stack checking options can be inserted before any overrides
        from the top-level makefile. But this was being done before StdTools was
        included, so C_STKCHK had not yet been defined, so if the top-level makefile
        tried to use it, it had no effect.
        Tested using new FrontEnd makefile.
      Version 5.13. Tagged as 'BuildSys-5_13'
  19. 31 Mar, 2011 1 commit
    • Ben Avison's avatar
      Improvements to shared makefiles · 684d01e3
      Ben Avison authored
        * Some subtle bugs can be caused by including shared makefiles in the
          wrong order. To try to prevent further problems, and simplify main
          makefiles at the same time, CApp, CLibrary and CModule now include the
          makefiles they depend upon themselves, in the correct order: generally
          speaking, all macro (re)definitions should be before rule definitions.
        * Added sentry macro definitions to each makefile. These can be used to
          avoid repeated inclusion of makefiles - particularly important now that
          CApp, CLibrary and CModule do additional includes. This removes the
          majority of cases where amu produced warnings about multiple inclusion;
          a few components remain where this is still the case, but these
          warnings are harmless. If they bother you, simply remove the
          now-superfluous include statements from the relevant main makefile.
        * Created a CUtil shared makefile, for building transient utilities. The
          'C' in the name is more for consistency with CApp/CLibrary/CModule than
          anything to do with the 'C' language, since all of these makefiles work
          equally well for assembler and 'C' - the 'C' is for historic reasons.
        * Tweaked the debug rules in CApp to avoid harmless but annoying linker
          warnings about stubs being included twice.
        * Added several new default switches to ASFLAGS. These enable us to start
          making assembler source files work under a cross-assembler, because
          statements like
              GET  Hdr:Macros
              GET  Hdr:Machine.<Machine>
          are not portable, and tweaking the cross-assembler to understand these
          types of constructs would not be pretty. Instead, with the extra
          command line switches now introduced, you can use
              GET  Macros
              GET  Machine/$Machine
        Tested in a ROM build
      Version 5.12. Tagged as 'BuildSys-5_12'
  20. 17 Jul, 2009 1 commit
    • Jeffrey Lee's avatar
      Update CModule makefile fragment to use a default RESFSDIR if required. Add... · b1ddd206
      Jeffrey Lee authored
      Update CModule makefile fragment to use a default RESFSDIR if required. Add IIC module to OMAP3 components file.
        Makefiles/CModule - makefile fragment now generates a default RESFSDIR value in an identical way to the AAsmModule fragment, easing migration of makefiles to the fragment system.
        Components/ROOL/OMAP3 - IIC module has been added to ROM image
        Tested on rev C2 beagleboard
      Version 4.80. Tagged as 'BuildSys-4_80'
  21. 26 Jun, 2009 1 commit
    • Ben Avison's avatar
      Added CTools disc build, and various supporting changes · 13d9ef8b
      Ben Avison authored
        * Updates to CModule makefile fragment to reduce the number of OS-specific
          rules in main Makefiles:
          + Added (RAM|ROM)(C|ASM)DEFINES variables. These allow the calling makefile
            to specify additional defines for RAM or ROM builds of C or assembler
            source files respectively. Traditionally this was done by having separate
            object files for RAM and ROM corresponding at least to whichever source
            file was responsible for interfacing with ResourceFS, but this requires
            messy additional rules. With this new approach, it is necessary to clean
            the component when switching between RAM and ROM builds, but I don't
            think this will affect many people's workflows.
          + Added CMHGDEPENDS. This should be used to specify which object files need
            a static dependency upon the h file autogenerated from the cmhg file.
            It should be specified in the usual form for object files passed to
            CModule - with neither an o. prefix nor a .o suffix.
        * Added TBOXINTLIB to ModuleLibs makefile fragment.
        * AsmUtils, HdrSrc, TCPIPheaders, ToolboxLib and UnicodeLib all upgraded in
          ModuleDB from EXP to ASM or C components, to permit them to be built in the
          install phase. As a result, those other Components files that didn't
          already do so now need to override this back to -type EXP.
        * BuildHost Components file edited to reflect the fact that binaof, binasm,
          modgen and ResGen now have separate install phases for executables and
          Docs files.
        The new Components file uses various components that are not publicly
        released, so it can only sensibly be used internally by ROOL. However, it's
        more convenient for us to keep it alongside the other Components files - and
        it also serves as an illustration of how to do a disc build.
      Version 4.77. Tagged as 'BuildSys-4_77'
  22. 27 Jan, 2009 1 commit
    • Ben Avison's avatar
      Added initial support for OMAP-3 builds. · 801d0839
      Ben Avison authored
        * Added new components file
        * Added entry for new HAL in the ModuleDB
        * Minor tweak to Makefiles:CModule so HALs can use shared Makefiles:
          no longer assumes that all callers wil have a non-null CMHGFILE
        Used in a test build
      Version 4.68. Tagged as 'BuildSys-4_68'
  23. 14 Oct, 2008 1 commit