<commit_before>ifdef EXPOSE_INTERNALS
CPPFLAGS += -DFRAGPOOL_EXPOSE_INTERNALS=$(EXPOSE_INTERNALS)
endif # EXPOSE_INTERNALS

ifdef WITH_COVERAGE
OPTCFLAGS ?= -g
AUX_CFLAGS += -fprofile-arcs -ftest-coverage
AUX_LDFLAGS += -fprofile-arcs
endif # WITH_COVERAGE

OPTCFLAGS ?= -g -O
CPPFLAGS += -I.
CC = $(CROSS_COMPILE)gcc
AR = $(CROSS_COMPILE)ar
GCOV = $(CROSS_COMPILE)gcov

CFLAGS = -Wall -Werror -ansi -std=c99 -pedantic $(OPTCFLAGS) $(CPPFLAGS) $(AUX_CFLAGS)
LDFLAGS = $(AUX_LDFLAGS)

SRC = fragpool.c
OBJ = $(SRC:.c=.o)
DEP = $(SRC:.c=.d)

TARGET = libfragpool.a

.PHONY: all
all: $(TARGET)

.PHONY: msp430
msp430:
	make CROSS_COMPILE=msp430- clean all

libfragpool.a: $(OBJ)
	$(AR) rv $@ $^

.PHONY: doc
doc:
	doxygen

.PHONY: astyle
ASTYLE_ARGS=--options=none --style=1tbs --indent=spaces=2 --indent-switches --pad-header
astyle:
	astyle $(ASTYLE_ARGS) -r '*.c' '*.h'

.PHONY: clean
clean:
	-rm -f $(OBJ)
	-rm -f *.gcov

.PHONY: realclean
realclean: clean
	-rm -f $(DEP) $(TARGET)
	-rm -f *.gcda *.gcno
	-rm -rf html

.PHONY: unittest
unittest:
	$(MAKE) EXPOSE_INTERNALS=1 realclean all \
	&& $(MAKE) -C tests
	if [ -f fragpool.gcda ] ; then $(GCOV) -a $(SRC) ; fi

%.d: %.c<commit_msg>Makefile: Add coverage target<commit_after>ifdef EXPOSE_INTERNALS
CPPFLAGS += -DFRAGPOOL_EXPOSE_INTERNALS=$(EXPOSE_INTERNALS)
endif # EXPOSE_INTERNALS

ifdef WITH_COVERAGE
OPTCFLAGS ?= -g
AUX_CFLAGS += -fprofile-arcs -ftest-coverage
AUX_LDFLAGS += -fprofile-arcs
endif # WITH_COVERAGE

OPTCFLAGS ?= -g -O
CPPFLAGS += -I.
CC = $(CROSS_COMPILE)gcc
AR = $(CROSS_COMPILE)ar
GCOV = $(CROSS_COMPILE)gcov

CFLAGS = -Wall -Werror -ansi -std=c99 -pedantic $(OPTCFLAGS) $(CPPFLAGS) $(AUX_CFLAGS)
LDFLAGS = $(AUX_LDFLAGS)

SRC = fragpool.c
OBJ = $(SRC:.c=.o)
DEP = $(SRC:.c=.d)

TARGET = libfragpool.a

.PHONY: all
all: $(TARGET)

.PHONY: msp430
msp430:
	make CROSS_COMPILE=msp430- clean all

libfragpool.a: $(OBJ)
	$(AR) rv $@ $^

.PHONY: doc
doc:
	doxygen

.PHONY: astyle
ASTYLE_ARGS=--options=none --style=1tbs --indent=spaces=2 --indent-switches --pad-header
astyle:
	astyle $(ASTYLE_ARGS) -r '*.c' '*.h'

.PHONY: clean
clean:
	-rm -f $(OBJ)
	-rm -f *.gcov

.PHONY: realclean
realclean: clean
	-rm -f $(DEP) $(TARGET)
	-rm -f *.gcda *.gcno
	-rm -rf html

.PHONY: unittest
unittest:
	$(MAKE) EXPOSE_INTERNALS=1 realclean all \
	&& $(MAKE) -C tests
	if [ -f fragpool.gcda ] ; then $(GCOV) -a $(SRC) ; fi

.PHONY: coverage
coverage:
	$(MAKE) WITH_COVERAGE=1 EXPOSE_INTERNALS=1 realclean all \
	&& $(MAKE) -C tests coverage
	if [ -f fragpool.gcda ] ; then $(GCOV) -a $(SRC) ; fi

%.d: %.c
{'fraction_non_alphanumeric': 0.17192982456140352, 'fraction_numerical': 0.011695906432748537, 'mean_word_length': 3.9346153846153844, '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': '6373499', 'n_tokens_mistral': 1208, 'n_tokens_neox': 1136, 'n_words': 268}