Essentially, what I want to do is this:
gcc foo.c -o foo.o ar rcs foo.a foo.o gcc bar.c -o boo.o ar rcs bar.a bar.o foo.a
I want to archive
ar rcs foo.a foo.o cp foo.a foo2.a gcc -c bar.c ar rs foo2.a bar.o
And perhaps use foo.a instead of foo2.a if you don't need to keep it in its original form.
foo.a
foo2.a