EXTRA_LIBS=

## extra files
EXTRA_DIST = THANK.YOU LGPL.TXT \
ZTHREAD_2_0_5.dsw \
ZTHREAD_2_0_5_shared.dsp \
ZTHREAD_2_0_5_static.dsp \
acconfig.h depcomp


## install the config script
install-exec-hook:
	$(mkinstalldirs) $(bindir)
	$(INSTALL_PROGRAM) $(top_srcdir)/share/zthread-config $(bindir)

## install the config script & m4 macros
install-data-hook:
	$(mkinstalldirs) $(datadir)/aclocal
	$(INSTALL_DATA) $(top_srcdir)/share/zthread.m4 $(datadir)/aclocal
	$(INSTALL_DATA) $(top_srcdir)/share/pthread.m4 $(datadir)/aclocal

## uninstall the config script & m4 macros
uninstall-local:
	-rm -rf $(datadir)/aclocal/pthread.m4
	-rm -rf $(datadir)/aclocal/zthread.m4

## include the doc & share directories in the distribution
dist-hook:
	cp -dpR $(top_srcdir)/doc $(distdir)
	cp -dpR $(top_srcdir)/share $(distdir)
	cp -dpR $(top_srcdir)/contrib $(distdir)


## RPM from the distribution rule
rpm: dist
	rpm -ta $(PACKAGE)-$(VERSION).tar.gz
	mv -f /usr/src/redhat/SRPMS/$(PACKAGE)-$(VERSION)-*.rpm .
	mv -f /usr/src/redhat/RPMS/*/$(PACKAGE)-$(VERSION)-*.rpm .
	mv -f /usr/src/redhat/RPMS/*/$(PACKAGE)-devel-$(VERSION)-*.rpm .
	mv -f /usr/src/redhat/RPMS/*/$(PACKAGE)-doc-$(VERSION)-*.rpm .

## Build the documentation
docs: 
	if test x$(DOXYGEN) != x; then\
	-rm -f $(top_srcdir)/doc/html/*; \
	$(DOXYGEN) $(top_srcdir)/doc/zthread.doxygen; \
	else \
	echo; \
	echo "This configuration requires Doxygen, by Dimitri van Heesch."; \
	echo "Visit www.stack.nl/~dimitri/doxygen/ for information about how to"; \
	echo "obtain a copy. If you already have Doxygen and it was not detected"; \
	echo "you should try the --with-doxygen option."; \
	echo; \
	fi; 


