<commit_before>CYTHON_SRC = $(shell find av -name "*.pyx")
C_SRC = $(CYTHON_SRC:%.pyx=src/%.c)
MOD_SOS = $(CYTHON_SRC:%.pyx=%.so)

TEST_MOV = sandbox/640x360.mp4

.PHONY: default build cythonize clean clean-all info test docs

default: cythonize

info:
	@ echo Cython sources: $(CYTHON_SRC)

cythonize: $(C_SRC)

src/%.c: %.pyx
	@ mkdir -p $(shell dirname $@)
	cython -I. -Iinclude -o $@ $<

build: cythonize
	CFLAGS=-O0 python setup.py build_ext --inplace --debug

samples:
	# Grab the samples from the ffmpeg site.
	rsync -vrltLW rsync://fate-suite.ffmpeg.org/fate-suite/ tests/samples/

test-assets: tests/assets/lenna.png tests/assets/320x240x4.mov tests/assets/1KHz.wav
tests/assets/1KHz.wav:
	python scripts/generate_audio.py -c 2 -r 48000 -t 4 -a 0.5 -f 1000 $@
tests/assets/320x240x4.mov:
	python scripts/generate_video.py -s 320x240 -r 24 -t 4 $@
tests/assets/lenna.png:
	@ mkdir -p $(@D)
	wget -O $@ https://upload.wikimedia.org/wikipedia/en/2/24/Lenna.png<commit_msg>added LDFLAGS and CFLAGS overrides<commit_after>CYTHON_SRC = $(shell find av -name "*.pyx")
C_SRC = $(CYTHON_SRC:%.pyx=src/%.c)
MOD_SOS = $(CYTHON_SRC:%.pyx=%.so)

TEST_MOV = sandbox/640x360.mp4

LDFLAGS ?= ""
CFLAGS ?= "-O0"

.PHONY: default build cythonize clean clean-all info test docs

default: cythonize

info:
	@ echo Cython sources: $(CYTHON_SRC)

cythonize: $(C_SRC)

src/%.c: %.pyx
	@ mkdir -p $(shell dirname $@)
	cython -I. -Iinclude -o $@ $<

build: cythonize
	CFLAGS=$(CFLAGS) LDFLAGS=$(LDFLAGS) python setup.py build_ext --inplace --debug

samples:
	# Grab the samples from the ffmpeg site.
	rsync -vrltLW rsync://fate-suite.ffmpeg.org/fate-suite/ tests/samples/

test-assets: tests/assets/lenna.png tests/assets/320x240x4.mov tests/assets/1KHz.wav
tests/assets/1KHz.wav:
	python scripts/generate_audio.py -c 2 -r 48000 -t 4 -a 0.5 -f 1000 $@
tests/assets/320x240x4.mov:
	python scripts/generate_video.py -s 320x240 -r 24 -t 4 $@
tests/assets/lenna.png:
	@ mkdir -p $(@D)
	wget -O $@ https://upload.wikimedia.org/wikipedia/en/2/24/Lenna.png
{'fraction_non_alphanumeric': 0.1588785046728972, 'fraction_numerical': 0.048204623708804725, 'mean_word_length': 3.7858823529411763, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '6280094', 'n_tokens_mistral': 923, 'n_tokens_neox': 846, 'n_words': 193}