Skip to content

Instantly share code, notes, and snippets.

@kylemcdonald
Created January 5, 2012 16:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylemcdonald/1566087 to your computer and use it in GitHub Desktop.
Save kylemcdonald/1566087 to your computer and use it in GitHub Desktop.
Combine all static libraries in the current directory into a single static library.
#!/bin/bash
read -p "Enter the name for the combined library: " name
for f in *.a
do
/usr/bin/ar x $f
done
rm *SYMDEF*
/usr/bin/ar rcs $name *.o
rm *.o
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment