I think this works for you:
grep -r '#define[[:space:]]*GPSVERSION[[:space:]].*' . | tr -s ' \t' '\t' | cut -f 3
grep -r : scans ALL the files in the specified directory and subdirectories
'#define[[:space:]]*GPSVERSION[[:space:]].*' : is a regexp that matches all the #define directives, ignoring the whitespacing and considering only #defines that have a value assigned to them.
Grep prints its output, then the output is passed to tr -s ' \t' '\t' which convert blanks to something suitable for cut
Finally cut -f3 prints only the desired value of the define.
It works well except: comment defines (//#define) and filenames with spaces in them.