Solution for cross-compiling ResourceFile macros that use LocalRes$Path
Many components' resources are laid out in a nested manner within the `Resources` directory, with appropriate files selected at build time according to the `USERIF` and `LOCALE` settings of the build. The shared makefiles already take care of this for the ROM `resources` phase using the `InstRes` perl script, and the `CModule` makefile performs a fake `resources` phase within its `standalone` phase before feeding the result to `ResGen` via the `InstViaRG` perl script. The remaining case that hasn't been dealt with until now is the `standalone` phase for `AAsmModule` components, where ResourceFS objects are embedded in the module object using the `ResourceFile` macro (and internally the `BIN` directive) which until now have specified the source filename via a path prefixed with `LocalRes:` `objasm`'s include search path isn't applied to file specs supplied to `BIN` (or `:FSIZE:` etc) so the solution presented here is a make function which searches for the resource file while interpreting the Makefile. The cross version (only) of the `AAsmModule` shared makefile automatically applies this function to any resource filenames specified in `INSTRAM_FILES` (which usually matches `INSTRES_FILES`) and passes the full path to the resource file into `objasm` using a string variable of the same name (wrapped in vertical bars to deal with cases like `!Help` which contain otherwise invalid symbol characters). `amu` doesn't implement make functions, so the assembly source should drop back to using the `LocalRes:` prefix if the string variable is undefined.
Showing with 13 additions and 0 deletions