<commit_before>.PHONY: all clean

# llvm build (http://clang.llvm.org/get_started.html):
#
# svn co http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_33/final llvm
# cd llvm/tools
# svn co http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_33/final clang
# cd ../..
# cd llvm/projects
# svn co http://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_33/final compiler-rt
# cd ../..
# mkdir build
# cd build
# ../llvm/configure --prefix=$HOME/local/llvm-3.3 --enable-optimized --enable-cxx11
# make
# make install
#

CONFIG=$(HOME)/local/llvm-3.3/bin/llvm-config

CXX=$(shell $(CONFIG) --bindir)/clang++
CXXFLAGS=$(shell $(CONFIG) --cxxflags) -std=c++11 -O2
LDFLAGS=$(shell $(CONFIG) --ldflags)

CLANGLIBS=\
	-lclang \
	-lclangTooling \
	-lclangFrontendTool \
	-lclangFrontend \
	-lclangParse \
	-lclangSema \
	-lclangStaticAnalyzerFrontend \
	-lclangStaticAnalyzerCheckers \
	-lclangStaticAnalyzerCore \
	-lclangAnalysis \
	-lclangARCMigrate \
	-lclangEdit \
	-lclangAST \
	-lclangASTMatchers \
	-lclangLex \
	-lclangDriver \
	-lclangSerialization \
	-lclangRewriteCore \
	-lclangCodeGen \
	-lclangRewriteFrontend \
	-lclangBasic

LIBS=\
	-L$(shell $(CONFIG) --libdir) \
	$(CLANGLIBS) \
	$(shell $(CONFIG) --libs core cppbackend cppbackendinfo bitreader mcparser)

all : metrics
#all : metrics ctest tool matcher

metrics : metrics.o
	$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)

matcher : matcher.o
	$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)

ctest : ctest.o
	$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)

tool : tool.o
	$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)

clean :
	rm -f *.o
	rm -f ctest tool matcher metrics

%.o : %.cpp
	$(CXX) $(CXXFLAGS) -o $@ -c $<

<commit_msg>bug fix: Makefile contained an obsolete target.<commit_after>.PHONY: all clean

# llvm build (http://clang.llvm.org/get_started.html):
#
# svn co http://llvm.org/svn/llvm-project/llvm/tags/RELEASE_33/final llvm
# cd llvm/tools
# svn co http://llvm.org/svn/llvm-project/cfe/tags/RELEASE_33/final clang
# cd ../..
# cd llvm/projects
# svn co http://llvm.org/svn/llvm-project/compiler-rt/tags/RELEASE_33/final compiler-rt
# cd ../..
# mkdir build
# cd build
# ../llvm/configure --prefix=$HOME/local/llvm-3.3 --enable-optimized --enable-cxx11
# make
# make install
#

CONFIG=$(HOME)/local/llvm-3.3/bin/llvm-config

CXX=$(shell $(CONFIG) --bindir)/clang++
CXXFLAGS=$(shell $(CONFIG) --cxxflags) -std=c++11 -O2
LDFLAGS=$(shell $(CONFIG) --ldflags)

CLANGLIBS=\
	-lclang \
	-lclangTooling \
	-lclangFrontendTool \
	-lclangFrontend \
	-lclangParse \
	-lclangSema \
	-lclangStaticAnalyzerFrontend \
	-lclangStaticAnalyzerCheckers \
	-lclangStaticAnalyzerCore \
	-lclangAnalysis \
	-lclangARCMigrate \
	-lclangEdit \
	-lclangAST \
	-lclangASTMatchers \
	-lclangLex \
	-lclangDriver \
	-lclangSerialization \
	-lclangRewriteCore \
	-lclangCodeGen \
	-lclangRewriteFrontend \
	-lclangBasic

LIBS=\
	-L$(shell $(CONFIG) --libdir) \
	$(CLANGLIBS) \
	$(shell $(CONFIG) --libs core cppbackend cppbackendinfo bitreader mcparser)

all : ctest tool matcher

metrics : metrics.o
	$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)

matcher : matcher.o
	$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)

ctest : ctest.o
	$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)

tool : tool.o
	$(CXX) -o $@ $^ $(LIBS) $(LDFLAGS)

clean :
	rm -f *.o
	rm -f ctest tool matcher

%.o : %.cpp
	$(CXX) $(CXXFLAGS) -o $@ -c $<


{'fraction_non_alphanumeric': 0.18038262982083206, 'fraction_numerical': 0.009110233829334954, 'mean_word_length': 3.3399209486166006, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '688791', 'n_tokens_mistral': 1429, 'n_tokens_neox': 1362, 'n_words': 260}