This program should be easy to port to Pitrex. I've simplified the build procedure and the file main-pitrex.c should be the only one that needs modification to be system-specific.