Usually

gcc  -shared -fPIC parse.c scanner.c -ltree-sitter  -o libtree-sitter-$lang.so

can generate the so file you need