## @configure_input@
##
## Filename    : Makefile.in
## Description : Makefile template for libsbml main sources
## Author(s)   : SBML Team <sbml-team@googlegroups.com>
## Organization: California Institute of Technology
## Created     : 2004-06-11
##
## <!--------------------------------------------------------------------------
## 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
## ------------------------------------------------------------------------ -->


# -----------------------------------------------------------------------------
# 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 @top_srcdir@/config/makefile-common-vars.mk

# `srcdir' points to the current directory, but should be set by configure.
# `subdir' must be set manually to the relative dir under `srcdir'.  Don't 
# set `subdir' to an absolute path, or some `make' actions will fail.

srcdir  = @srcdir@
thisdir = src

# Variables `subdirs', `headers', `sources', `libraries', `extra_CPPFLAGS',
# `extra_CXXFLAGS', `extra_LDFLAGS' and `distfiles' are used by the default
# rules in `makefile-common-actions.mk' included at the end.

# Warning: the "sbml" subdir is special because it ends up linking all of
# libsbml.  Anything that goes into libsbml needs to appear on the
# `subdirs' list before "sbml".  However, the "bindings" directory needs to
# be very last because it depends on the libsbml library being linked.  So
# the last two items on this list should always be "sbml" and "bindings",
# in that order.  Finally, anything added here ahead of "sbml" needs to be
# also added to the variable "otherdirs" in sbml/Makefile.in, again because
# that one links all the objects together into libsbml.  (This is confusing
# and fragile, and should be improved some day.)

subdirs = sbml bindings

ifdef USE_EXPAT
  extra_CPPFLAGS  += $(EXPAT_CPPFLAGS)
  extra_LDFLAGS   += $(EXPAT_LDFLAGS)
  extra_LIBS      += $(EXPAT_LIBS)
else
  ifdef USE_XERCES
    extra_CPPFLAGS  += $(XERCES_CPPFLAGS)
    extra_LDFLAGS   += $(XERCES_LDFLAGS)
    extra_LIBS      += $(XERCES_LIBS)
  else
    extra_CPPFLAGS  += $(LIBXML_CPPFLAGS)
    extra_LDFLAGS   += $(LIBXML_LDFLAGS)
    extra_LIBS      += $(LIBXML_LIBS)
  endif
endif

# `distfiles' determines the files and directories included in a distribution.
# `distfiles_exclude' is used to filter out specific items, so that even if
# they appear in `distfiles', they will not be copied in the distribution.

distfiles = Makefile.in               \
		layout-package.cmake           \
    l3v2extendedmath-package.cmake \
		CMakeLists.txt                 \


# -----------------------------------------------------------------------------
# Primary build actions
# -----------------------------------------------------------------------------

# The default action is to remake everything.  Those rules which are not
# defined below are defined in makefile-common-actions.mk.  Targets of the
# form 'foo-recursive' are interpreted by the common makefile rules as meaning
# "go into every subdir and do 'make foo' in each".

all: Makefile all-recursive

include: include-recursive

docs:


# -----------------------------------------------------------------------------
# Checking.
# -----------------------------------------------------------------------------

check: check-prereq check-recursive

check-prereq: ;
ifneq "$(MAKEFLAGS)" ""
	$(MAKE) -$(MAKEFLAGS) all
else
	$(MAKE) all
endif


# -----------------------------------------------------------------------------
# Tags.
# -----------------------------------------------------------------------------

tags: etags ctags


# -----------------------------------------------------------------------------
# Installation.
# -----------------------------------------------------------------------------

install: all install-recursive install-libraries

install-docs:

installcheck: all installcheck-libraries

uninstall: uninstall-recursive


# -----------------------------------------------------------------------------
# Cleaning.
# -----------------------------------------------------------------------------

clean: clean-normal clean-recursive

distclean: distclean-normal distclean-recursive

mostlyclean: mostlyclean-normal mostlyclean-recursive

maintainer-clean: maintainer-clean-normal maintainer-clean-recursive


# -----------------------------------------------------------------------------
# Creating distribution (for libSBML maintainers only)
# -----------------------------------------------------------------------------

dist: dist-recursive dist-normal

distcheck: distcheck-recursive distcheck-normal


# -----------------------------------------------------------------------------
# Common default rules.
# -----------------------------------------------------------------------------

include @top_srcdir@/config/makefile-common-actions.mk


# -----------------------------------------------------------------------------
# End.
# -----------------------------------------------------------------------------

