1## @configure_input@
2##
3## Filename    : Makefile
4## Description : Builds the example programs
5## Author(s)   : SBML Team <sbml-team@googlegroups.com>
6## Created     : 2002-12-05
7##
8## <!--------------------------------------------------------------------------
9## This file is part of libSBML.  Please visit http://sbml.org for more
10## information about SBML, and the latest version of libSBML.
11##
12## Copyright (C) 2013-2018 jointly by the following organizations:
13##     1. California Institute of Technology, Pasadena, CA, USA
14##     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
15##     3. University of Heidelberg, Heidelberg, Germany
16##
17## Copyright (C) 2009-2013 jointly by the following organizations:
18##     1. California Institute of Technology, Pasadena, CA, USA
19##     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
20##
21## Copyright (C) 2006-2008 by the California Institute of Technology,
22##     Pasadena, CA, USA
23##
24## Copyright (C) 2002-2005 jointly by the following organizations:
25##     1. California Institute of Technology, Pasadena, CA, USA
26##     2. Japan Science and Technology Agency, Japan
27##
28## This library is free software; you can redistribute it and/or modify it
29## under the terms of the GNU Lesser General Public License as published by
30## the Free Software Foundation.  A copy of the license agreement is provided
31## in the file named "LICENSE.txt" included with this software distribution
32## and also available online as http://sbml.org/software/libsbml/license.html
33## ------------------------------------------------------------------------ -->
34##
35## The original code contained here was initially developed by:
36##
37##     Ben Bornstein
38##     SBML Team
39##     Control and Dynamical Systems, MC 107-81
40##     California Institute of Technology
41##     Pasadena, CA, 91125, USA
42##
43##     http://www.sbml.org
44##     mailto:sbml-team@googlegroups.com
45##
46## Contributor(s):
47##  <mhucka@caltech.edu> Created the Makefile.in version of this file.
48
49# The values of the following variables are obtained using the libSBML
50# configuration program.
51
52SRCDIR     = ../../src
53INCLUDEDIR = ../../src
54
55top_builddir = @top_builddir@
56LIBTOOL    = @LIBTOOL@
57CC         = $(LIBTOOL) --mode=link @CC@
58CFLAGS     = @CFLAGS@ -Wall
59
60LIBS       = -lsbml
61
62# If you are presently reading Makefile and not Makefile.in, the following
63# lists may have empty values.  This is okay; it's merely a result of how
64# the values are obtained when Makefile is generated from Makefile.in
65# by the ../../configure program.
66
67CPPFLAGS  += @EXPAT_CPPFLAGS@ @XERCES_CPPFLAGS@ @LIBXML_CPPFLAGS@
68LDFLAGS   += @EXPAT_LDFLAGS@ @XERCES_LDFLAGS@ @LIBXML_LDFLAGS@
69LIBS      += @EXPAT_LIBS@ @XERCES_LIBS@ @LIBXML_LIBS@
70
71CPPFLAGS  += -I$(INCLUDEDIR)
72LDFLAGS   += -L$(SRCDIR)
73LIBS      += -lstdc++ -lm
74
75# The rest of this Makefile remains static regardless of the values
76# assigned to the variables above.
77
78programs   = convertSBML evaluateMath echoSBML printMath printSBML \
79             readSBML translateMath validateSBML addCVTerms \
80			 addingEvidenceCodes_1 addingEvidenceCodes_2 addModelHistory \
81			 appendAnnotation createExampleSBML printAnnotation \
82			 printNotes printRegisteredPackages printSupported printUnits \
83			 unsetAnnotation unsetNotes stripPackage
84
85all: $(programs)
86
87convertSBML: convertSBML.c util.c
88	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
89
90drawMath: drawMath.c util.c
91	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
92
93echoSBML: echoSBML.c
94	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) -lm
95
96evaluateMath: evaluateMath.c util.c
97	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) -lm
98
99printMath: printMath.c util.c
100	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) -lm
101
102printSBML: printSBML.c util.c
103	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
104
105readSBML: readSBML.c util.c
106	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
107
108translateMath: translateMath.c util.c
109	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
110
111validateSBML: validateSBML.c util.c
112	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
113
114addCVTerms: addCVTerms.c util.c
115	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
116
117addingEvidenceCodes_1: addingEvidenceCodes_1.c util.c
118	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
119
120addingEvidenceCodes_2: addingEvidenceCodes_2.c util.c
121	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
122
123addModelHistory: addModelHistory.c util.c
124	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
125
126stripPackage: stripPackage.c util.c
127	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
128
129appendAnnotation: appendAnnotation.c util.c
130	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
131
132createExampleSBML: createExampleSBML.c util.c
133	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
134
135printAnnotation: printAnnotation.c util.c
136	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
137
138printNotes: printNotes.c util.c
139	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
140
141printRegisteredPackages: printRegisteredPackages.c util.c
142	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
143
144printSupported: printSupported.c util.c
145	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
146
147printUnits: printUnits.c util.c
148	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
149
150unsetAnnotation: unsetAnnotation.c util.c
151	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
152
153unsetNotes: unsetNotes.c util.c
154	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
155
156translateL3Math: translateL3Math.c util.c
157	$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
158
159clean:
160	/bin/rm -f *~ $(programs) $(patsubst %,%.exe,$(programs))
161
162distclean: clean
163	/bin/rm Makefile
164
165
166# The following are generic 'make' targets that are not used in
167# this simple examples directory.
168
169check dist docs install install-docs uninstall \
170mostlyclean maintainer-clean installcheck dvi pdf ps info html \
171distcheck:
172
173