SUBDIRS = astronomy collections dataManip dataIO image sysUtils

INCLUDES = \
	-I$(top_srcdir)/src/astronomy \
	-I$(top_srcdir)/src/collections \
	-I$(top_srcdir)/src/dataManip \
	-I$(top_srcdir)/src/dataIO \
	-I$(top_srcdir)/src/image \
	-I$(top_srcdir)/src/sysUtils \
	$(all_includes)

lib_LTLIBRARIES = libpslib.la
bin_SCRIPTS = psParseErrorCodes

libpslib_la_LIBADD = \
	$(top_builddir)/src/astronomy/libpslibastronomy.la \
	$(top_builddir)/src/collections/libpslibcollections.la \
	$(top_builddir)/src/dataManip/libpslibdataManip.la \
	$(top_builddir)/src/dataIO/libpslibdataIO.la \
	$(top_builddir)/src/image/libpslibimage.la \
	$(top_builddir)/src/sysUtils/libpslibsysUtils.la

libpslib_la_SOURCES = psTest.c
libpslib_la_LDFLAGS = -version-info $(PSLIB_LT_VERSION)

EXTRA_DIST = mainpage.dox psErrorCodes.dat psTest.h psParseErrorCodes

pslibincludedir = $(includedir)
pslibinclude_HEADERS = \
	psTest.h \
	pslib.h \
	pslib_strict.h

install-exec-hook: libpslib.la
	sed "s|\(^dependency_libs=.*\)|dependency_libs=\'$(PSLIB_LIBS)\'|" $(libdir)/libpslib.la > libpslib.la.temp
	$(INSTALL) libpslib.la.temp $(libdir)/libpslib.la
