<commit_before>CXX=/usr/bin/clang++ -Wall -std=c++11 -stdlib=libc++ -O2 -g
INCLUDES=
LIBRARY=

.PHONY: clean

CPP_FILES := $(wildcard src/rest/*.cpp)
OBJ_FILES := $(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))

example: librest
	$(MAKE) -C example/todo_server

ifeq ($(shell uname),Darwin)
librest: lib/librest.dylib
else
CXX=g++ -std=gnu++11 -Wall -pthread -O2
INCLUDES=-fPIC
librest: lib/librest.so
endif

lib/librest.dylib: $(OBJ_FILES)
	$(CXX) -dynamiclib -Wl,-install_name,librest.dylib -o lib/librest.dylib $^

lib/librest.so: $(OBJ_FILES)
	$(CXX) -fPIC -shared -o lib/librest.so $^ 

obj/%.o: src/rest/%.cpp
	$(CXX) $(INCLUDES) -c -o $@ $<
<commit_msg>not building example by default<commit_after>CXX=/usr/bin/clang++ -Wall -std=c++11 -stdlib=libc++ -O2 -g
INCLUDES=
LIBRARY=

.PHONY: clean

CPP_FILES := $(wildcard src/rest/*.cpp)
OBJ_FILES := $(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))

default: librest

example: librest
	$(MAKE) -C example/todo_server

ifeq ($(shell uname),Darwin)
librest: lib/librest.dylib
else
CXX=g++ -std=gnu++11 -Wall -pthread -O2
INCLUDES=-fPIC
librest: lib/librest.so
endif

lib/librest.dylib: $(OBJ_FILES)
	$(CXX) -dynamiclib -Wl,-install_name,librest.dylib -o lib/librest.dylib $^

lib/librest.so: $(OBJ_FILES)
	$(CXX) -fPIC -shared -o lib/librest.so $^ 

obj/%.o: src/rest/%.cpp
	$(CXX) $(INCLUDES) -c -o $@ $<

{'fraction_non_alphanumeric': 0.20103092783505155, 'fraction_numerical': 0.008836524300441826, 'mean_word_length': 4.30859375, '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': '2505757', 'n_tokens_mistral': 651, 'n_tokens_neox': 584, 'n_words': 120}