[libsnark] Use POSIX-compliant ar arguments

This commit is contained in:
Jack Grigg 2017-10-29 22:34:08 +13:00
parent daad2c2736
commit d3096198c8
No known key found for this signature in database
GPG Key ID: 665DBCD284F7DAFF
1 changed files with 2 additions and 7 deletions

View File

@ -198,13 +198,8 @@ $(LIBGTEST_A): $(GTESTDIR)/src/gtest-all.cc $(DEPINST_EXISTS)
# libsnark.a will contains all of our relevant object files, and we also mash in the .a files of relevant dependencies built by ./prepare-depends.sh
$(LIBSNARK_A): $(LIB_OBJS) $(AR_LIBS)
( \
echo "create $(LIBSNARK_A)"; \
echo "addmod $(LIB_OBJS)"; \
if [ -n "$(AR_LIBS)" ]; then for AR_LIB in $(AR_LIBS); do echo addlib $$AR_LIB; done; fi; \
echo "save"; \
echo "end"; \
) | $(AR) -M
$(AR) q $(LIBSNARK_A) $(LIB_OBJS)
if [ -n "$(AR_LIBS)" ]; then mkdir -p tmp-ar; cd tmp-ar; for AR_LIB in $(AR_LIBS); do $(AR) x $$AR_LIB; done; $(AR) qc $(LIBSNARK_A) tmp-ar/*; cd ..; rm -r tmp-ar; fi;
$(AR) s $(LIBSNARK_A)
libsnark.so: $(LIBSNARK_A) $(DEPINST_EXISTS)