<commit_before>CC=gcc
CFLAGS = -fpic -g -Wall -Werror -O -Isrc
pwd = $(shell pwd)

LIB_C_FILES = \
        src/sre_palloc.c \
        src/sre_regex.c \
        src/sre_regex_parser.c \
        src/sre_regex_compiler.c \
        src/sre_vm_bytecode.c \
        src/sre_vm_thompson.c

LIB_O_FILES = $(patsubst %.c,%.o,$(LIB_C_FILES))
H_FILES=$(wildcard src/*.h)

.PHONY: all clean
.PRECIOUS: src/sre_regex_parser.c

all: libsregex.so libsregex.a sregex

sregex: src/sregex.o libsregex.so
	$(CC) -o $@ -Wl,-rpath,$(pwd) $< -L. -lsregex

libsregex.so: $(LIB_O_FILES)
	$(CC) -shared -Wl,-soname,$@ -o $@ $+

libsregex.a: $(LIB_O_FILES)
	ar -cq $@ $(LIB_O_FILES)

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

src/%.c: src/%.y
	bison -o $@ -v $<

clean:
	rm -f src/*.o core $(TARGET) src/sre_regex_parser.c \
	    src/*.output sregex *.so *.a
<commit_msg>makefile: fixed the .a static library generation rule.<commit_after>CC=gcc
CFLAGS = -fpic -g -Wall -Werror -O -Isrc
pwd = $(shell pwd)

LIB_C_FILES = \
        src/sre_palloc.c \
        src/sre_regex.c \
        src/sre_regex_parser.c \
        src/sre_regex_compiler.c \
        src/sre_vm_bytecode.c \
        src/sre_vm_thompson.c

LIB_O_FILES = $(patsubst %.c,%.o,$(LIB_C_FILES))
H_FILES=$(wildcard src/*.h)

.PHONY: all clean
.PRECIOUS: src/sre_regex_parser.c

all: libsregex.so libsregex.a sregex

sregex: src/sregex.o libsregex.so
	$(CC) -o $@ -Wl,-rpath,$(pwd) $< -L. -lsregex

libsregex.so: $(LIB_O_FILES)
	$(CC) -shared -Wl,-soname,$@ -o $@ $+

libsregex.a: $(LIB_O_FILES)
	ar -cq $@ $+

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

src/%.c: src/%.y
	bison -o $@ -v $<

clean:
	rm -f src/*.o core $(TARGET) src/sre_regex_parser.c \
	    src/*.output sregex *.so *.a

{'fraction_non_alphanumeric': 0.1936599423631124, 'fraction_numerical': 0.0, 'mean_word_length': 2.6470588235294117, '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': '2778262', 'n_tokens_mistral': 845, 'n_tokens_neox': 796, 'n_words': 154}