<commit_before>DIRS := ${shell find src -type d -print}
SOURCES := $(foreach sdir,$(DIRS),$(wildcard $(sdir)/*.c))

CFLAGS := -Wall -pedantic -std=c89 -I include/
LACCFLAGS := -I include/

all: bin/lacc

bin/lacc: $(SOURCES)
	@mkdir -p $(dir $@)
	cc $(CFLAGS) $^ -o $@

bin/bootstrap: $(patsubst src/%.c,bin/%-bootstrap.o,$(SOURCES))
	cc $^ -o $@

bin/%-bootstrap.o: src/%.c bin/lacc
	@mkdir -p $(dir $@)
	bin/lacc $(LACCFLAGS) -c $< -o $@

bin/selfhost: $(patsubst src/%.c,bin/%-selfhost.o,$(SOURCES))
	cc $^ -o $@

bin/%-selfhost.o: src/%.c bin/bootstrap
	@mkdir -p $(dir $@)
	bin/bootstrap $(LACCFLAGS) -c $< -o $@

test-%: bin/%
	@$(foreach file,$(wildcard test/*.c),./check.sh $< $(file);)

test: test-lacc

clean:
	rm -rf bin
	rm -f test/*.out test/*.txt test/*.s

.PHONY: all test test-% clean
<commit_msg>Compile with debug symbols<commit_after>DIRS := ${shell find src -type d -print}
SOURCES := $(foreach sdir,$(DIRS),$(wildcard $(sdir)/*.c))

CFLAGS := -Wall -pedantic -std=c89 -g -I include/
LACCFLAGS := -I include/

all: bin/lacc

bin/lacc: $(SOURCES)
	@mkdir -p $(dir $@)
	cc $(CFLAGS) $^ -o $@

bin/bootstrap: $(patsubst src/%.c,bin/%-bootstrap.o,$(SOURCES))
	cc $^ -o $@

bin/%-bootstrap.o: src/%.c bin/lacc
	@mkdir -p $(dir $@)
	bin/lacc $(LACCFLAGS) -c $< -o $@

bin/selfhost: $(patsubst src/%.c,bin/%-selfhost.o,$(SOURCES))
	cc $^ -o $@

bin/%-selfhost.o: src/%.c bin/bootstrap
	@mkdir -p $(dir $@)
	bin/bootstrap $(LACCFLAGS) -c $< -o $@

test-%: bin/%
	@$(foreach file,$(wildcard test/*.c),./check.sh $< $(file);)

test: test-lacc

clean:
	rm -rf bin
	rm -f test/*.out test/*.txt test/*.s

.PHONY: all test test-% clean

{'fraction_non_alphanumeric': 0.24786845310596833, 'fraction_numerical': 0.00243605359317905, 'mean_word_length': 3.2786458333333335, 'pattern_counts': {'":': 0, '<': 9, '<?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': '7495235', 'n_tokens_mistral': 761, 'n_tokens_neox': 701, 'n_words': 168}