I don't understand -- are you trying to build a binary? Or a library? Did you write mylib.a and now you are having problems linking it to a binary you are compiling?
With regards to:
Code:
ar rc libmngr.a $(OBJS) $(LIBS)
You can't add libraries to other libraries like that. For example:
Code:
ar rc libmngr.a object1.o object2.o library3.a
That will add all three of those files to libmngr.a, but none of the symbols in library3.a will be exported from libmngr.a because it's an archive file and not an object file. If you wanted to combine object1.o, object2.o, and library3.a into one big library you'd have to do something like:
Code:
cp library3.a libmngr.a
ar rc libmngr.a object1.o object2.o
Or even something along the lines of:
Code:
ar x library3.a
ar rc libmngr.a *.o
That would basically accomplish the goal of "libmngr.a = object1.o + object2.o + library3.a". Assuming that's what you are trying to do.