<commit_before>include ../options.mk

SOURCES=$(wildcard *.cpp) ../lib/json/json.cpp ../lib/json/utils.cpp ../lib/json/ModelUnserializationError.cpp ../lib/json/ParseError.cpp
OBJECTS=$(SOURCES:.cpp=.o)
HEADERS=$(wildcard *.h)

EXECUTABLE=json

all : $(SOURCES) $(EXECUTABLE)

test: all
	@for exec in $(EXECUTABLE); do ./$$exec ; done

$(EXECUTABLE): $(OBJECTS)
	$(COMPILATOR) $(LDFLAGS) $^ -o $@

$(EXECUTABLE).o: $(HEADERS)

%.o:%.cpp $(HEADERS)
	$(COMPILATOR) $(CFLAGS) -c $< -o $@

.PHONY: clean

clean:
	@rm -f *.o
	@rm -f $(EXECUTABLE)
	@echo "Cleaning..."<commit_msg>Fix clean in tests makefile<commit_after>include ../options.mk

SOURCES=$(wildcard *.cpp) ../lib/json/json.cpp ../lib/json/utils.cpp ../lib/json/ModelUnserializationError.cpp ../lib/json/ParseError.cpp
OBJECTS=$(SOURCES:.cpp=.o)
HEADERS=$(wildcard *.h)

EXECUTABLE=json

all : $(SOURCES) $(EXECUTABLE)

test: all
	@for exec in $(EXECUTABLE); do ./$$exec ; done

$(EXECUTABLE): $(OBJECTS)
	$(COMPILATOR) $(LDFLAGS) $^ -o $@

$(EXECUTABLE).o: $(HEADERS)

%.o:%.cpp $(HEADERS)
	$(COMPILATOR) $(CFLAGS) -c $< -o $@

.PHONY: clean

clean:
	@rm -f *.o
	@rm -f $(EXECUTABLE)
	@cd ../lib/json/ && make clean > /dev/null && cd - > /dev/null
	@echo "Cleaning..."

t: all
	./json
{'fraction_non_alphanumeric': 0.2318840579710145, 'fraction_numerical': 0.0, 'mean_word_length': 3.690566037735849, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1311797', 'n_tokens_mistral': 541, 'n_tokens_neox': 495, 'n_words': 109}