• 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
CModule 16.1 KB