<commit_before>CPP			    = g++
RM			    = rm -f
CPPFLAGS		= -Wall -c -I. -flto -std=c++11
LD			    = g++
LD_FLAGS		= -Wall -shared
SHARED_LIB		= lib$(LIBRARY_NAME).so.$(VERSION)
STATIC_LIB		= lib$(LIBRARY_NAME).a.$(VERSION)
SOURCES			= $(wildcard *.cpp)
SHARED_OBJECTS	= $(SOURCES:%.cpp=%.o)
STATIC_OBJECTS	= $(SOURCES:%.cpp=%.s.o)


all:	CPPFLAGS += -g
all:	LD_FLAGS += -g
all:	shared static

release:	CPPFLAGS += -O2
release:	LD_FLAGS += -O2
release:	shared static

shared:	${SHARED_OBJECTS} ${SHARED_LIB}

static:	${STATIC_OBJECTS} ${STATIC_LIB}

${SHARED_LIB}: ${SHARED_OBJECTS}
	${LD} ${LD_FLAGS} -Wl,-soname,lib$(LIBRARY_NAME).so.$(SONAME) -o $@ ${SHARED_OBJECTS}

${STATIC_LIB}: ${STATIC_OBJECTS}
	ar rcs ${STATIC_LIB} ${STATIC_OBJECTS}

clean:
	${RM} *.obj *~* ${SHARED_OBJECTS} ${STATIC_OBJECTS} ${SHARED_LIB} ${STATIC_LIB}

${SHARED_OBJECTS}:
	${CPP} ${CPPFLAGS} -fpic -o $@ ${@:%.o=%.cpp}

${STATIC_OBJECTS}:
	${CPP} ${CPPFLAGS} -o $@ ${@:%.s.o=%.cpp}
<commit_msg>Special treatment for Mac OS X: It uses a different parameter for setting the soname<commit_after>CPP			    = g++
RM			    = rm -f
CPPFLAGS		= -Wall -c -I. -flto -std=c++11
LD			    = g++
LD_FLAGS		= -Wall -shared
SHARED_LIB		= lib$(LIBRARY_NAME).so.$(VERSION)
STATIC_LIB		= lib$(LIBRARY_NAME).a.$(VERSION)
SOURCES			= $(wildcard *.cpp)
SHARED_OBJECTS	= $(SOURCES:%.cpp=%.o)
STATIC_OBJECTS	= $(SOURCES:%.cpp=%.s.o)


ifeq ($(shell uname -s),Darwin)
    SONAMEPARAMETER = -install_name
else
    SONAMEPARAMETER = -soname
endif


all:	CPPFLAGS += -g
all:	LD_FLAGS += -g
all:	shared static

release:	CPPFLAGS += -O2
release:	LD_FLAGS += -O2
release:	shared static

shared:	${SHARED_OBJECTS} ${SHARED_LIB}

static:	${STATIC_OBJECTS} ${STATIC_LIB}

${SHARED_LIB}: ${SHARED_OBJECTS}
	${LD} ${LD_FLAGS} -Wl,${SONAMEPARAMETER},lib$(LIBRARY_NAME).so.$(SONAME) -o $@ ${SHARED_OBJECTS}

${STATIC_LIB}: ${STATIC_OBJECTS}
	ar rcs ${STATIC_LIB} ${STATIC_OBJECTS}

clean:
	${RM} *.obj *~* ${SHARED_OBJECTS} ${STATIC_OBJECTS} ${SHARED_LIB} ${STATIC_LIB}

${SHARED_OBJECTS}:
	${CPP} ${CPPFLAGS} -fpic -o $@ ${@:%.o=%.cpp}

${STATIC_OBJECTS}:
	${CPP} ${CPPFLAGS} -o $@ ${@:%.s.o=%.cpp}

{'fraction_non_alphanumeric': 0.20625291647223518, 'fraction_numerical': 0.003733084461035931, 'mean_word_length': 4.483375959079284, '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': '6290358', 'n_tokens_mistral': 1001, 'n_tokens_neox': 929, 'n_words': 188}