use $(GENDIR) if %(gendir) isn't specified.