I wrote the program a few weeks ago, and I had little to do on this snowy Colorado day, so I cleaned it up and posted to GitHub:
Compiling: If you’re using a Debian, sudo apt-get install libraw-dev libtiff5-dev
will get the required libraries. MSYS2 on Windows, don’t know yet (too lazy to power up the Surface 3 sitting right there… )
rawdata.cpp: 'bout as simple as I could make it, uses only libraw and libtiff, and the Makefile should handle any Linux (Ubuntu-tested) or MSYS2 on Windows (not tested yet). If Windows, you’ll need to uncomment a couple of lines in the Makefile.
raw2tiff.sh: Uses rawdata and exiftool to make a TIFF from a raw file, copy the raw file metadata to the TIFF, and if a .icc profile is specified as the third argument, also inserts that into the TIFF.
Note that the “image” is the raw data, no processing at all. No demosaic, no white balance, no crop of the unexposed borders. I’ve opened one of these in rawproc and I can develop a usable image from it; you should be able to do something similar in G’MIC.