## Process this file with automake to produce Makefile.in

# require automake 1.4
# gnu strictness chokes on README being autogenerated
AUTOMAKE_OPTIONS = 1.4 foreign dist-bzip2

SUBDIRS = src tests doc

CFLAGS=

configincludedir = $(pkglibdir)/include

bin_SCRIPTS = openusb-config
BUILT_SOURCES = openusb-config

openusb-config: openusb-config.in

EXTRA_DIST = openusb.spec.in

.PHONY: files release snapshot

files:
	@files=`ls $(DISTFILES) 2> /dev/null `; for p in $$files; do \
	  echo $$p; \
	done

release:
	rm -rf .deps */.deps
	$(MAKE) distcheck

snapshot:
	$(MAKE) dist distdir=$(PACKAGE)-`date +"%Y%m%d"`

dist-hook: openusb.spec
	if test -e $(srcdir)/INSTALL.openusb.in && test -e $(srcdir)/README.in ; then \
	     CONFIG_FILES="INSTALL.openusb:$(srcdir)/INSTALL.openusb.in README:$(srcdir)/README.in" \
	     CONFIG_HEADERS= \
	     $(SHELL) config.status \
	     && cp INSTALL.openusb LICENSE README $(distdir) ; \
	fi \
	&& cp buildosxframework.sh openusb.spec $(distdir)
	test -e $(top_srcdir)/doc/html && cp -r $(top_srcdir)/doc/html $(distdir)/doc || echo "no built doc"
#	-$(MAKE) dist-bzip2 # create .tar.bz2 dist package if supported

########################################################################
# create .tar.bz2 distribution package for convenience if the
# $(TAR) on this system supports it. else do nothing.
dist-bzip2:
	-chmod -R a+r $(distdir)
	-$(TAR) -c --bzip2 -h -o -f $(distdir).tar.bz2 $(distdir)

