For some reason, llvm-config includes system libraries as part of
--ldflags instead of --libs. Since some of the libraries in
CLANG_LIBS may depend on the system libraries, we need to make
sure those system libraries are (also) listed after CLANG_LIBS.
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
extract_interface_LDADD = \
-lclangFrontend -lclangSerialization -lclangParse -lclangSema \
-lclangAnalysis -lclangAST -lclangLex -lclangBasic -lclangDriver \
- $(CLANG_LIBS)
+ $(CLANG_LIBS) $(CLANG_LDFLAGS)
test: extract_interface
./extract_interface$(EXEEXT) $(INCLUDES) $(srcdir)/all.h