<commit_before>CC      = gcc
CFLAGS ?= -O3
PYTHON ?= python3

COMPILE = $(CC) $(CFLAGS) -std=c11 -Wall -Wextra -Werror -Wno-unused-parameter -fPIC -I. -L./obj -o
DYNLINK = $(CC) -shared -o
ARCHIVE = ar rcs


_require_headers = \
	cno/core.h \
	cno/common.h \
	cno/hpack.h \
	cno/hpack-data.h \
	picohttpparser/picohttpparser.h


_require_objects = \
	obj/core.o \
	obj/common.o \
	obj/hpack.o \
	obj/../picohttpparser/picohttpparser.o \


_require_examples = \
	obj/examples/simple_server \
	obj/examples/simple_client \
	obj/examples/data_loop \
	obj/examples/hpack


.PHONY: all clean
.PRECIOUS: obj/%.o obj/libcno.a obj/libcno.so obj/examples/%


all: $(_require_examples)

obj/libcno.a: $(_require_objects)
	$(DYNLINK) $@ $^

obj/libcno.so: $(_require_objects)
	$(ARCHIVE) $@ $^

obj/%.o: cno/%.c $(_require_headers)
	@mkdir -p obj
	$(COMPILE) $@ $< -c

obj/examples/%: examples/%.c obj/libcno.a
	@mkdir -p obj/examples
	$(COMPILE) $@ $< -lcno -pthread

cno/hpack-data.h: cno/hpack-data.py
	$(PYTHON) cno/hpack-data.py > cno/hpack-data.h

clean:
	rm -rf obj build<commit_msg>Fix invalid Make targets.<commit_after>CC      = gcc
CFLAGS ?= -O3
PYTHON ?= python3

COMPILE = $(CC) $(CFLAGS) -std=c11 -Wall -Wextra -Werror -Wno-unused-parameter -fPIC -I. -L./obj -o
DYNLINK = $(CC) -shared -o
ARCHIVE = ar rcs


_require_headers = \
	cno/core.h \
	cno/common.h \
	cno/hpack.h \
	cno/hpack-data.h \
	picohttpparser/picohttpparser.h


_require_objects = \
	obj/core.o \
	obj/common.o \
	obj/hpack.o \
	obj/../picohttpparser/picohttpparser.o \


_require_examples = \
	obj/examples/simple_server \
	obj/examples/simple_client \
	obj/examples/data_loop \
	obj/examples/hpack


.PHONY: all clean
.PRECIOUS: obj/%.o obj/libcno.a obj/libcno.so obj/examples/%


all: $(_require_examples)

obj/libcno.so: $(_require_objects)
	$(DYNLINK) $@ $^

obj/libcno.a: $(_require_objects)
	$(ARCHIVE) $@ $^

obj/%.o: cno/%.c $(_require_headers)
	@mkdir -p obj
	$(COMPILE) $@ $< -c

obj/examples/%: examples/%.c obj/libcno.a
	@mkdir -p obj/examples
	$(COMPILE) $@ $< -lcno -pthread

cno/hpack-data.h: cno/hpack-data.py
	$(PYTHON) cno/hpack-data.py > cno/hpack-data.h

clean:
	rm -rf obj build
{'fraction_non_alphanumeric': 0.17557603686635945, 'fraction_numerical': 0.003686635944700461, 'mean_word_length': 3.0885122410546137, 'pattern_counts': {'":': 0, '<': 7, '<?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': '3118127', 'n_tokens_mistral': 1036, 'n_tokens_neox': 969, 'n_words': 170}