<commit_before>ifndef CC
  CC = gcc
endif

CFLAGS = -Wall -Wextra
LIBFLAGS = -L. -lstrbuf -lz

ifdef DEBUG
	OPT = -O0 -DDEBUG=1 --debug -g -ggdb
else
	OPT = -O3 -flto
endif

all: libstrbuf.a strbuf_test

string_buffer.o: string_buffer.c string_buffer.h stream_buffer.h
	$(CC) $(CFLAGS) $(OPT) -fPIC -c string_buffer.c -o string_buffer.o

libstrbuf.a: string_buffer.o
	ar -csru libstrbuf.a string_buffer.o

strbuf_test: strbuf_test.c libstrbuf.a
	$(CC) $(CFLAGS) $(OPT) strbuf_test.c -o strbuf_test $(LIBFLAGS)

clean:
	rm -rf string_buffer.o libstrbuf.a strbuf_test *.dSYM *.greg
	rm -rf tmp.strbuf.*.txt tmp.strbuf.*.txt.gz

.PHONY: all clean<commit_msg>Added 'make test'<commit_after>ifndef CC
  CC = gcc
endif

CFLAGS = -Wall -Wextra
LIBFLAGS = -L. -lstrbuf -lz

ifdef DEBUG
	OPT = -O0 -DDEBUG=1 --debug -g -ggdb
else
	OPT = -O3 -flto
endif

all: libstrbuf.a strbuf_test

string_buffer.o: string_buffer.c string_buffer.h stream_buffer.h
	$(CC) $(CFLAGS) $(OPT) -fPIC -c string_buffer.c -o string_buffer.o

libstrbuf.a: string_buffer.o
	ar -csru libstrbuf.a string_buffer.o

strbuf_test: strbuf_test.c libstrbuf.a
	$(CC) $(CFLAGS) $(OPT) strbuf_test.c -o strbuf_test $(LIBFLAGS)

test: strbuf_test
	./strbuf_test

clean:
	rm -rf string_buffer.o libstrbuf.a strbuf_test *.dSYM *.greg
	rm -rf tmp.strbuf.*.txt tmp.strbuf.*.txt.gz

.PHONY: all clean test
{'fraction_non_alphanumeric': 0.13229859571322986, 'fraction_numerical': 0.004434589800443459, 'mean_word_length': 3.685121107266436, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2024079', 'n_tokens_mistral': 583, 'n_tokens_neox': 578, 'n_words': 147}