porting-to-riscos-c
Skill4 starsChanged 8 months agoMITView on GitHub
Port C projects to RISC OS using `riscos-cport`, RISC OS makefiles, and Norcroft/RISC OS build validation. Use when a repository needs a RISC OS library or command-line port, especially when you need to create a `RISCOS/` tree, generate `Makefile,fe1` files, or repair source for the RISC OS toolchain.
In this repository47 other files it gives its agents.
- allocating-resourcesSkill
- ci-testingSkill
- creating-pull-requestsSkill
- designing-modulesSkill
- reading-assemblySkill
- riscos-commandsSkill
- riscos-desktop-fileractionSkill
- riscos-filer-likeSkill
- riscos-filesystemSkill
- riscos-graphics-convertersSkill
- riscos-network-dcistatisticsSkill
- riscos-network-resolverSkill
- riscos-outputSkill
- riscos-reSkill
- riscos-styleSkill
- riscos-throwbackSkill
- riscos-urls-fetchingSkill
- riscos-urls-launchingSkill
- riscos-wimp-appSkill
- riscos-wimpSkill
- riscos-wimp-templatesSkill
- updating-robe-skillsSkill
- using-bbcbasicSkill
- using-cmhgSkill
- using-ghSkill
- using-gitSkill
- using-libasmSkill
- using-libgcontextSkill
- using-liboslibSkill
- using-libriscoslibSkill
- using-libtoolboxSkill
- using-makefilesSkill
- using-perlSkill
- using-stronghelpSkill
- using-toolbox-imagefilegadgetSkill
- using-tooltesterSkill
- writing-assemblySkill
- writing-assembly-testsSkill
- writing-cmodulesSkill
- writing-cplusplusSkill
- writing-cSkill
- writing-fortranSkill
- writing-oslib-defsSkill
- writing-pascalSkill
- writing-prminxmlSkill
- writing-pymodulesSkill
- writing-pyromaniac-integration-testsSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 8 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Use this skill when the task is to turn a C repository into a RISC OS buildable port.
- Very specific: line 13
Prefer the repository's existing structure and let riscos-cport do the first pass.
- Very specific: line 19
Use overrides when discovery is wrong or incomplete.
- Distinctive: line 27
Prefer these switches when discovery needs help:
- Distinctive: line 36
If a repository is mainly a command-line tool, treat the command source as the important artifact:
- Distinctive: line 38
keep the command Makefile(s)
- Distinctive: line 40
add any required command-only defines or libraries explicitly
- Distinctive: line 44
Read references/porting-process.md when you need the build rules, file layout, or validation sequence.
- Distinctive: line 48
Keep edits narrow and RISC OS specific.
- Distinctive: line 49
Prefer compatibility defines and small header shims over broad rewrites.
- Distinctive: line 60
If a command fails because of an external dependency, note that separately rather than forcing the port to absorb it.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Porting To RISC OS C
Use this skill when the task is to turn a C repository into a RISC OS buildable port.
Prefer the repository's existing structure and let riscos-cport do the first pass.
Workflow
- Inspect the repository layout and detect the real entry points.
- Run
riscos-cporton the repository root. This will create Makefiles for each of the files and libraries it finds within the source directory. It will create symlinks within theRISCOS/candRISCOS/hwhich point to the original files. This should be sufficient to build the commands or libraries withriscos-amu exportorriscos-amu -f Makefile...,fe1. - Use overrides when discovery is wrong or incomplete. If the code is failing to build, there may be updates that are needed for the
riscos-cportcommand line to ignore certain files or explicitly set defines and includes. - Build the generated
RISCOS/tree withriscos-amu export. - Build any generated command makefiles with
riscos-amu -f Makefile...,fe1. - Patch source only when the Norcroft compiler or the RISC OS build model requires it.
Use The Tool
Prefer these switches when discovery needs help:
--namefor the RISC OS component/library name.--source,--header,--internal-header,--export-headerfor explicit file control.--exclude-sourceto remove sources autodiscovery picked up incorrectly.--command-sourcefor example tools and tests that containmain().--defineand--command-definefor compile-time configuration.--includeand--command-libfor extra include paths and libraries.
If a repository is mainly a command-line tool, treat the command source as the important artifact:
- keep the command Makefile(s)
- exclude unrelated sources from the command build
- add any required command-only defines or libraries explicitly
RISC OS Porting Rules
Read references/porting-process.md when you need the build rules, file layout, or validation sequence.
Source Fixes
- Keep edits narrow and RISC OS specific.
- Prefer compatibility defines and small header shims over broad rewrites.
- For RISC OS-specific changes, the define
__riscoswill be set for the platform. - For RISC OS 64-specific changes, the define
__riscos64will be set for the platform. - For feature-specific changes use a define to delineate the state (eg
ENABLE_CRYPTO).
- For RISC OS-specific changes, the define
- Preserve upstream comments and layout unless a change is required to compile.
- Rebuild after every meaningful source fix.
Validation
- Libraries:
riscos-amu export - Commands:
riscos-amu -f MakefileExample,fe1 - If a command fails because of an external dependency, note that separately rather than forcing the port to absorb it.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

