fix rebuild target in Makefile
remove C-style UINT_MAX, add endpoint for distance table API