1. 15 May, 2021 2 commits
    • 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
  2. 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
  3. 10 Sep, 2020 1 commit
    • 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
  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
  5. 12 Mar, 2018 1 commit
    • Ben Avison's avatar
      Changes to keep GNUmakefiles and Makefiles compatible · d8eeed92
      Ben Avison authored
      Detail:
        GNUmakefiles/AAsmModule:
        * Adopt same extensible syntax for describing resources phase files as CModule (see BuildSys 6.91)
        GNUmakefiles/AppLibs:
        * Don't permit CALLXLIB to be used for application builds (see BuildSys 6.61)
        * Reflect MODMALLOCLIB leafname change (see BuildSys 6.61)
        * Add TBOXINTLIB, TBOXINTDBGLIB, PDEBUGLIB, PRISMLIB, REMOTEDBLIB, TRACELIB, UNICODELIB and include more libs in DEBUGLIBS (see BuildSys 6.63)
        GNUmakefiles/CApp:
        * Add install_debug_app rule for debug app installations (see BuildSys 6.53)
        GNUmakefiles/CLibrary:
        * Allow additional dependencies to be specified using LIB_DEPENDS (see BuildSys 6.63)
        * Gains install target (see BuildSys 7.15)
        GNUmakefiles/StdTools:
        * Add shell implementation of FAppend (see BuildSys 6.45) - compatible except for the fact that the destination is given current timestamp
        * ${NOP} no longer implicitly includes the silent-command prefix character @ (see BuildSys 6.5...
      d8eeed92
  6. 11 Nov, 2013 1 commit
    • Ben Avison's avatar
      Changes to keep GNUmakefiles and Makefiles compatible · 3542e171
      Ben Avison authored
      Detail:
        Makefiles/CApp:
        * 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
        Makefiles/CLibrary:
        * Naming of object file variables rationalised in line with CModule
        Makefiles/CModule:
        * Removed unused variable OBJS_
        Makefiles/StdTools:
        * Retired TIDYDESC
        GNUmakefiles/AppLibs:
        * Add CONLIB, RMVSN, SYNCLIB
        GNUmakefiles/CApp:
        * 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)
        * Rename of INSTALLAPPFILES to INSTAPP_FILES
        * Rename of INSTALLAPP_DEPEND to INSTAPP_DEPENDS
        * 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
        GNUmakefiles/CLibrary:
        * 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
        GNUmakefiles/StdTools:
        * 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
          Makefiles
      Admin:
        Tested in a CTools build
      
      Version 6.32. Tagged as 'BuildSys-6_32'
      3542e171
  7. 05 Feb, 2012 1 commit
  8. 12 Sep, 2011 1 commit
    • Ben Avison's avatar
      Fixes to shared makefiles · 70323f40
      Ben Avison authored
      Detail:
        The change which permitted top-level makefiles to include only CApp,
        CModule etc accidentally broke makefiles which included HostTools (StdTools
        got included instead and overwrote the HostTools settings). Amazingly, we
        seem to have got away with this so far - but fixed now. Also, brought the
        GNUmakefiles versions in line with updates to the amu Makefiles in this
        and other respects.
      Admin:
        Tested in a RISC OS ROM build, and for building cross-compiling versions
        of the tools.
      
      Version 5.21. Tagged as 'BuildSys-5_21'
      70323f40
  9. 20 Oct, 2010 1 commit
    • Ben Avison's avatar
      Makefile bugfixes, and support for latest CTools build · e15324c6
      Ben Avison authored
      Detail:
        * Fixed dependencies for debug builds in GNUmakefiles/CApp
        * Added -f switch to rm in GNUmakefiles/StdTools to make it fail silently
          if the file doesn't exist, like the RISC OS version
        * Fix for amu complaining if INSTTYPE is undefined in Makefiles/CApp
        * Reflected makefile changes in resgen, squeeze and xpand in CTools
          component file
        * Added a8time to ModuleDB and CTools component file
      Admin:
        Tested in  a C Tools build
      
      Version 5.03. Tagged as 'BuildSys-5_03'
      e15324c6
  10. 19 May, 2010 1 commit
    • Ben Avison's avatar
      Changes to facilitate platform independence. · 4477e695
      Ben Avison authored
      Detail:
       CApp:
        * New variable CLEAN_DEPEND is now the preferred way to specify additional
          clean actions because GNU make doesn't have an equivalent to amu's :: rules
        * Can now indicate preference to use C++ linker options using LINK_TYPE
        * Gains install phase support:
          + INSTALLAPPFILES lists the files to be copied, effectively specified
            relative to LocalRes$Path
          + Adopted INSTTYPE concept from DDE makefiles for cases where executable
            and support files need to be installed to different locations
          + Unusual cases can override this implementation using CUSTOMINSTALLAPP
            and/or CUSTOMINSTALLTOOL
      
        CLibrary:
        * New variable CLEAN_DEPEND is now the preferred way to specify additional
          clean actions because GNU make doesn't have an equivalent to amu's :: rules
        * -o is no longer a mandatory argument to libfile - now in ARFLAGS rather
          than used explicitly
      
        DbgRules / StdRules:
        * Macroised some Norcroft-specific features
      
        HostTools:
        * Clean phase support was incomplete
      
        StdTools:
        * A few additional tool definitions
        * Added macro definitions for common C options
        * C's enable-warnings and suppress-function-name-embedding options now on by
          default because they're usually (maybe even universally?) used - it won't
          hurt if they're specified again by existing makefiles
        * C++ now has equivalent INCLUDES and DEFINES variables, and the standard C++
          headers are on the default include path
        * SEP is defined as the directory separator character and can be used from
          top-level makefiles in a platform-independent way
      
        Functionally equivalent versions of the following makefile fragments
        have been developed so far for executing on a Posix build host:
          AppLibs, CApp, CLibrary, DbgRules, HostTools, StdRules, StdTools
        These suport native compilers (when APCS=Host) and cross-compilers,
        and GCC (when TOOLCHAIN=GNU) and Norcroft toolchains - typically these
        environment variables would be selected by running an Env file.
      
      Admin:
        Tested by building as many as possible of the DDE components on RISC OS
        and on Linux, using native and cross compilers, and using Norcroft and
        GNU toolchains.
      
      Version 5.01. Tagged as 'BuildSys-5_01'
      4477e695