<commit_before>CC = gcc
INCLUDES = -Isrc -Ideps/bitfield-c/src -Ideps/isotp-c/src
CFLAGS = $(INCLUDES) -c -w -Wall -Werror -g -ggdb -std=gnu++0x -coverage
LDFLAGS = -coverage -lm
LDLIBS = -lcheck

TEST_DIR = tests
TEST_OBJDIR = build

# Guard against \r\n line endings only in Cygwin
OSTYPE := $(shell uname)
ifneq ($(OSTYPE),Darwin)
	OSTYPE := $(shell uname -o)
	ifeq ($(OSTYPE),Cygwin)
		TEST_SET_OPTS = igncr
	endif
endif

SRC = $(wildcard src/**/*.c)
SRC += $(wildcard deps/bitfield-c/src/**/*.c)
SRC += $(wildcard deps/isotp-c/src/**/*.c)
OBJS = $(patsubst %,$(TEST_OBJDIR)/%,$(SRC:.c=.o))
TEST_SRC = $(wildcard $(TEST_DIR)/test_*.c)
TESTS=$(patsubst %.c,$(TEST_OBJDIR)/%.bin,$(TEST_SRC))
TEST_SUPPORT_SRC = $(TEST_DIR)/common.c
TEST_SUPPORT_OBJS = $(patsubst %,$(TEST_OBJDIR)/%,$(TEST_SUPPORT_SRC:.c=.o))

all: $(OBJS)

test: $(TESTS)
	@set -o $(TEST_SET_OPTS) >/dev/null 2>&1
	@export SHELLOPTS<commit_msg>Don't supress warnings when compiling, argh!<commit_after>CC = gcc
INCLUDES = -Isrc -Ideps/bitfield-c/src -Ideps/isotp-c/src
CFLAGS = $(INCLUDES) -c -Wall -Werror -g -ggdb -std=gnu99 -coverage
LDFLAGS = -coverage -lm
LDLIBS = -lcheck

TEST_DIR = tests
TEST_OBJDIR = build

# Guard against \r\n line endings only in Cygwin
OSTYPE := $(shell uname)
ifneq ($(OSTYPE),Darwin)
	OSTYPE := $(shell uname -o)
	ifeq ($(OSTYPE),Cygwin)
		TEST_SET_OPTS = igncr
	endif
endif

SRC = $(wildcard src/**/*.c)
SRC += $(wildcard deps/bitfield-c/src/**/*.c)
SRC += $(wildcard deps/isotp-c/src/**/*.c)
OBJS = $(patsubst %,$(TEST_OBJDIR)/%,$(SRC:.c=.o))
TEST_SRC = $(wildcard $(TEST_DIR)/test_*.c)
TESTS=$(patsubst %.c,$(TEST_OBJDIR)/%.bin,$(TEST_SRC))
TEST_SUPPORT_SRC = $(TEST_DIR)/common.c
TEST_SUPPORT_OBJS = $(patsubst %,$(TEST_OBJDIR)/%,$(TEST_SUPPORT_SRC:.c=.o))

all: $(OBJS)

test: $(TESTS)
	@set -o $(TEST_SET_OPTS) >/dev/null 2>&1
	@export SHELLOPTS
{'fraction_non_alphanumeric': 0.20626349892008639, 'fraction_numerical': 0.003779697624190065, 'mean_word_length': 4.581325301204819, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '4747783', 'n_tokens_mistral': 846, 'n_tokens_neox': 792, 'n_words': 165}