RegularSources = \
        SbStringConvert.cpp \
        \
        ScXML.cpp \
        ScXMLP.cpp \
        ScXMLObject.cpp \
        ScXMLEvent.cpp \
        ScXMLEventTarget.cpp \
        ScXMLStateMachine.cpp \
        ScXMLDocument.cpp \
        \
        ScXMLElt.cpp \
        ScXMLScxmlElt.cpp \
        ScXMLInitialElt.cpp \
        ScXMLAbstractStateElt.cpp \
        ScXMLStateElt.cpp \
        ScXMLParallelElt.cpp \
        ScXMLFinalElt.cpp \
        ScXMLOnEntryElt.cpp \
        ScXMLOnExitElt.cpp \
        ScXMLTransitionElt.cpp \
        ScXMLHistoryElt.cpp \
        \
        ScXMLExecutableElt.cpp \
        ScXMLEventElt.cpp \
        ScXMLIfElt.cpp \
        ScXMLElseIfElt.cpp \
        ScXMLElseElt.cpp \
        ScXMLLogElt.cpp \
        \
        ScXMLDataModelElt.cpp \
        ScXMLDataElt.cpp \
        ScXMLAssignElt.cpp \
        ScXMLValidateElt.cpp \
        \
        ScXMLSendElt.cpp \
        ScXMLInvokeElt.cpp \
        ScXMLParamElt.cpp \
        ScXMLFinalizeElt.cpp \
        ScXMLContentElt.cpp \
        \
        ScXMLAnchorElt.cpp \
        \
        ScXMLScriptElt.cpp \
        \
        ScXMLEvaluator.cpp \
        \
        ScXMLMinimumEvaluator.cpp \
        eval-minimum.cpp \
        eval-minimum-tab.cpp \
        \
        ScXMLXPathEvaluator.cpp \
        ScXMLECMAScriptEvaluator.cpp

LinkHackSources = \
        all-scxml-cpp.cpp

PublicHeaders =

PrivateHeaders = \
        SbStringConvert.h \
        ScXMLP.h \
        ScXMLCommonP.h \
        eval-minimum.h

ObsoleteHeaders =

EXTRA_DIST = \
        eval-minimum.l \
        eval-minimum-tab.y

generate:
	( cd $(srcdir) && \
	  flex eval-minimum.l && \
	  patch -p0 <eval-minimum.cpp.patch )
	( cd $(srcdir) && \
	  bison eval-minimum-tab.y )

##$ BEGIN TEMPLATE Make-Common(scxml, scxml)
# **************************************************************************
# This template depends on the following variables having been set up before
# its invokation.
#
# PublicHeaders    - header files that should be installed
# PrivateHeaders   - source files that should be distributed, but not
#                    installed - including source-included source files.
# RegularSources   - source files compiled in this directory
# LinkHackSources  - alternative source files used on -enable-compact compilation
# ObsoletedHeaders - header files that should be removed upon installation

# Everything below is autogenerated from a macro, so don't modify
# within the Makefile.am itself. 19991201 mortene.

DISTCLEANFILES = \
	ii_files/*.ii

CLEANFILES = \
	vc*.pdb

if HACKING_COMPACT_BUILD
BuildSources = $(LinkHackSources)
ExtraSources = $(RegularSources)
else
BuildSources = $(RegularSources)
ExtraSources = $(LinkHackSources)
endif

if BUILD_WITH_MSVC
noinst_LIBRARIES = scxml.lst
else
if HACKING_DYNAMIC_MODULES
lib_LTLIBRARIES = libscxml@SUFFIX@LINKHACK.la
else
noinst_LTLIBRARIES = libscxml.la
endif
endif

# Remove any linklibraries detected by configure, as they are not
# needed in the submodules -- only in the toplevel libCoin build.
LIBS = 

DEFAULT_INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include $(ExtraIncludeDirs) -I$(top_builddir)/src -I$(top_srcdir)/src

# header installation
if MAC_FRAMEWORK
libscxmlincdir = $(MAC_FRAMEWORK_PREFIX)/$(MAC_FRAMEWORK_NAME).framework/Versions/$(MAC_FRAMEWORK_VERSION)/Headers/scxml
# hack to change libdir value when installing Mac OS X compiler framework
lib@nop@dir = $(MAC_FRAMEWORK_PREFIX)/$(MAC_FRAMEWORK_NAME).framework/Versions/$(MAC_FRAMEWORK_VERSION)/Libraries
else
libscxmlincdir = $(includedir)/Inventor/scxml
endif
libscxmlinc_HEADERS = $(PublicHeaders)

libscxml_la_SOURCES = $(BuildSources)
EXTRA_libscxml_la_SOURCES = \
	$(PublicHeaders) $(PrivateHeaders) $(ExtraSources)

libscxml@SUFFIX@LINKHACK_la_SOURCES = $(BuildSources)
EXTRA_libscxml@SUFFIX@LINKHACK_la_SOURCES = \
	$(PublicHeaders) $(PrivateHeaders) $(ExtraSources)

scxml_lst_SOURCES = $(BuildSources)
EXTRA_scxml_lst_SOURCES = \
	$(PublicHeaders) $(PrivateHeaders) $(ExtraSources)

# this rule causes a make warning, so we remove it when it is not in use
scxml.lst: Makefile $(scxml_lst_OBJECTS)
	@echo "Linking scxml.lst..."; \
	rm -f $@; touch $@; \
	for i in $(scxml_lst_OBJECTS); do echo $$i >>$@; done

install-libscxmlincHEADERS: $(libscxmlinc_HEADERS)
	@$(NORMAL_INSTALL)
	@if test x"$(libscxmlinc_HEADERS)" = x""; then :; else \
	  echo " $(mkinstalldirs) $(DESTDIR)$(libscxmlincdir)"; \
	  $(mkinstalldirs) $(DESTDIR)$(libscxmlincdir); \
	fi
	@list='$(libscxmlinc_HEADERS)'; for p in $$list; do \
	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
	  f="`echo $$p | sed -e 's|^.*/||'`"; \
	  src="$$d$$p"; dst="$(DESTDIR)$(libscxmlincdir)/$$f"; \
	  if cmp -s "$$src" "$$dst"; then :; else \
	    echo " $(INSTALL_HEADER) $$src $$dst"; \
	    $(INSTALL_HEADER) "$$src" "$$dst" || exit 1; \
	  fi \
	done
	@list='$(ObsoletedHeaders)'; for f in $$list; do \
	  file="$(DESTDIR)$(libscxmlincdir)/$$f"; \
	  if test -x "$$file"; then \
	    echo " rm -f $$file"; \
	    rm -f "$$file"; \
	  fi \
	done; \
	:

if MACOSX
# When using --enable-hacking, the user tends to manually replace some 
# of the installed libraries by symlinks back to the build directory. 
# But Mac OS X's install program refuses to overwrite symlinks => we 
# have to explicitly remove existing symlinks before installation.
install-exec-local:
	@for file in $(DESTDIR)$(lib@nop@dir)/libscxml@SUFFIX@LINKHACK*.dylib; do \
	  if test -L "$$file"; then \
	    rm -f "$$file"; \
	  fi \
	done; 
else 
install-exec-local:
endif

install-symlinks:
	@echo "Creating symlink to libscxml@SUFFIX@LINKHACK*@LIBEXT@*"; \
        for dir in $(SUBDIRS) ; do \
          (cd $$dir; $(MAKE) install-symlinks;) \
        done ; \
        here=`pwd`; \
	(cd $(DESTDIR)$(lib@nop@dir); \
	for file in libscxml@SUFFIX@LINKHACK*@LIBEXT@*; do \
	  ln -sf "$$here/.libs/$$file" "$$file"; \
	done; \
        cd -; )
##$ END TEMPLATE Make-Common
