<commit_before># $Id$

CFLAGS = -O2 -g -pedantic -std=c89 -Wall -W
CC = gcc

#CFLAGS = -Yposix2 -Xp
#CC = tcc

CFLAGS += -I include -I .

OUT = out/fsm.o out/dot.o out/table.o

all: cli/fsm libfsm/libfsm.a

clean:
	rm -f cli/fsm cli/xmalloc.o cli/main.o
	rm -f $(OUT)
	rm -f libfsm/lexer.c libfsm/lexer.h libfsm/syntax.c libfsm/syntax.h
	rm -f libfsm/lexer.o libfsm/syntax.o

libfsm/libfsm.a: $(OUT) libfsm/lexer.o libfsm/syntax.o cli/xmalloc.o
	ar r libfsm/libfsm.a $(OUT) libfsm/lexer.o libfsm/syntax.o cli/xmalloc.o	# XXX xmalloc
	ranlib libfsm/libfsm.a

cli/fsm: libfsm/libfsm.a libfsm/lexer.o libfsm/syntax.o cli/xmalloc.o cli/main.o $(OUT)
	$(CC) -o cli/fsm $(CFLAGS) libfsm/lexer.o libfsm/syntax.o cli/xmalloc.o cli/main.o $(OUT)


libfsm/lexer.c libfsm/lexer.h: libfsm/lexer.lxi libfsm/lexer.lct
	lexi libfsm/lexer.lxi libfsm/lexer.lct libfsm/lexer.c libfsm/lexer.h

libfsm/syntax.c libfsm/syntax.h: libfsm/syntax.sid libfsm/syntax.act
	sid -s no-numeric-terminals libfsm/syntax.sid libfsm/syntax.act libfsm/syntax.c libfsm/syntax.h

libfsm/lexer.c: libfsm/syntax.h

libfsm/syntax.c: libfsm/lexer.h


.c.o:
	$(CC) -o $@ -c $< $(CFLAGS)
<commit_msg>Missing clean target.<commit_after># $Id$

CFLAGS = -O2 -g -pedantic -std=c89 -Wall -W
CC = gcc

#CFLAGS = -Yposix2 -Xp
#CC = tcc

CFLAGS += -I include -I .

OUT = out/fsm.o out/dot.o out/table.o

all: cli/fsm libfsm/libfsm.a

clean:
	rm -f cli/fsm cli/xmalloc.o cli/main.o
	rm -f $(OUT)
	rm -f libfsm/lexer.c libfsm/lexer.h libfsm/syntax.c libfsm/syntax.h
	rm -f libfsm/lexer.o libfsm/syntax.o
	rm -f libfsm/libfsm.a

libfsm/libfsm.a: $(OUT) libfsm/lexer.o libfsm/syntax.o cli/xmalloc.o
	ar r libfsm/libfsm.a $(OUT) libfsm/lexer.o libfsm/syntax.o cli/xmalloc.o	# XXX xmalloc
	ranlib libfsm/libfsm.a

cli/fsm: libfsm/libfsm.a libfsm/lexer.o libfsm/syntax.o cli/xmalloc.o cli/main.o $(OUT)
	$(CC) -o cli/fsm $(CFLAGS) libfsm/lexer.o libfsm/syntax.o cli/xmalloc.o cli/main.o $(OUT)


libfsm/lexer.c libfsm/lexer.h: libfsm/lexer.lxi libfsm/lexer.lct
	lexi libfsm/lexer.lxi libfsm/lexer.lct libfsm/lexer.c libfsm/lexer.h

libfsm/syntax.c libfsm/syntax.h: libfsm/syntax.sid libfsm/syntax.act
	sid -s no-numeric-terminals libfsm/syntax.sid libfsm/syntax.act libfsm/syntax.c libfsm/syntax.h

libfsm/lexer.c: libfsm/syntax.h

libfsm/syntax.c: libfsm/lexer.h


.c.o:
	$(CC) -o $@ -c $< $(CFLAGS)

{'fraction_non_alphanumeric': 0.1587708066581306, 'fraction_numerical': 0.0034144259496372174, 'mean_word_length': 3.2695810564663024, 'pattern_counts': {'":': 0, '<': 5, '<?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': '4172872', 'n_tokens_mistral': 1239, 'n_tokens_neox': 1192, 'n_words': 219}