citrun

watch C/C++ source code execute
Log | Files | Refs | LICENSE

commit 5f6d87bcf72f3ed33b80a77448bdee546e6072ee
parent 713bd1c5209fc9584b4bc121b6d245c8c447397c
Author: Kyle Milz <kyle@getaddrinfo.net>
Date:   Thu, 17 Mar 2016 18:59:36 -0600

instrument: use llvm-config in Makefile

Diffstat:
Minstrument/Makefile | 25++++++++-----------------
1 file changed, 8 insertions(+), 17 deletions(-)

diff --git a/instrument/Makefile b/instrument/Makefile @@ -1,15 +1,9 @@ PROG = scv_instrument SRCS = main.cxx instrumenter.cxx -CXX = eg++ -CXXFLAGS += -std=c++11 -CXXFLAGS += -I/usr/local/include -CXXFLAGS += -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -CXXFLAGS += -fno-rtti -Wall -# CXXFLAGS += -ggdb -DDEBUG - -# OpenBSD has it's third part libraries here -LDFLAGS += -L/usr/local/lib +CXX = clang++ +CXXFLAGS = `llvm-config --cxxflags` +LDFLAGS += `llvm-config --ldflags` # Clang has a circular dependencies here, use "linker group options" to avoid LDADD += -Wl,--start-group \ @@ -28,13 +22,10 @@ LDADD += -Wl,--start-group \ -lclangSerialization \ -lclangTooling \ -Wl,--end-group \ - -lLLVMOption \ - -lLLVMMCParser \ - -lLLVMTransformUtils \ - -lLLVMMC \ - -lLLVMBitReader \ - -lLLVMCore \ - -lLLVMSupport \ - -lpthread -lz + +LDADD += `llvm-config --libs bitreader` +LDADD += `llvm-config --libs mcparser` +LDADD += `llvm-config --libs option` +LDADD += `llvm-config --system-libs` .include <bsd.prog.mk>