--- tools/Rules.in
+++ tools/Rules.in
@@ -58,7 +58,7 @@
 
 $(lib-dest): $(objs)
 	rm -f $@
-	ar rcs $@ $^
+	$(subst ranlib,ar,$(RANLIB)) rcs $@ $^
 	$(RANLIB) $@
 
 else
