<commit_before>SHELL = /bin/sh
C := clang

WARNINGFLAGS := -Wshadow
WARNINGFLAGS := $(WARNINGFLAGS) -Wwrite-strings -Wunused-parameter

DEFAULTFLAGS := -std=gnu11 -I. -Iinclude/ $(WARNINGFLAGS)
CFLAGS := $(DEFAULTFLAGS) -Ofast -funroll-loops

SRCS := $(shell find src -name "*.c")
TARGET := bin/tbd

EXTRADEBUGFLAGS := -fsanitize=address -fsanitize=leak -fno-omit-frame-pointer
DEBUGFLAGS := $(DEFAULTFLAGS) -g $(EXTRADEBUGFLAGS)

.DEFAULT_GOAL := all

clean:
	@$(RM) $(TARGET)

target-dir:
	@mkdir -p $(dir $(TARGET))

all: target-dir
	@$(C) $(CFLAGS) $(SRCS) -o $(TARGET)

debug: target-dir
	@$(C) $(DEBUGFLAGS) $(SRCS) -o $(TARGET)

install: all
	@sudo mv $(TARGET) /usr/bin

compile_commands:
	@bear make<commit_msg>Add support for C/C++ extension in vscode<commit_after>SHELL = /bin/sh
C := clang

WARNINGFLAGS := -Wshadow
WARNINGFLAGS := $(WARNINGFLAGS) -Wwrite-strings -Wunused-parameter

DEFAULTFLAGS := -std=gnu11 -I. -Iinclude/ $(WARNINGFLAGS)
CFLAGS := $(DEFAULTFLAGS) -Ofast -funroll-loops
VSCODEFLAGS := -I.vscode/ -Wno-sign-conversion $(CFLAGS)

SRCS := $(shell find src -name "*.c")
TARGET := bin/tbd

EXTRADEBUGFLAGS := -fsanitize=address -fsanitize=leak -fno-omit-frame-pointer
DEBUGFLAGS := $(DEFAULTFLAGS) -g $(EXTRADEBUGFLAGS)

.DEFAULT_GOAL := all

clean:
	@$(RM) $(TARGET)

target-dir:
	@mkdir -p $(dir $(TARGET))

all: target-dir
	@$(C) $(CFLAGS) $(SRCS) -o $(TARGET)

debug: target-dir
	@$(C) $(DEBUGFLAGS) $(SRCS) -o $(TARGET)

install: all
	@sudo mv $(TARGET) /usr/bin

vscode:
	@$(C) $(VSCODEFLAGS) $(SRCS) -o $(TARGET)

compile_commands:
	@bear make vscode
{'fraction_non_alphanumeric': 0.18623737373737373, 'fraction_numerical': 0.0025252525252525255, 'mean_word_length': 4.522648083623693, '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': '385777', 'n_tokens_mistral': 617, 'n_tokens_neox': 649, 'n_words': 152}