[LLVMdev] Makefile Question

Gregory Malecha gmalecha at eecs.harvard.edu
Thu Jul 14 17:36:15 PDT 2011


Hello,

I have a question about how to set up a Makefile that generate a .so that I
can load into opt without getting duplicate symbols. Here's what I have
right now:

LIBRARYNAME=previrt
SHARED_LIBRARY=previrt
LINK_COMPONENTS := transformUtils
LINK_LIBS_IN_SHARED=1

include $(LEVEL)/Makefile.common

LIBS += -lprotobuf

CPPFLAGS += -I${HOME}/.root/usr/include -DGOOGLE_PROTOBUF_NO_RTTI
LDFLAGS += -Wl,-L${HOME}/.root/usr/lib/
PROTOC=${HOME}/.root/usr/bin/protoc

I'm pretty sure the problem comes from LINK_LIBS_IN_SHARED, but my code
depends on the google protobuf library so I need to link against that
otherwise I get undefined symbols.

Does anyone know how to solve this problem with LLVM makefiles?

Thank you.

-- 
gregory malecha
http://www.people.fas.harvard.edu/~gmalecha/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110714/31e4c8b1/attachment.html>


More information about the llvm-dev mailing list