1. 15 May, 2021 24 commits
    • Ben Avison's avatar
      Support links for extension-less files in subdirectories · 9b0aed8c
      Ben Avison authored
      This only applies to cross-compilation builds. The `make links` rules don't
      know a pre-determined list of subdirectories that need to be converted into
      filename extensions. Instead, files that should have no filename extension
      are usually simply identified by the absence of a `/` in their specification
      in `SOURCES_TO_SYMLINK`. However, this is insufficient to handle some rarer
      cases, such as a `Makefile` within a `Test` subdirectory.
      
      To handle this, we introduce explicit support for specifying such files in
      `SOURCES_TO_SYMLINK`, using a double slash where there would otherwise be a
      filetype subdirectory name, such as `Test//Makefile`. (Conveniently, this is
      also valid Posix filename syntax anyway.) The way this is achieved is to
      tweak the regular expressions to require the directory and leafnames between
      slashes to be at least one character long.
      
      Version 7.58. Tagged as 'BuildSys-7_58'
      9b0aed8c
    • Ben Avison's avatar
      Define `export` rule for `CApp` shared makefile · 7118b699
      Ben Avison authored
      With GNU `make` unlike with `amu`, it is considered an error to make a target
      for which no rule is defined. Therefore we need an explicit no-op `export`
      rule in the cross-compiling `CApp` makefile.
      7118b699
    • 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
      Pass `-tgcc` to `cmunge` · f3add28d
      Ben Avison authored
      This tells it to use gcc for preprocessing the CMHG file (if enabled) and
      asasm for the backend (which means the object file is an ELF file, required
      in order to link with GCC objects).
      f3add28d
    • Ben Avison's avatar
      Allow cross-compile C++FLAGS to be inherited from environment · b2eb8ff6
      Ben Avison authored
      Occasionally, it is useful to be able to set C++FLAGS from the calling
      environment, for example when building a 32-bit x86 target from a 64-bit
      x86-64 host. This works fine for CFLAGS and LDFLAGS, but C++FLAGS is not a
      valid Posix environment variable name. Import setting from CXXFLAGS instead
      when cross-compiling.
      b2eb8ff6
    • Ben Avison's avatar
      Correct capitalisation of AsmUtilszm library · 7733fdc5
      Ben Avison authored
      7733fdc5
    • Ben Avison's avatar
    • Ben Avison's avatar
      Tweak definition of `${MAKE}` when cross-compiling · 64010501
      Ben Avison authored
      When executing the makefile from within the `objs` directory, this now
      includes an implicit `-C..` option. This makes it simpler to write agnostic
      makefiles. For example,
      
      	${MAKE} -f other${EXT}mk other_target
      
      rather than
      
      ifeq (,${MAKE_VERSION})
      	${MAKE} -f other/mk other_target
      else
      	${MAKE} -f ../other.mk other_target
      endif
      64010501
    • Ben Avison's avatar
      Compatibility fix for amu < 5.32 · b0848633
      Ben Avison authored
      Earlier versions couldn't cope with RES_OBJ being set to an empty string.
      b0848633
    • Timothy E Baldwin's avatar
      Define PARENT · 4f35a3e7
      Timothy E Baldwin authored
      This allows makefiles to refer to the parent directory in an OS-neutral way.
      4f35a3e7
    • 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
    • Ben Avison's avatar
      Define SUFFIX_PERL · bf28bf7a
      Ben Avison authored
      This allows Perl files with filetype 102 to be referenced identically whether
      native or cross-compiling (it expands to an empty string when used natively).
      bf28bf7a
    • Ben Avison's avatar
      Permit makefiles using CLibrary to cross-compile `export` target · 6ffb78b8
      Ben Avison authored
      This brings it into line with AAsmModule and CModule shared makefiles
      6ffb78b8
    • Ben Avison's avatar
      Define Tokenise tool for cross-compilation · 3e39f8da
      Ben Avison authored
      There are at least 19 components that use this tool to autogenerate a source
      file. Needs initial capitalisation on case-sensitive filesystems.
      3e39f8da
    • Ben Avison's avatar
      614326fc
    • Ben Avison's avatar
    • Ben Avison's avatar
    • Ben Avison's avatar
      Define cross-platform specifier for -Itbox: · 1e58a98d
      Ben Avison authored
      Use `${TBOXINC}` instead.
      1e58a98d
    • Ben Avison's avatar
      Define cross-platform specifier for -ITCPIPLibs: · def85aec
      Ben Avison authored
      Use `${TCPIPINC}` instead. Although there is only a single directory
      on TCPIPLibs$Path, all ported BSD sockets code assumes their headers are
      already directly on the include path.
      def85aec
    • Ben Avison's avatar
      Support application and module targets with differing compiler flags · a7947759
      Ben Avison authored
      Typically useful for libraries where you have both types of target, and you
      want the application build to contain function names (for meaningful
      backtraces) but the module build not to (to save ROM space). This is
      achieved as follows:
      
      * CAPPFLAGS and CMODFLAGS contain additional flags to be passed to application
        and module builds, respectively
      
      * C_FNAMES is initialised to a compiler-agnostic build switch to enable
        function names in the binary
      
      Therefore a master makefile will often use the line
      CAPPFLAGS = ${C_FNAMES}
      although CAPPFLAGS and CMODFLAGS are not limited to this usage.
      a7947759
    • Ben Avison's avatar
      Allow components using CLibrary shared Makefile to specify additional exports · 51f761a1
      Ben Avison authored
      Occasionally, a library needs to export additional files that don't live in
      either an h or hdr directory and (when cross compiling) shouldn't have a
      .h suffix added to their exported version. A typical example would be where
      the licence conditions of the library require a licence header to be attached
      to all copies. To achieve this, CLibrary now uses EXPORTS in a similar manner
      to how AAsmModule does, simply as a dependency of export_hdrs, which can
      expand to any additional targets you need to define. By default, it overrides
      the internal targets EXPORTING_HDRS and EXPORTING_ASMHDRS (derived from
      HDRS and ASMHDRS supplied by the master makefile), but you can always include
      them in your definition of EXPORTS if desired.
      51f761a1
    • Ben Avison's avatar
      Split library include paths into separate included Makefile · bc6cf22d
      Ben Avison authored
      This de-duplicates some of the information from AppLibs and ModuleLibs,
      which now include the new Makefile fragment in order to ensure compatibility.
      It also means that the definitions can be used for building other library
      components, which by definition do not perform a link step, without having
      to choose either AppLibs or ModuleLibs when most of either one is unused for
      a library build.
      bc6cf22d
    • Ben Avison's avatar
  2. 19 Apr, 2021 5 commits
  3. 24 Feb, 2021 2 commits
  4. 21 Dec, 2020 1 commit
  5. 23 Nov, 2020 1 commit
  6. 07 Nov, 2020 1 commit
  7. 28 Oct, 2020 1 commit
    • Robert Sprowson's avatar
      Fix to module-wrapped LIBS SYMS · b1350268
      Robert Sprowson authored
      Exercising the new library/symbols selector on a more complex case (Help2) showed that the selection never triggered, because where it is placed ${RLIB} is unset.
      Move the test to after ModuleLibs/AppLibs are set, and invert the sense (it should have been ifneq).
      
      Version 7.52. Tagged as 'BuildSys-7_52'
      b1350268
  8. 24 Oct, 2020 1 commit
    • ROOL's avatar
      Add RMVersion · 887191e2
      ROOL authored
      To CTools, for Installer, fixes build as for BuildSys-7_48.
      
      Version 7.51. Tagged as 'BuildSys-7_51'
      887191e2
  9. 10 Sep, 2020 3 commits
    • 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
    • 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
    • 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
  10. 20 Jul, 2020 1 commit
    • 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