--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -85,7 +85,7 @@ rpc_table.stamp: ${top_srcdir}/lib/rpc_t
 	@rm -f rpc_table.tmp
 	@touch rpc_table.tmp
 	@echo "[libsearpc]: generating rpc header files"
-	@PYTHON@ `which searpc-codegen.py` ${top_srcdir}/lib/rpc_table.py
+	@PYTHON@ `which searpc-codegen` ${top_srcdir}/lib/rpc_table.py
 	@echo "[libsearpc]: done"
 	@mv -f rpc_table.tmp $@
 
