<commit_before># Makefile to run unit tests for cgreen-runner units
# We are using cgreen itself to test this but
# since the modules here might at some point get into
# the actual cgreen-runner there will be an clash when
# it loads the test library. So we will have to make
# the external symbols in the modules have other names
# when unittesting them using some macro magic. But let's
# not worry about that for now, I'm confident that we
# can solve that...
#
# And I really want to use Cgreen!

COMMONFLAGS = -g
CFLAGS = $(COMMONFLAGS) -Wall -fPIC -I../include -MMD
LDFLAGS = $(COMMONFLAGS)

VPATH = ../src

all: unit_tests acceptance_tests main

#----------------------------------------------------------------------
main: main.o discoverer_acceptance_tests.o discoverer.o test_item.o io.o
	$(CC) $(LDFLAGS) -o $@ $^ -L../build/src -lcgreen

#----------------------------------------------------------------------
unit_tests: libdiscoverer_unit_tests.so
	LD_LIBRARY_PATH=../build/src ../build/tools/cgreen-runner $^

libdiscoverer_unit_tests.so: discoverer_unit_tests.o discoverer.o test_item.o
	$(CC) -shared -o $@ $^

io.mocks : io.h
	../contrib/cgreen-mocker/cgreen-mocker.py -I../../pycparser-master/utils/fake_libc_include io.h > io.mocks

#----------------------------------------------------------------------
acceptance_tests: libdiscoverer_acceptance_tests.so
	LD_LIBRARY_PATH=../build/src ../build/tools/cgreen-runner $^

libdiscoverer_acceptance_tests.so: discoverer_acceptance_tests.o discoverer.o test_item.o io.o
	$(CC) -shared -o $@ $^

#----------------------------------------------------------------------
clean:
	-rm *.o *.so

-include *.d<commit_msg>Add dependent libraries to linkage<commit_after># Makefile to run unit tests for cgreen-runner units
# We are using cgreen itself to test this but
# since the modules here might at some point get into
# the actual cgreen-runner there will be an clash when
# it loads the test library. So we will have to make
# the external symbols in the modules have other names
# when unittesting them using some macro magic. But let's
# not worry about that for now, I'm confident that we
# can solve that...
#
# And I really want to use Cgreen!

COMMONFLAGS = -g
CFLAGS = $(COMMONFLAGS) -Wall -fPIC -I../include -MMD
LDFLAGS = $(COMMONFLAGS)
LIBRARIES = -L../build/src -lcgreen

VPATH = ../src

all: unit_tests acceptance_tests main

#----------------------------------------------------------------------
main: main.o discoverer_acceptance_tests.o discoverer.o test_item.o io.o
	$(CC) $(LDFLAGS) -o $@ $^ $(LIBRARIES)

#----------------------------------------------------------------------
unit_tests: libdiscoverer_unit_tests.so
	LD_LIBRARY_PATH=../build/src ../build/tools/cgreen-runner $^

libdiscoverer_unit_tests.so: discoverer_unit_tests.o discoverer.o test_item.o
	$(CC) -shared -o $@ $^ $(LIBRARIES)

io.mocks : io.h
	../contrib/cgreen-mocker/cgreen-mocker.py -I../../pycparser-master/utils/fake_libc_include io.h > io.mocks

#----------------------------------------------------------------------
acceptance_tests: libdiscoverer_acceptance_tests.so
	LD_LIBRARY_PATH=../build/src ../build/tools/cgreen-runner $^

libdiscoverer_acceptance_tests.so: discoverer_acceptance_tests.o discoverer.o test_item.o io.o
	$(CC) -shared -o $@ $^ $(LIBRARIES)

#----------------------------------------------------------------------
clean:
	-rm *.o *.so

-include *.d
{'fraction_non_alphanumeric': 0.2631271878646441, 'fraction_numerical': 0.0, 'mean_word_length': 2.0078947368421054, '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': '4575615', 'n_tokens_mistral': 1046, 'n_tokens_neox': 1012, 'n_words': 303}