CC=gcc CFLAGS=-Wall -O0 -g LDFLAGS=-lm -lusb-1.0 TEX=xelatex TEXFLAGS=-file-line-error -interaction nonstopmode all: build/sniffer build/skillerctl build/heatmap -include $(wildcard build/*.d) build/sniffer: build/sniffer.o build/utils.o build/usb.o build/skiller.o $(CC) $^ -o $@ $(LDFLAGS) build/skillerctl: build/skillerctl.o build/utils.o build/usb.o build/skiller.o build/keys.o $(CC) $^ -o $@ $(LDFLAGS) build/heatmap: build/heatmap.o build/utils.o build/usb.o build/skiller.o build/keys.o $(CC) $^ -o $@ $(LDFLAGS) doc: doc/skiller-sgk3.pdf %.pdf: %.tex $(TEX) $(TEXFLAGS) -output-directory build $< build/%.o: src/%.c $(CC) $(CFLAGS) -MMD -c $< -o $@ clean: rm build/*