<commit_before>PREFIX?=/usr/local
CFLAGS=-I../../src $(OPTFLAGS) -fPIC -shared -nostartfiles -L../../build
LDFLAGS=$(OPTLIBS)

MONGO_SRC = mongo-c-driver

all: null.so zmq.so mongodb.so

mongodb.so:
	$(CC) $(CFLAGS) -c -Wall -DMONGO_HAVE_STDINT -I${MONGO_SRC}/src mongodb.c ${MONGO_SRC}/src/*.c
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< ../../build/libm2.a bson.o encoding.o gridfs.o md5.o mongo.o net.o numbers.o mongodb.o

%.so : %.c
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< ../../build/libm2.a

clean:
	rm -f *.so

install:
	install -d $(DESTDIR)/$(PREFIX)/lib/mongrel2/config_modules/
	install *.so $(DESTDIR)/$(PREFIX)/lib/mongrel2/config_modules/
<commit_msg>Fix module loading error for developement built<commit_after>PREFIX?=/usr/local
CFLAGS=-I../../src $(OPTFLAGS) -fPIC -shared -nostartfiles -L../../build
LDFLAGS=$(OPTLIBS)

MONGO_SRC = mongo-c-driver

all: null.so zmq.so mongodb.so

mongodb.so:
	$(CC) $(CFLAGS) -c -Wall -DMONGO_HAVE_STDINT -I${MONGO_SRC}/src mongodb.c ${MONGO_SRC}/src/*.c
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< bson.o encoding.o gridfs.o md5.o mongo.o net.o numbers.o mongodb.o ../../build/libm2.a

%.so : %.c
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< ../../build/libm2.a

clean:
	rm -f *.so

install:
	install -d $(DESTDIR)/$(PREFIX)/lib/mongrel2/config_modules/
	install *.so $(DESTDIR)/$(PREFIX)/lib/mongrel2/config_modules/

{'fraction_non_alphanumeric': 0.22288261515601784, 'fraction_numerical': 0.007429420505200594, 'mean_word_length': 3.4455445544554455, 'pattern_counts': {'":': 0, '<': 7, '<?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': '1529593', 'n_tokens_mistral': 594, 'n_tokens_neox': 559, 'n_words': 114}