[LLVMdev] Automake and llvm-config

Török Edwin edwintorok at gmail.com
Fri May 8 05:45:30 PDT 2009

On 2009-05-08 11:40, Andrii Vasyliev wrote:
> Hello,
> I'm using autotools to build my little lang.
> So I want to have something like this in my Makefile.am:
> mylang_SOURCES = mylang.cpp
> mylang_LDADD = mylib.a `llvm-config --cppflags --ldflags --libs core
> jit native ipo`
> But automake complains:
> tools/Makefile.am:8: linker flags such as `--cppflags' belong in `mylang_LDFLAGS

Why not do what automake told you to do?
mylang_LDFLAGS=`llvm-config --ldflags core`
mylang_LDADD=mylib.a `llvm-config --libs core`
AM_CPPFLAGS=`llvm-config --cppflags`

Best regards,

More information about the llvm-dev mailing list