Ok , so this is gonna be really clunky, really tricky, etc.
First off, there's no real way to do this other than a cron job, which basically is a task that runs at a specified interval.
https://ostechnix.com/a-beginners-guide-to-cron-jobs/
As for the script, you could have it do something like:
ls /directory/path/goes/here | grep "*.c" | xargs c99 -c
Or else you could customize it further. These will compile your files into "object files" which you then need to link
There are some downsides to this:
1. It can't tell if a file is complete or not, so you may end up with partially compiled trash, and if you miss the interval, you need to come around again on the next one.
2. Crons are very CPU intensive, so at best I'd run this every 2 mins or so to give the CPU some time to rest - doing something stupid like every 30 seconds is wasteful compute-wise.
3. You are limited to single .c files, no libraries, no h files etc.
libxg is a pretty simple project:
http://gitea.irixce.org/Raion/libxg
notice that the Makefile has to build each obj file, compile static libs (.a files) and shared files (.so files), and clean up and handle things. These are not things you can just idly hand off to automation, especially on an OS that's a bit more primitive.
You may be able to pull something off more clever and less clunky using Python, but that's even less efficient on IRIX.
I can't say I recommend this.
I'm the system admin of this site. Private security technician, licensed locksmith, hack of a c developer and vintage computer enthusiast.
https://contrib.irixnet.org/raion/ -- contributions and pieces that I'm working on currently.
https://codeberg.org/SolusRaion -- Code repos I control
Technical problems should be sent my way.