<commit_before>
all::

LD = $(CC)

uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo no')

ifdef MSVC
	# avoid the MinGW and Cygwin configuration sections
	uname_S := Windows
endif

CFLAGS = -g -O2 -Wall
LIBS   = -L.. -lgit2 -lz
OS     = unix

VFLAGS = -q --error-exitcode=1 --leak-check=yes --suppressions=../tests.supp

CRYPTO_LIB = -lcrypto

EXTRA_LIBS =

LD_OUT=-o # add a space
CC_OUT=-o # add a space

# Platform specific tweaks

ifeq ($(uname_S),Windows)
	CC = cl -nologo
	LD = link -nologo
	CFLAGS = -TC -W3 -RTC1 -Zi -DWIN32 -D_DEBUG -D_LIB
	LD_OUT=-out:
	CC_OUT=-Fo

	LIBS = ..\\libgit2.a libz.lib wsock32.lib
	CRYPTO_LIB = libeay32.lib
endif

ifneq (,$(findstring MINGW,$(uname_S)))
	OS=win32
	EXTRA_LIBS += -lwsock32 -lpthread
endif

-include ../config.mak

GIT_LIB = ../libgit2.a

HDRS = $(wildcard ../src/*.h)
PUBLIC_HEADERS = $(wildcard ../src/git/*.h)
HDRS += $(PUBLIC_HEADERS)

TEST_OBJ = $(patsubst %.c,%.o,\
           $(wildcard t[0-9][0-9][0-9][0-9]-*.c))
TEST_EXE = $(patsubst %.o,%.exe,$(TEST_OBJ))
TEST_RUN = $(patsubst %.exe,%.run,$(TEST_EXE))
TEST_VAL = $(patsubst %.exe,%.val,$(TEST_EXE))

ifdef TEST_COVERAGE
	EXTRA_LIBS += -O0 -lgcov<commit_msg>win32: Remove wsock32 from the list of libraries to link<commit_after>
all::

LD = $(CC)

uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo no')

ifdef MSVC
	# avoid the MinGW and Cygwin configuration sections
	uname_S := Windows
endif

CFLAGS = -g -O2 -Wall
LIBS   = -L.. -lgit2 -lz
OS     = unix

VFLAGS = -q --error-exitcode=1 --leak-check=yes --suppressions=../tests.supp

CRYPTO_LIB = -lcrypto

EXTRA_LIBS =

LD_OUT=-o # add a space
CC_OUT=-o # add a space

# Platform specific tweaks

ifeq ($(uname_S),Windows)
	CC = cl -nologo
	LD = link -nologo
	CFLAGS = -TC -W3 -RTC1 -Zi -DWIN32 -D_DEBUG -D_LIB
	LD_OUT=-out:
	CC_OUT=-Fo

	LIBS = ..\\libgit2.a libz.lib
	CRYPTO_LIB = libeay32.lib
endif

ifneq (,$(findstring MINGW,$(uname_S)))
	OS=win32
	EXTRA_LIBS += -lpthread
endif

-include ../config.mak

GIT_LIB = ../libgit2.a

HDRS = $(wildcard ../src/*.h)
PUBLIC_HEADERS = $(wildcard ../src/git/*.h)
HDRS += $(PUBLIC_HEADERS)

TEST_OBJ = $(patsubst %.c,%.o,\
           $(wildcard t[0-9][0-9][0-9][0-9]-*.c))
TEST_EXE = $(patsubst %.o,%.exe,$(TEST_OBJ))
TEST_RUN = $(patsubst %.exe,%.run,$(TEST_EXE))
TEST_VAL = $(patsubst %.exe,%.val,$(TEST_EXE))

ifdef TEST_COVERAGE
	EXTRA_LIBS += -O0 -lgcov
{'fraction_non_alphanumeric': 0.18453131567885667, 'fraction_numerical': 0.02269861286254729, 'mean_word_length': 3.2348754448398576, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2304451', 'n_tokens_mistral': 1122, 'n_tokens_neox': 1059, 'n_words': 242}