# Makefile.am - Copyright 2005, 2006, University
#               of Padova, dept. of Pure and Applied
#               Mathematics
#
# This file is part of SGPEMv2.
#
# This is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# SGPEMv2 is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with SGPEMv2. If not, see http://www.gnu.org/licenses/.



# extra calls
.PHONY : apidox

# this should be the only recursive call
SUBDIRS = po

# directories definition
datarootdir = @datarootdir@
localedir = @datadir@/locale
plugindir = $(SGPEMV2_PLUGINS_DIR)
sharedir = $(plugindir)/extras/xmlsave
policiesdir = $(SGPEMV2_POLICIES_DIR)

#define empty global variables
plugin_LTLIBRARIES =
noinst_HEADERS =
EXTRA_DIST =
MAINTAINERCLEANFILES =
MOSTLYCLEANFILES =
CLEANFILES =

# ############################################################
#
# extra dist, cleanup and automake/aclocal flags
#
# ############################################################

ACLOCAL_AMFLAGS = -I m4 --install

macros = m4/compilerflags.m4 \
	m4/linkingflags.m4 \
	m4/sgpemv2-dirs.m4

EXTRA_DIST += \
	gettext.h \
	$(macros)

# dtds
EXTRA_DIST += src/sgpem.dtd

# ############################################################
#
# source : libxmlsave.la
#
# ############################################################

plugin_LTLIBRARIES += libxmlsave.la

libxmlsave_la_CPPFLAGS = \
               -I@top_srcdir@ \
               -DSHAREDIR="\"$(sharedir)\"" \
               -DLOCALEDIR="\"$(localedir)\"" \
               $(LIBXML2_CFLAGS) \
               $(GLIBMM_CFLAGS) \
	             $(SGPEMV2_CFLAGS)
libxmlsave_la_CXXFLAGS = \
               $(VISIB_HIDDEN)
libxmlsave_la_LIBADD = \
               $(LIBXML2_LIBS) \
               $(GLIBMM_LIBS) \
               $(SGPEMV2_LIBS)
libxmlsave_la_LDFLAGS = \
               $(LT_LDFLAGS) \
               -version-info 0:0:0 \
               -module

# Please keep this in sorted order:
libxmlsave_la_SOURCES = \
         src/plugin.cc \
	       src/xml_serializer.cc \
	       src/xml_serializer_factory.cc \
	       src/xml_visitor.cc

noinst_HEADERS += \
	       src/xml_serializer_factory.hh \
	       src/xml_serializer.hh \
	       src/xml_visitor.hh

# ############################################################
#
# check : testsuite
#
# ############################################################

if COND_TESTS

# DEJATOOL = src/testsuite/example-test.exp

#noinst_PROGRAMS = \
#	src/testsuite/test-xmlsave

#src_testsuite_test_xml_save_CPPFLAGS = \
#               -I@top_srcdir@ \
#	       -DSHAREDIR="\"$(sharedir)\"" \
#               $(LIBXML2_CFLAGS) \
#               $(GLIBMM_CFLAGS) \
#	       $(SGPEMV2_CFLAGS)
#src_testsuite_test_xml_save_DEPENDENCIES = \
#               libxmlsave.la
#src_testsuite_test_xml_save_LDFLAGS = \
#               $(SGPEMV2_LIBS) \
#               $(GLIBMM_LIBS) \
#               $(LIBXML2_LIBS)
#src_testsuite_test_xml_save_SOURCES = \
#               src/testsuite/test-xml_save.cc

# Workaround an automake bug that leaves behind some files 
# while it's finishing the distcheck target
#CLEANFILES += \
#	src/testsuite/.libs/test-xml_save

endif #~ if COND_TESTS

