<commit_before>CXX ?= g++
CC  ?= gcc

CCFLAGS += -O2 -Wall
CXXFLAGS += -O2 -Wall

CXXFLAGS += -Iinclude

OBJDIR := build

all: compile

compile: $(OBJDIR)/main

test: $(OBJDIR)/test_runner
	./$(OBJDIR)/test_runner

$(OBJDIR)/src:
	mkdir -p $@

$(OBJDIR)/tests:
	mkdir -p $@

$(OBJDIR)/%.o: %.cpp
	${CXX} ${CXXFLAGS} -c -o $@ $<

$(OBJDIR)/%: $(OBJDIR)/%.o
	${CXX} ${CXXFLAGS} ${LDFLAGS} -c -o $@ $<

$(OBJDIR)/main: $(OBJDIR)/src/main.o $(OBJDIR)/src/truss.o
	${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ $^

$(OBJDIR)/test_runner: $(OBJDIR)/tests/test_suite.o $(OBJDIR)/src/truss.o $(OBJDIR)/tests/truss_one_test.o $(OBJDIR)/tests/truss_two_test.o $(OBJDIR)/tests/truss_three_test.o
	${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ $^

$(OBJDIR)/src/main.o: src/main.cpp include/truss.h | $(OBJDIR)/src
$(OBJDIR)/src/truss.o: src/truss.cpp include/truss.h | $(OBJDIR)/src
$(OBJDIR)/tests/test_suite.o: tests/test_suite.cpp tests/truss_test.h | $(OBJDIR)/tests
$(OBJDIR)/tests/truss_one_test.o: tests/truss_one_test.cpp tests/truss_test.h | $(OBJDIR)/tests
$(OBJDIR)/tests/truss_two_test.o: tests/truss_two_test.cpp tests/truss_test.h | $(OBJDIR)/tests
$(OBJDIR)/tests/truss_three_test.o: tests/truss_three_test.cpp tests/truss_test.h | $(OBJDIR)/tests

clean:
	rm -rf $(OBJDIR)/*/*.o $(OBJDIR)/main $(OBJDIR)/test_runner

.PHONY: all compile test clean<commit_msg>Remove complete build directory during a clean<commit_after>CXX ?= g++
CC  ?= gcc

CCFLAGS += -O2 -Wall
CXXFLAGS += -O2 -Wall

CXXFLAGS += -Iinclude

OBJDIR := build

all: compile

compile: $(OBJDIR)/main

test: $(OBJDIR)/test_runner
	./$(OBJDIR)/test_runner

$(OBJDIR)/src:
	mkdir -p $@

$(OBJDIR)/tests:
	mkdir -p $@

$(OBJDIR)/%.o: %.cpp
	${CXX} ${CXXFLAGS} -c -o $@ $<

$(OBJDIR)/%: $(OBJDIR)/%.o
	${CXX} ${CXXFLAGS} ${LDFLAGS} -c -o $@ $<

$(OBJDIR)/main: $(OBJDIR)/src/main.o $(OBJDIR)/src/truss.o
	${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ $^

$(OBJDIR)/test_runner: $(OBJDIR)/tests/test_suite.o $(OBJDIR)/src/truss.o $(OBJDIR)/tests/truss_one_test.o $(OBJDIR)/tests/truss_two_test.o $(OBJDIR)/tests/truss_three_test.o
	${CXX} ${CXXFLAGS} ${LDFLAGS} -o $@ $^

$(OBJDIR)/src/main.o: src/main.cpp include/truss.h | $(OBJDIR)/src
$(OBJDIR)/src/truss.o: src/truss.cpp include/truss.h | $(OBJDIR)/src
$(OBJDIR)/tests/test_suite.o: tests/test_suite.cpp tests/truss_test.h | $(OBJDIR)/tests
$(OBJDIR)/tests/truss_one_test.o: tests/truss_one_test.cpp tests/truss_test.h | $(OBJDIR)/tests
$(OBJDIR)/tests/truss_two_test.o: tests/truss_two_test.cpp tests/truss_test.h | $(OBJDIR)/tests
$(OBJDIR)/tests/truss_three_test.o: tests/truss_three_test.cpp tests/truss_test.h | $(OBJDIR)/tests

clean:
	rm -rf $(OBJDIR)

.PHONY: all compile test clean
{'fraction_non_alphanumeric': 0.21844660194174756, 'fraction_numerical': 0.0014936519790888724, 'mean_word_length': 4.558091286307054, 'pattern_counts': {'":': 0, '<': 7, '<?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': '991894', 'n_tokens_mistral': 1224, 'n_tokens_neox': 1111, 'n_words': 187}