TOOLS   = ../../tools
PERLINC = $(TOOLS)/perlinc
PERL    = /usr/bin/perl
PERLOPT = -I$(PERLINC)

TARGETS = usb_desc.v
ALSO    = usb_desc.bin

all: $(TARGETS) $(ALSO)

%.v: %.conf $(TOOLS)/usbdescgen.pl
	$(PERL) $(PERLOPT) $(TOOLS)/usbdescgen.pl v $< $@

%.bin: %.conf $(TOOLS)/usbdescgen.pl
	$(PERL) $(PERLOPT) $(TOOLS)/usbdescgen.pl bin $< $@

clean:
	rm -f $(ALSO) *.bin

spotless: clean
	rm -f $(TARGETS) *~ .\#* \#* *.bak

