<commit_before>SRCS=lispy.c mpc/mpc.c
TARGET=lispy

.PHONY: all clean test

all: $(TARGET)

clean:
	rm -f *.o $(TARGET)

lispy: $(SRCS)
	cc -g -std=c99 -Wall -ledit -lm -DDEBUG -o $(TARGET) $^

test: $(TARGET) assert.sh tests.sh
	sh tests.sh

assert.sh:
	curl -sS https://raw.githubusercontent.com/lehmannro/assert.sh/master/assert.sh > ./assert.sh<commit_msg>Do a debug build as well<commit_after>SRCS=lispy.c mpc/mpc.c
TARGET=lispy
DEBUG_TARGET=$(TARGET)-debug

.PHONY: all clean test

all: $(TARGET) $(DEBUG_TARGET)

clean:
	rm -f *.o $(TARGET) $(DEBUG_TARGET)

$(TARGET): $(SRCS)
	cc -g -std=c99 -Wall -ledit -lm -o $(TARGET) $^

$(DEBUG_TARGET): $(SRCS)
	cc -g -std=c99 -Wall -ledit -lm -DDEBUG -o $(DEBUG_TARGET) $^

test: $(TARGET) assert.sh tests.sh
	sh tests.sh

assert.sh:
	curl -sS https://raw.githubusercontent.com/lehmannro/assert.sh/master/assert.sh > ./assert.sh
{'fraction_non_alphanumeric': 0.18129988597491448, 'fraction_numerical': 0.0068415051311288486, 'mean_word_length': 3.745945945945946, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '3236762', 'n_tokens_mistral': 381, 'n_tokens_neox': 365, 'n_words': 89}