<commit_before>CCFLAGS=-Wall -I. -std=c99
LDFLAGS=-lutil

ifeq ($(DEBUG),1)
  CCFLAGS+=-ggdb -DDEBUG
endif

CCFLAGS+=$(shell pkg-config --cflags glib-2.0)
LDFLAGS+=$(shell pkg-config --libs   glib-2.0)

CFILES=$(wildcard *.c)
OFILES=$(CFILES:.c=.o)
HFILES=$(wildcard *.h)

TEST_CFILES=$(wildcard t/*.c)
TEST_OFILES=$(TEST_CFILES:.c=.o)

DEBUGS=debug-passthrough debug-pangoterm

all: $(DEBUGS)

debug-%: debug-%.c libecma48.so
	gcc -o $@ $^ $(CCFLAGS) $(LDFLAGS)

debug-pangoterm: debug-pangoterm.c libecma48.so
	gcc -o $@ $^ $(CCFLAGS) $(shell pkg-config --cflags --libs gtk+-2.0) $(LDFLAGS)

libecma48.so: ecma48.o parser.o state.o input.o pen.o mode.o
	gcc -shared -o $@ $^ $(LDFLAGS)

%.o: %.c $(HFILES)
	gcc -fPIC -o $@ -c $< $(CCFLAGS)

t/test.o: t/test.c
	t/test.c.sh
	gcc -c -o $@ $^ $(CCFLAGS)

t/test: libecma48.so $(TEST_OFILES)
	t/test.c.sh
	gcc -o $@ $^ $(CCFLAGS) $(LDFLAGS) -lcunit

.PHONY: test
test: libecma48.so t/test
	LD_LIBRARY_PATH=. t/test

.PHONY: clean
clean:
	rm -f $(DEBUGS) $(OFILES) $(TEST_OFILES) libecma48.so
<commit_msg>Make sure t/extern.h and t/suites.h are rebuilt properly in Makefile<commit_after>CCFLAGS=-Wall -I. -std=c99
LDFLAGS=-lutil

ifeq ($(DEBUG),1)
  CCFLAGS+=-ggdb -DDEBUG
endif

CCFLAGS+=$(shell pkg-config --cflags glib-2.0)
LDFLAGS+=$(shell pkg-config --libs   glib-2.0)

CFILES=$(wildcard *.c)
OFILES=$(CFILES:.c=.o)
HFILES=$(wildcard *.h)

TEST_CFILES=$(wildcard t/*.c)
TEST_OFILES=$(TEST_CFILES:.c=.o)

DEBUGS=debug-passthrough debug-pangoterm

all: $(DEBUGS)

debug-%: debug-%.c libecma48.so
	gcc -o $@ $^ $(CCFLAGS) $(LDFLAGS)

debug-pangoterm: debug-pangoterm.c libecma48.so
	gcc -o $@ $^ $(CCFLAGS) $(shell pkg-config --cflags --libs gtk+-2.0) $(LDFLAGS)

libecma48.so: ecma48.o parser.o state.o input.o pen.o mode.o
	gcc -shared -o $@ $^ $(LDFLAGS)

%.o: %.c $(HFILES)
	gcc -fPIC -o $@ -c $< $(CCFLAGS)

t/extern.h: t
	t/test.c.sh

t/test.o: t/test.c t/extern.h t/suites.h
	gcc -c -o $@ $< $(CCFLAGS)

t/test: libecma48.so $(TEST_OFILES)
	t/test.c.sh
	gcc -o $@ $^ $(CCFLAGS) $(LDFLAGS) -lcunit

.PHONY: test
test: libecma48.so t/test
	LD_LIBRARY_PATH=. t/test

.PHONY: clean
clean:
	rm -f $(DEBUGS) $(OFILES) $(TEST_OFILES) libecma48.so

{'fraction_non_alphanumeric': 0.20810564663023678, 'fraction_numerical': 0.020947176684881604, 'mean_word_length': 3.7044967880085653, 'pattern_counts': {'":': 0, '<': 6, '<?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': '2505849', 'n_tokens_mistral': 1102, 'n_tokens_neox': 1017, 'n_words': 211}