<commit_before>CFLAGS := $(CFLAGS) -O2 -ffast-math -mavx
CXXFLAGS := $(CXXFLAGS) -std=c++14 -march=native -Wall -ferror-limit=3
LDFLAGS :=

DEPS = array.h image.h

TEST_SRC = $(wildcard test/*.cpp)
TEST_OBJ = $(TEST_SRC:%.cpp=obj/%.o)

obj/%.o: %.cpp $(DEPS)
	mkdir -p $(@D)
	$(CXX) -I. -c -o $@ $< $(CFLAGS) $(CXXFLAGS)

bin/test: $(TEST_OBJ)
	mkdir -p $(@D)
	$(CXX) -o $@ $^ $(LDFLAGS) -lstdc++ -lm

bin/%: obj/examples/%.o
	mkdir -p $(@D)
	$(CXX) -o $@ $^ $(LDFLAGS) -lstdc++ -lm

.PHONY: all clean test matrix

clean:
	rm -rf obj/* bin/*

test: bin/test bin/matrix
	bin/test $(FILTER)
	bin/matrix

examples: bin/matrix
	bin/matrix<commit_msg>Add LDFLAGS command line option.<commit_after>CFLAGS := $(CFLAGS) -O2 -ffast-math -mavx
CXXFLAGS := $(CXXFLAGS) -std=c++14 -march=native -Wall -ferror-limit=3
LDFLAGS := $(LDFLAGS)

DEPS = array.h image.h

TEST_SRC = $(wildcard test/*.cpp)
TEST_OBJ = $(TEST_SRC:%.cpp=obj/%.o)

obj/%.o: %.cpp $(DEPS)
	mkdir -p $(@D)
	$(CXX) -I. -c -o $@ $< $(CFLAGS) $(CXXFLAGS)

bin/test: $(TEST_OBJ)
	mkdir -p $(@D)
	$(CXX) -o $@ $^ $(LDFLAGS) -lstdc++ -lm

bin/%: obj/examples/%.o
	mkdir -p $(@D)
	$(CXX) -o $@ $^ $(LDFLAGS) -lstdc++ -lm

.PHONY: all clean test matrix

clean:
	rm -rf obj/* bin/*

test: bin/test bin/matrix
	bin/test $(FILTER)
	bin/matrix

examples: bin/matrix
	bin/matrix
{'fraction_non_alphanumeric': 0.2329803328290469, 'fraction_numerical': 0.006051437216338881, 'mean_word_length': 3.366336633663366, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6728126', 'n_tokens_mistral': 623, 'n_tokens_neox': 579, 'n_words': 146}