<commit_before>CC := clang -std=c99

CFLAGS := -pedantic -Werror -Wall -Wextra -Wswitch-default -Wswitch-enum      \
          -Wshadow -Wundef -Wpointer-arith -Wcast-align -Winit-self           \
          -Wstrict-overflow=3 -Wlogical-op -Wwrite-strings -Wnested-externs   \
          -Wbad-function-cast -Wold-style-definition -Wunreachable-code       \
          -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations     \
          -Wno-logical-op-parentheses -Wno-unknown-warning-option             \
          -Wno-missing-field-initializers

GPERF := gperf
RM := rm

COMMON := src/utils.o src/lexer.o


clint: $(COMMON) src/cli.c
	$(CC) $(CFLAGS) $^ -o $@

run-test: $(COMMON) test/*.[ch]
	$(CC) -iquotesrc $(COMMON) $(wildcard test/*.c) -o $@
	./$@

src/%.o: src/%.c src/*.h
	$(CC) -c $(CFLAGS) $< -o $@

src/lexer.o: src/kw.c.part src/pp.c.part

src/%.c.part: src/%.gperf
	$(GPERF) -tlTCE -j1 -K word -H $*_hash -N $*_check $< > $@

.PHONY: clean
clean:
	$(RM) -f $(COMMON) clint run-test<commit_msg>chore: simplify the build system<commit_after>CC := clang -std=c99

CFLAGS := -pedantic -Werror -Wall -Wextra -Wshadow -Wundef -Wunreachable-code \
          -Winit-self -Wstrict-overflow=3 -Wlogical-op -Wmissing-declarations \
          -Wmissing-prototypes -Wold-style-definition -Wstrict-prototypes     \
          -Wpointer-arith -Wnested-externs -Wbad-function-cast -Wwrite-strings\
          -Wno-switch -Wno-logical-op-parentheses -Wno-unknown-warning-option \
          -Wno-missing-field-initializers -Wno-dangling-else

GPERF := gperf
RM := rm

COMMON := src/utils.o src/lexer.o src/parser.o


clint: $(COMMON) src/cli.c
	$(CC) $(CFLAGS) $^ -o $@

run-test: $(COMMON) test/*.[ch]
	$(CC) -iquotesrc $(COMMON) $(wildcard test/*.c) -o $@
	./$@

src/%.o: src/%.c src/*.h
	$(CC) -c $(CFLAGS) $< -o $@

src/lexer.o: src/kw.c.part src/pp.c.part

src/%.c.part: src/%.gperf
	$(GPERF) -tlTCE -j1 -K word -H $*_hash -N $*_check $< > $@

.PHONY: clean
clean:
	$(RM) -f src/*.o clint run-test
{'fraction_non_alphanumeric': 0.18964659034345446, 'fraction_numerical': 0.003982080637132902, 'mean_word_length': 2.406779661016949, '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': '5148303', 'n_tokens_mistral': 846, 'n_tokens_neox': 819, 'n_words': 161}