Developing custom GRASS programs
From Rhessys
As the majority of the RHESSys group is using OS X, this article targets that OS. However most of the content should apply to any operating system.
Get a compiler
Development tools are not installed by default on OS X. You can install the dev tools from any OS X installation CD. For the most recent version, go Apple's Mac Dev Center