CFLAGS = -Wall

OBJECTS = hello.o usbkeyboard.o

TARFILES = Makefile hello.c \
	usbkeyboard.h usbkeyboard.c

hello : $(OBJECTS)
	cc $(CFLAGS) -o hello $(OBJECTS) -lusb-1.0 -pthread

hello.tar.gz : $(TARFILES)
	rm -rf hello
	mkdir hello
	ln $(TARFILES) hello
	tar zcf hello.tar.gz hello
	rm -rf hello

hello.o : hello.c usbkeyboard.h

usbkeyboard.o : usbkeyboard.c usbkeyboard.h

.PHONY : clean
clean :
	rm -rf *.o hello
