1. 15 May, 2021 3 commits
    • Ben Avison's avatar
      Always implicitly include StdTools when cross-compiling · b1e26d51
      Ben Avison authored
      `AAsmModule`, `CApp`, `CLibrary` and `CModule` implicitly include various
      other shared makefile fragments to permit simpler master makefiles. However,
      when cross-compiling, they were only included when invoked from within the
      `objs` subdirectory, which in particular meant you couldn't rely on any of
      the definitions from `StdTools` when extending the `clean` rule unless you
      explicitly included it from the master makefile, thereby defeating the
      purpose of the implicit inclusion. Change them so that `StdTools` is included
      for all rules.
      b1e26d51
    • 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
      ee10b29f
    • Ben Avison's avatar
  2. 27 Jun, 2020 2 commits
    • 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
  3. 23 May, 2019 1 commit
  4. 11 Apr, 2018 1 commit
    • 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
        GNUma...
      5e83cb7e