<commit_before>ifndef CXXFLAGS
  CXXFLAGS = -O3 -Wno-format
endif

CXXFLAGS += -MMD -ISNAPLib

LDFLAGS += -pthread

UNAME := $(shell uname)

ifeq ($(UNAME), Linux)
  LIBS += -lrt -lz
endif

ifeq ($(UNAME), Darwin)
  LIBS += -lz
endif

CXX = g++

LIB_SRC = $(wildcard SNAPLib/*.cpp)
LIB_OBJ = $(patsubst %.cpp, %.o, $(LIB_SRC))

SNAP_SRC = $(wildcard apps/snap/*.cpp)
TEST_SRC = $(wildcard tests/*.cpp)

SNAP_OBJ = $(patsubst %.cpp, %.o, $(SNAP_SRC))
TEST_OBJ = $(patsubst %.cpp, %.o, $(TEST_SRC))

ALL_OBJ = $(LIB_OBJ) $(SNAP_OBJ) $(TEST_OBJ)

DEPS = $(pathsubst %.o, %.d, $(ALL_OBJ))

EXES = snap unit_tests

default: $(EXES)

-include $(pathsubst %.o, %.d, $(ALL_OBJ))

$(OBJS): %.o : %.cpp
	$(CXX) -o $@ $(CXXFLAGS) -c $< 

snap: $(LIB_OBJ) $(SNAP_OBJ)
	$(CXX) -o $@ $(CXXFLAGS) -Itests $(LDFLAGS) $^ $(LIBS)

unit_tests: $(LIB_OBJ) $(TEST_OBJ)
	$(CXX) -o $@ $(CXXFLAGS) -Itests $(LDFLAGS) $^ $(LIBS)

clean:
	rm -f $(ALL_OBJ) $(DEPS) $(EXES)

.phony: clean default<commit_msg>added make option for ComputeROC<commit_after>ifndef CXXFLAGS
  CXXFLAGS = -O3 -Wno-format
endif

CXXFLAGS += -MMD -ISNAPLib

LDFLAGS += -pthread

UNAME := $(shell uname)

ifeq ($(UNAME), Linux)
  LIBS += -lrt -lz
endif

ifeq ($(UNAME), Darwin)
  LIBS += -lz
endif

CXX = g++

LIB_SRC = $(wildcard SNAPLib/*.cpp)
LIB_OBJ = $(patsubst %.cpp, %.o, $(LIB_SRC))

SNAP_SRC = $(wildcard apps/snap/*.cpp)
TEST_SRC = $(wildcard tests/*.cpp)
ROC_SRC = $(wildcard apps/ComputeROC/*.cpp)

SNAP_OBJ = $(patsubst %.cpp, %.o, $(SNAP_SRC))
TEST_OBJ = $(patsubst %.cpp, %.o, $(TEST_SRC))
ROC_OBJ = $(patsubst %.cpp, %.o, $(ROC_SRC))

ALL_OBJ = $(LIB_OBJ) $(SNAP_OBJ) $(TEST_OBJ)

DEPS = $(pathsubst %.o, %.d, $(ALL_OBJ))

EXES = snap unit_tests

default: $(EXES)

-include $(pathsubst %.o, %.d, $(ALL_OBJ))

$(OBJS): %.o : %.cpp
	$(CXX) -o $@ $(CXXFLAGS) -c $< 

snap: $(LIB_OBJ) $(SNAP_OBJ)
	$(CXX) -o $@ $(CXXFLAGS) -Itests $(LDFLAGS) $^ $(LIBS)

roc: $(LIB_OBJ) $(ROC_OBJ)
	$(CXX) -o $@ $(CXXFLAGS) -Itests $(LDFLAGS) $^ $(LIBS)

unit_tests: $(LIB_OBJ) $(TEST_OBJ)
	$(CXX) -o $@ $(CXXFLAGS) -Itests $(LDFLAGS) $^ $(LIBS)

clean:
	rm -f $(ALL_OBJ) $(DEPS) $(EXES)

.phony: clean default
{'fraction_non_alphanumeric': 0.23234200743494424, 'fraction_numerical': 0.0009293680297397769, 'mean_word_length': 4.065882352941176, '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': '4162055', 'n_tokens_mistral': 1032, 'n_tokens_neox': 951, 'n_words': 232}