<commit_before>.PHONY: all docs tests build clean web

CC = gcc
LPYTHON = $(shell python-config --includes)
LNUMPY = $(shell python -c "import numpy; print '-I' + numpy.get_include()")

CFLAGS = -lpthread $(LPYTHON) $(LNUMPY)

all: build blir

# stupid hack for now
blir:
	$(CC) $(CFLAGS) -shared -fPIC blaze/blir/datashape.c -o blaze/blir/datashape.o
	$(CC) $(CFLAGS) -shared -fPIC blaze/blir/datashape.o blaze/blir/prelude.c -o blaze/blir/prelude.so

build:
	python setup.py build_ext --inplace

tests:
	nosetests -s -v --detailed blaze

docs:
	cd docs; make html

images:
	cd docs/source/svg; make
<commit_msg>cleaned up a bit the Makefile. It should properly support linux and mac os x now<commit_after>.PHONY: all docs tests build clean web

CC = gcc
LPYTHON = $(shell python-config --includes)
LNUMPY = $(shell python -c "import numpy; print '-I' + numpy.get_include()")
CFLAGS = -shared -fPIC $(LPYTHON) $(LNUMPY)
LINK = gcc
PYTHON_LIBS = $(shell python-config --libs)
LFLAGS = -lpthread -shared -fPIC $(PYTHON_LIBS)

UNAME = $(shell uname)

ifeq ($(UNAME), Darwin)
DYLIB_SUFFIX = dylib
endif
ifeq ($(UNAME), Linux)
DYLIB_SUFFIX = so
endif

all: build blir

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

blaze/blir/prelude.$(DYLIB_SUFFIX): blaze/blir/datashape.o blaze/blir/prelude.o
	$(LINK) $(LFLAGS) $< -o $@

# stupid hack for now
blir:	blaze/blir/prelude.$(DYLIB_SUFFIX)

build:
	python setup.py build_ext --inplace

tests:
	nosetests -s -v --detailed blaze

docs:
	cd docs; make html

images:
	cd docs/source/svg; make

{'fraction_non_alphanumeric': 0.145203679369251, 'fraction_numerical': 0.0, 'mean_word_length': 3.897106109324759, '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': '1098350', 'n_tokens_mistral': 645, 'n_tokens_neox': 623, 'n_words': 177}