## @configure_input@
##
## @file    Makefile
## @brief   Builds the Java example programs
## @author  Michael Hucka
##
## $Id: Makefile.in 10121 2009-08-28 11:47:20Z sarahkeating $
## $HeadURL: http://sbml.svn.sourceforge.net/svnroot/sbml/trunk/libsbml/examples/c++/Makefile.in $
##
## This file is part of libSBML.  Please visit http://sbml.org for more
## information about SBML, and the latest version of libSBML.
##

SRCDIR     = ../../src
INCLUDEDIR = ../../include

# The values of the following variables are obtained using the libSBML
# configuration program.

top_builddir = @top_builddir@
LIBTOOL    = @LIBTOOL@
CXX        = $(LIBTOOL) --mode=link @CXX@
CXXFLAGS   = @CXXFLAGS@ -Wall

LIBS       = -lsbml

# If you are presently reading Makefile and not Makefile.in, the following
# lists may have empty values.  This is okay; it's merely a result of how
# the values are obtained when Makefile is generated from Makefile.in
# by the ../../configure program.

CPPFLAGS  += @EXPAT_CPPFLAGS@ @XERCES_CPPFLAGS@ @LIBXML_CPPFLAGS@
LDFLAGS   += @EXPAT_LDFLAGS@ @XERCES_LDFLAGS@ @LIBXML_LDFLAGS@
LIBS      += @EXPAT_LIBS@ @XERCES_LIBS@ @LIBXML_LIBS@

CPPFLAGS  += -I$(INCLUDEDIR)
LDFLAGS   += -L$(SRCDIR)
LIBS      += -lstdc++ -lm

# The rest of this Makefile remains static regardless of the values
# assigned to the variables above.

programs   = convertSBML echoSBML printSBML readSBML translateMath \
	     validateSBML printMath printUnits createExampleSBML

all: $(programs)

convertSBML: convertSBML.cpp util.c
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)

echoSBML: echoSBML.cpp
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)

printSBML: printSBML.cpp util.c
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)

printUnits: printUnits.cpp util.c
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)

printMath: printMath.cpp util.c
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)

readSBML: readSBML.cpp util.c
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)

translateMath: translateMath.cpp
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)

validateSBML: validateSBML.cpp util.c
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)

# The following are still somewhat experimental and are not built by
# default, but are provided for interested persons.

appendAnnotation: appendAnnotation.cpp util.c
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)

printAnnotation: printAnnotation.cpp util.c
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)

printNotes: printNotes.cpp util.c
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)

unsetAnnotation: unsetAnnotation.cpp util.c
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)

unsetNotes: unsetNotes.cpp util.c
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)

createExampleSBML: createExampleSBML.cpp
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)

clean:
	/bin/rm -f *~ $(programs) $(patsubst %,%.exe,$(programs))

distclean: clean
	/bin/rm Makefile


# The following are generic 'make' targets that are not used in
# this simple examples directory.

check dist docs install install-docs uninstall \
mostlyclean maintainer-clean installcheck dvi pdf ps info html \
distcheck:
