LIBPKGS=libcjson libavutil libavformat libavcodec libswscale
CFLAGS=$(shell pkg-config --cflags mpv) \
	$(shell pkg-config --cflags $(LIBPKGS)) \
	-pthread \
	-fPIC -Wall -Wno-unused-variable -Wno-parentheses -Wno-unused-function
LDFLAGS=$(shell pkg-config --libs $(LIBPKGS)) \
	-pthread

test: ytdl-storyboard.so
	mpv ytdl://ABH1Vft36aY ytdl://H9uwaNw4DRY

ytdl-storyboard.so: storyboard.c Makefile
	gcc -o $@ $(CFLAGS) $(LDFLAGS) -shared $<