You can use static strings containing version information, and later run
strings against the binaries. You can even use CVS (maybe SVN too; I don't use SVN) tags embedded in your source code to automatically keep the version information up-to-date as revisions are checked out of the repository.
Code:
static char * filename_c = "\nfilename.c $Revision: 1.4 $ $Date: 2008/03/05 23:20:37 $\n";
--- rod.