<commit_before>PROJECT:=integral

PROJECT_LIB_ROOT_DIR:=lib
PROJECT_LIB_DIR:=$(PROJECT_LIB_ROOT_DIR)/$(PROJECT)
PROJECT_BIN_DIR:=samples
PROJECT_TEST_DIR:=test
PROJECT_DEPENDENCIES_DIR:=dependencies
PROJECT_STATIC_LIB:=lib$(PROJECT).a

# some variables require PROJECT_ROOT_DIR definition. That's why = is used instead of := for their definition
PROJECT_INCLUDE_DIRS=$(PROJECT_ROOT_DIR)/$(PROJECT_LIB_ROOT_DIR)
PROJECT_LDLIBS=$(PROJECT_ROOT_DIR)/$(PROJECT_LIB_DIR)/$(PROJECT_STATIC_LIB)
PROJECT_SYSTEM_INCLUDE_DIRS=/usr/local/include $(PROJECT_ROOT_DIR)/$(PROJECT_DEPENDENCIES_DIR)/exception/include
PROJECT_LIB_DIRS:=/usr/local/lib
# '?=' sets the variable if it was not previously set
OPTIMIZATION_FLAGS?=-O0 -g
# TODO with c++17: remove -Wno-unused-parameter and -Wno-unused-but-set-parameter and use [[maybe_unused]] attribute
PROJECT_CXXFLAGS:=-std=c++14 $(OPTIMIZATION_FLAGS) $(SANITIZE_FLAGS) -Werror -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wno-missing-braces -Wno-unused-parameter -pedantic
PROJECT_LDFLAGS:=$(OPTIMIZATION_FLAGS) $(SANITIZE_FLAGS)

ifeq ($(shell uname -s),Darwin)
# -Wweak-vtables is a clang feature
PROJECT_CXXFLAGS+=-Wweak-vtables
SHARED_LIB_EXTENSION:=dylib
PROJECT_LDFLAGS+=-undefined dynamic_lookup
else
ifeq ($(shell uname -m),armv7l)
# TODO remove this on later GCC versions<commit_msg>set AR=gcc-ar in linux to use -flto compiler flag<commit_after>PROJECT:=integral

PROJECT_LIB_ROOT_DIR:=lib
PROJECT_LIB_DIR:=$(PROJECT_LIB_ROOT_DIR)/$(PROJECT)
PROJECT_BIN_DIR:=samples
PROJECT_TEST_DIR:=test
PROJECT_DEPENDENCIES_DIR:=dependencies
PROJECT_STATIC_LIB:=lib$(PROJECT).a

# some variables require PROJECT_ROOT_DIR definition. That's why = is used instead of := for their definition
PROJECT_INCLUDE_DIRS=$(PROJECT_ROOT_DIR)/$(PROJECT_LIB_ROOT_DIR)
PROJECT_LDLIBS=$(PROJECT_ROOT_DIR)/$(PROJECT_LIB_DIR)/$(PROJECT_STATIC_LIB)
PROJECT_SYSTEM_INCLUDE_DIRS=/usr/local/include $(PROJECT_ROOT_DIR)/$(PROJECT_DEPENDENCIES_DIR)/exception/include
PROJECT_LIB_DIRS:=/usr/local/lib
# '?=' sets the variable if it was not previously set
OPTIMIZATION_FLAGS?=-O0 -g
# TODO with c++17: remove -Wno-unused-parameter and -Wno-unused-but-set-parameter and use [[maybe_unused]] attribute
PROJECT_CXXFLAGS:=-std=c++14 $(OPTIMIZATION_FLAGS) $(SANITIZE_FLAGS) -Werror -Wall -Wextra -Wshadow -Wnon-virtual-dtor -Wno-missing-braces -Wno-unused-parameter -pedantic
PROJECT_LDFLAGS:=$(OPTIMIZATION_FLAGS) $(SANITIZE_FLAGS)

ifeq ($(shell uname -s),Darwin)
# -Wweak-vtables is a clang feature
PROJECT_CXXFLAGS+=-Wweak-vtables
SHARED_LIB_EXTENSION:=dylib
PROJECT_LDFLAGS+=-undefined dynamic_lookup
else
# avoids error: "ar: <file>.o: plugin needed to handle lto object"
AR:=gcc-ar
ifeq ($(shell uname -m),armv7l)
# TODO remove this on later GCC versions
{'fraction_non_alphanumeric': 0.12010159651669086, 'fraction_numerical': 0.0043541364296081275, 'mean_word_length': 7.864951768488746, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '3330517', 'n_tokens_mistral': 1053, 'n_tokens_neox': 995, 'n_words': 190}