SUBDIRS = $(SRCDIRS)

lib_LTLIBRARIES = libpslib.la

libpslib_la_CPPFLAGS = $(SRCINC)
libpslib_la_LIBADD = $(SRCSUBLIBS)
libpslib_la_DEPENDENCIES = $(SRCSUBLIBS)

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


EXTRA_DIST = mainpage.dox psErrorCodes_en.dat psTest.h psErrorText.h.in psErrorText_en.dat

BUILT_SOURCES = psErrorText.h
psErrorText.h: psErrorText_$(PS_LANG).dat
	$(top_srcdir)/psParseErrorCodes --data=$? $(srcdir)/psErrorText.h

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

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