VERSION=0.1
OBJ=main.o chat.o screen.o keys.o
CFLAGS=-g3 $(shell pkg-config --cflags glib-2.0 libavcodec libswscale libavutil x11 xtst)
LIBS=$(shell pkg-config --libs glib-2.0 libavcodec libswscale libavutil x11 xtst)

ndsbot: $(OBJ)
	$(CC) $(OBJ) $(LIBS) -o $@

clean:
	rm -f $(OBJ) ndsbot

tarball: ndsbot-$(VERSION).tar.xz

ndsbot-$(VERSION).tar.xz: Makefile README LICENSE main.c chat.c chat.h screen.c screen.h keys.c keys.h
	tar --transform="s|^|ndsbot-$(VERSION)/|" -cJf $@ $^
