## @configure_input@
##
## Filename    : Makefile
## Description : Builds the example programs
## Author(s)   : SBML Team <sbml-team@googlegroups.com>
## Created     : 2002-12-05
##
## <!--------------------------------------------------------------------------
## This file is part of libSBML.  Please visit http://sbml.org for more
## information about SBML, and the latest version of libSBML.
##
## Copyright (C) 2013-2018 jointly by the following organizations:
##     1. California Institute of Technology, Pasadena, CA, USA
##     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
##     3. University of Heidelberg, Heidelberg, Germany
##
## Copyright (C) 2009-2013 jointly by the following organizations: 
##     1. California Institute of Technology, Pasadena, CA, USA
##     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
##  
## Copyright (C) 2006-2008 by the California Institute of Technology,
##     Pasadena, CA, USA 
##  
## Copyright (C) 2002-2005 jointly by the following organizations: 
##     1. California Institute of Technology, Pasadena, CA, USA
##     2. Japan Science and Technology Agency, Japan
## 
## This library is free software; you can redistribute it and/or modify it
## under the terms of the GNU Lesser General Public License as published by
## the Free Software Foundation.  A copy of the license agreement is provided
## in the file named "LICENSE.txt" included with this software distribution
## and also available online as http://sbml.org/software/libsbml/license.html
## ------------------------------------------------------------------------ -->
##
## The original code contained here was initially developed by:
##
##     Ben Bornstein
##     SBML Team
##     Control and Dynamical Systems, MC 107-81
##     California Institute of Technology
##     Pasadena, CA, 91125, USA
##
##     http://www.sbml.org
##     mailto:sbml-team@googlegroups.com
##
## Contributor(s):
##  <mhucka@caltech.edu> Created the Makefile.in version of this file.
# -----------------------------------------------------------------------------
# Configuration variables
# -----------------------------------------------------------------------------
# Some of the following are substituted automatically by `configure'.  If
# you are looking at "Makefile", do not edit these values; instead, run the
# configure script at the top level of the src tree.  It will recreate
# "Makefile".

include ../../../config/makefile-common-vars.mk


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

CORE_LIB     = ../../../src/libsbml.la
INCLUDEDIR   = ../../../src

top_builddir = @top_builddir@
LIBTOOL      = @LIBTOOL@
CXX          = $(LIBTOOL) --mode=link @CXX@ $(CXXFLAGS)
CXXFLAGS     = @CXXFLAGS@ -Wall
extra_CPPFLAGS = -I.. -DPACKAGE_VERSION=\"$(PACKAGE_VERSION)\" -I$(INCLUDEDIR)
LIBS = $(CORE_LIB) 

ifdef USE_EXPAT
  extra_CPPFLAGS += $(EXPAT_CPPFLAGS)
  extra_LDFLAGS  += $(EXPAT_LDFLAGS)
  extra_LIBS     += $(EXPAT_LIBS) 
endif

ifdef USE_XERCES
  extra_CPPFLAGS += $(XERCES_CPPFLAGS)
  extra_LDFLAGS  += $(XERCES_LDFLAGS)
  extra_LIBS     += $(XERCES_LIBS) 
endif


ifdef USE_LIBXML
  extra_CPPFLAGS += $(LIBXML_CPPFLAGS)
  extra_LDFLAGS  += $(LIBXML_LDFLAGS)
  extra_LIBS     += $(LIBXML_LIBS) 
endif


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

programs = example1 example2 example3 example1-L3 example2-L3 example3-L3 \
           addLayout convertLayout


all: $(programs) Makefile.in

addLayout: addLayout.cpp
	$(CXX)  $(extra_CPPFLAGS) $(extra_LDFLAGS) -o $@ $^ $(extra_LIBS) $(LIBS)

example1: example1.cpp
	$(CXX) $(extra_CPPFLAGS) $(extra_LDFLAGS) -o $@ $^ $(extra_LIBS) $(LIBS)

example2: example2.cpp
	$(CXX)  $(extra_CPPFLAGS) $(extra_LDFLAGS) -o $@ $^ $(extra_LIBS) $(LIBS)


example3: example3.cpp
	$(CXX)  $(extra_CPPFLAGS) $(extra_LDFLAGS) -o $@ $^ $(extra_LIBS) $(LIBS)


example1-L3: example1-L3.cpp
	$(CXX) $(extra_CPPFLAGS) $(extra_LDFLAGS) -o $@ $^ $(extra_LIBS) $(LIBS)

example2-L3: example2-L3.cpp
	$(CXX)  $(extra_CPPFLAGS) $(extra_LDFLAGS) -o $@ $^ $(extra_LIBS) $(LIBS)


example3-L3: example3-L3.cpp
	$(CXX)  $(extra_CPPFLAGS) $(extra_LDFLAGS) -o $@ $^ $(extra_LIBS) $(LIBS)

convertLayout: convertLayout.cpp
	$(CXX)  $(extra_CPPFLAGS) $(extra_LDFLAGS) -o $@ $^ $(extra_LIBS) $(LIBS)



clean:
	/bin/rm -f $(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:

