SUBDIRS = $(SUBDIR)

bin_SCRIPTS = pslib-config psParseErrorCodes

pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA= pslib.pc

EXTRA_DIST = \
    Doxyfile.in \
    pslib-config.in \
    pslib.pc.in \
    share \
    psParseErrorCodes \
    psParsePrecessionTable \
    autogen.sh

if DOXYGEN
docs: Doxyfile $(prefix)/docs/pslib $(mandir)/man3
	doxygen Doxyfile
	mv -f $(prefix)/docs/pslib/man/man3/* $(mandir)/man3
	rm -rf $(prefix)/docs/pslib/man
endif

$(prefix)/docs/pslib:
	mkdir -p -m 755 $(prefix)/docs/pslib

$(mandir)/man3:
	mkdir -p -m 755 $(mandir)/man3

$(datadir)/pslib:
	mkdir -p -m 755 $(datadir)/pslib

install-data-hook: $(datadir)/pslib
	if [ `pwd`/share != $(datadir) ] ; then $(INSTALL) $(srcdir)/share/pslib/*.dat $(datadir)/pslib ; fi

uninstall-hook:
	if [ `pwd`/share != $(datadir) ] ; then rm -rf $(datadir)/pslib ; fi
	rm -rf $(prefix)/docs/pslib/*

CLEANFILES = $(prefix)/docs/pslib/*

test: check

distuninstallcheck_listfiles = \
	`find . -name .packlist -or -name perllocal.pod -or -name pslib.bs -or -name pslib.so -or -name pslib.pm`

distuninstallcheck:
	@:
