diff -b -r -w <DIR1> <DIR2> -N -x ‘*.o’ -x ‘*.cmd’ -x ‘*.builtin’ -x ‘*.order’ > g_ncm.patch
The -N option copies into the .patch files that exists in only one of the directory.
`-b' Ignore changes in amount of white space. See White Space. `-B' Ignore changes that just insert or delete blank lines. See Blank Lines. `-r' When comparing directories, recursively compare any subdirectories found. See Comparing Directories. `-w' Ignore white space when comparing lines. See White Space. `-N' `--new-file' In directory comparison, if a file is found in only one directory, treat it as present but empty in the other directory. `-x PATTERN' When comparing directories, ignore files and subdirectories whose basenames match PATTERN. See Comparing Directories.