<commit_before>default: all

CFLAGS=-I/usr/local/opt/readline/include -O3 -Wall
LIBS=-lreadline

ifeq ($(shell uname), Darwin)
	LDFLAGS=-L/usr/local/opt/readline/lib
endif

INSTALL=install
INSTALL_BIN?=/usr/local/bin
HSS_BIN=hss

main.o: main.c
	$(CC) $(CFLAGS) $(CPPFLAGS) -c main.c -o main.o

sstring.o: sstring.c
	$(CC) $(CFLAGS) $(CPPFLAGS) -c sstring.c -o sstring.o

slot.o: slot.c
	$(CC) $(CFLAGS) $(CPPFLAGS) -c slot.c -o slot.o<commit_msg>Fix build on macOS arm64 system<commit_after>default: all

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

CFLAGS=-O3 -Wall
LIBS=-lreadline

ifeq ($(uname_S),Darwin)
ifeq ($(uname_M),arm64)
	# Homebrew arm64 uses /opt/homebrew as HOMEBREW_PREFIX
	CFLAGS+=-I/opt/homebrew/opt/readline/include
	LDFLAGS+=-L/opt/homebrew/opt/readline/lib
else
	CFLAGS+=-I/usr/local/opt/readline/include
	LDFLAGS+=-L/usr/local/opt/readline/lib
endif
endif

INSTALL=install
INSTALL_BIN?=/usr/local/bin
HSS_BIN=hss

main.o: main.c
	$(CC) $(CFLAGS) $(CPPFLAGS) -c main.c -o main.o

sstring.o: sstring.c
	$(CC) $(CFLAGS) $(CPPFLAGS) -c sstring.c -o sstring.o

slot.o: slot.c
	$(CC) $(CFLAGS) $(CPPFLAGS) -c slot.c -o slot.o
{'fraction_non_alphanumeric': 0.1819672131147541, 'fraction_numerical': 0.00819672131147541, 'mean_word_length': 4.0875, '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': '3236613', 'n_tokens_mistral': 545, 'n_tokens_neox': 527, 'n_words': 116}