次のコマンドを使用して、cscope データベースを生成します。
tmpfile=$(mktemp)
find dir1/ dir2/ dir3/ -type f -regex ".*\.\([chlysS]\(xx\|pp\)*\|cc\|hh\|inl\|inc\|ld\)$" -print > $tmpfile
cscope -q -b -U -i $tmpfile -f cscope.out
vim では、a:cs f g myfunction
のみが C ファイルの定義につながり、ヘッダー ファイルのネザーにつながります。