<commit_before># Copyright (c) 2014 by <NAME>. See the LICENSE file
# for the detailed license.

CXXFLAGS = -std=c++0x -g -pthread
SORTOBJS = sorter.o sorterimpl.o diskrun.o
LINKFLAGS = -L. -lsort -lpthread

ALLTESTS = assert1 diskrun1 runstate1

.PHONY: alltests
alltests: $(ALLTESTS)
	result=0; for test in $(ALLTESTS);  do ./$$test; result=$$(($$result+$$?));  done; exit $$result

libsort.a: $(SORTOBJS) 
	$(AR) -rv $@ $^

sorter.o: sorter.h sorterimpl.h
sorterimpl.o: sorter.h sorterimpl.h runstate.h
diskrun.o: diskrun.h sortassert.h

clean:
	@rm -f *.o $(ALLTESTS) *.a

veryclean: clean
	@rm -f *~

GTEST_DIR= ../gtest
GTEST_INC = -I$(GTEST_DIR)/include
GTEST_CXXFLAGS = $(CXXFLAGS) $(GTEST_INC) -c
GTEST_LINKFLAGS = $(LINKFLAGS) -L$(GTEST_DIR)/build -lgtest_main -lgtest

assert1: assert1.o libsort.a
	$(CXX) $^ $(GTEST_LINKFLAGS) -o $@
assert1.o: assert1.cpp sortassert.h
	$(CXX) $(GTEST_CXXFLAGS) -o $@ $< 

diskrun1: diskrun1.o libsort.a
	$(CXX) $^ $(GTEST_LINKFLAGS) -o $@
diskrun1.o: diskrun1.cpp diskrun.h
	$(CXX) $(GTEST_CXXFLAGS) -o $@ $< 

runstate1: runstate1.o libsort.a
	$(CXX) $^ $(GTEST_LINKFLAGS) -o $@
runstate1.o: runstate1.cpp sorter.h
	$(CXX) $(GTEST_CXXFLAGS) -o $@ $< 

# Not currently made<commit_msg>Add 'stats' target to get line counts<commit_after># Copyright (c) 2014 by <NAME>. See the LICENSE file
# for the detailed license.

CXXFLAGS = -std=c++0x -g -pthread
SORTOBJS = sorter.o sorterimpl.o diskrun.o
LINKFLAGS = -L. -lsort -lpthread

ALLTESTS = assert1 diskrun1 runstate1

.PHONY: alltests stats
alltests: $(ALLTESTS)
	result=0; for test in $(ALLTESTS);  do ./$$test; result=$$(($$result+$$?));  done; exit $$result

libsort.a: $(SORTOBJS) 
	$(AR) -rv $@ $^

sorter.o: sorter.h sorterimpl.h
sorterimpl.o: sorter.h sorterimpl.h runstate.h
diskrun.o: diskrun.h sortassert.h

clean:
	@rm -f *.o $(ALLTESTS) *.a

veryclean: clean
	@rm -f *~

stats:
	cloc *.h *.cpp Makefile

GTEST_DIR= ../gtest
GTEST_INC = -I$(GTEST_DIR)/include
GTEST_CXXFLAGS = $(CXXFLAGS) $(GTEST_INC) -c
GTEST_LINKFLAGS = $(LINKFLAGS) -L$(GTEST_DIR)/build -lgtest_main -lgtest

assert1: assert1.o libsort.a
	$(CXX) $^ $(GTEST_LINKFLAGS) -o $@
assert1.o: assert1.cpp sortassert.h
	$(CXX) $(GTEST_CXXFLAGS) -o $@ $< 

diskrun1: diskrun1.o libsort.a
	$(CXX) $^ $(GTEST_LINKFLAGS) -o $@
diskrun1.o: diskrun1.cpp diskrun.h
	$(CXX) $(GTEST_CXXFLAGS) -o $@ $< 

runstate1: runstate1.o libsort.a
	$(CXX) $^ $(GTEST_LINKFLAGS) -o $@
runstate1.o: runstate1.cpp sorter.h
	$(CXX) $(GTEST_CXXFLAGS) -o $@ $< 

# Not currently made
{'fraction_non_alphanumeric': 0.17702970297029702, 'fraction_numerical': 0.016633663366336635, 'mean_word_length': 4.2082474226804125, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 5, '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': '268862', 'n_tokens_mistral': 1132, 'n_tokens_neox': 1055, 'n_words': 253}