Commit 0c01d80a09b0908856d5494d3c7ac7e6d22f1126

Shawn O. Pearce 2008-12-31T13:38:47

Run ranlib on libgit2.a after archiving it Some linkers require ranlib to build a symbol table on the archive in order to work with it. Most platforms that don't have this requirement permit ranlib as a noop. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/Makefile b/Makefile
index 850cf44..e5aedc0 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
 all::
 
 DOXYGEN = doxygen
+RANLIB  = ranlib
 
 prefix=/usr/local
 
@@ -71,6 +72,7 @@ $(OBJS): $(HDRS)
 $(GIT_LIB): $(OBJS)
 	rm -f $(LIB)
 	$(AR) cr $(GIT_LIB) $(OBJS)
+	$(RANLIB) $(GIT_LIB)
 
 T_HDR         = tests/test_lib.h
 T_LIB         = tests/test_lib.o