<commit_before>CC=g++
CCFLAGS=-std=c++17 -Wall -Wextra -pthread
INCLUDE=-Iinclude

CC_SANITIZER_1_FLAGS=-fsanitize=address,undefined -fno-omit-frame-pointer
CC_SANITIZER_2_FLAGS=-fsanitize=thread

.PHONY: all
.DEFAULT_GOAL := all

all: clean example test

# Download catch2 header
download:
ifeq (,$(wildcard ./tests/catch2/catch2.hpp))
	mkdir -p tests/catch2 && \
	wget -O tests/catch2/catch2.hpp https://raw.githubusercontent.com/catchorg/Catch2/v2.x/single_include/catch2/catch.hpp
endif

# Build unit tests and compile tests
test: download
	$(CC) $(CCFLAGS) $(CC_SANITIZER_1_FLAGS) $(INCLUDE) tests/compiles_good.cpp -o build/good-address-undefined
	$(CC) $(CCFLAGS) $(CC_SANITIZER_2_FLAGS) $(INCLUDE) tests/compiles_good.cpp -o build/good-thread
	$(CC) $(CCFLAGS) -fprofile-arcs -ftest-coverage $(INCLUDE) -Itests tests/catch_main.cpp tests/index_table_test.cpp tests/atomic_queue_test.cpp \
	tests/work_item_test.cpp tests/spinlock_test.cpp tests/scheduler_test.cpp -o build/unit-tests

# Build example
example:
	$(CC) $(CCFLAGS) $(INCLUDE) src/main.cpp -o build/example

clean:
	rm -rf build/*
	rm -rf tests/catch2
<commit_msg>Fix makefile prerequisites<commit_after>CC=g++
CCFLAGS=-std=c++17 -Wall -Wextra -pthread
INCLUDE=-Iinclude

CC_SANITIZER_1_FLAGS=-fsanitize=address,undefined -fno-omit-frame-pointer
CC_SANITIZER_2_FLAGS=-fsanitize=thread

.PHONY: all
.DEFAULT_GOAL := all

all: example test

# Download catch2 header
download:
ifeq (,$(wildcard ./tests/catch2/catch2.hpp))
	mkdir -p tests/catch2 && \
	wget -O tests/catch2/catch2.hpp https://raw.githubusercontent.com/catchorg/Catch2/v2.x/single_include/catch2/catch.hpp
endif

# Build unit tests and compile tests
test: download
	$(CC) $(CCFLAGS) $(CC_SANITIZER_1_FLAGS) $(INCLUDE) tests/compiles_good.cpp -o build/good-address-undefined
	$(CC) $(CCFLAGS) $(CC_SANITIZER_2_FLAGS) $(INCLUDE) tests/compiles_good.cpp -o build/good-thread
	$(CC) $(CCFLAGS) -fprofile-arcs -ftest-coverage $(INCLUDE) -Itests tests/catch_main.cpp tests/index_table_test.cpp tests/atomic_queue_test.cpp \
	tests/work_item_test.cpp tests/spinlock_test.cpp tests/scheduler_test.cpp -o build/unit-tests

# Build example
example:
	$(CC) $(CCFLAGS) $(INCLUDE) src/main.cpp -o build/example

clean:
	rm -rf build/*
	rm -rf tests/catch2

{'fraction_non_alphanumeric': 0.13714285714285715, 'fraction_numerical': 0.014065934065934066, 'mean_word_length': 5.151351351351352, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4052414', 'n_tokens_mistral': 888, 'n_tokens_neox': 861, 'n_words': 169}