views:

49

answers:

2

I am compiling a library (http://www.antisphere.com/Wiki/tools:anttweakbar) but issuing "make" with its included makefile on my mac produces a dynamic library (.dylib). I would much rather have a static library so that I can deploy it with my app. Is it easy/possible to translate the flags in the makefile to produce a static library?

It seems that "make" is just compiling and linking some C/C++ code.

+1  A: 

I have bad news for you. This probably prevents you from doing what you want.

jkerian
Just because @mangledorf can't build a completely static binary doesn't mean he's unable to build a static library.
Jack Kelly
+1  A: 

It doesn't look like it's building the objects with any dylib-specific compilation flags, so you could just do the library build manually with something like:

make && ar cru libAntTweakBar.a && ranlib libAntTweakBar.a
Jack Kelly
This was more or less the solution, though linking to the static library I created was a bit tricky. Here's my final solution for this particular library: http://www.alecjacobson.com/weblog/?p=1370
mangledorf