Extend `CApp` to support module-wrapped applications
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
.