1## @configure_input@
2##
3## Filename    : Makefile.in
4## Description : Makefile template for libsbml src/sbml/test
5## Author(s)   : Michael Hucka <mhucka@caltech.edu>
6## Organization: California Institute of Technology
7## Created     : 2005-03-02
8##
9## <!--------------------------------------------------------------------------
10## This file is part of libSBML.  Please visit http://sbml.org for more
11## information about SBML, and the latest version of libSBML.
12##
13## Copyright (C) 2020 jointly by the following organizations:
14##     1. California Institute of Technology, Pasadena, CA, USA
15##     2. University of Heidelberg, Heidelberg, Germany
16##     3. University College London, London, UK
17##
18## Copyright (C) 2013-2018 jointly by the following organizations:
19##     1. California Institute of Technology, Pasadena, CA, USA
20##     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
21##     3. University of Heidelberg, Heidelberg, Germany
22##
23## Copyright (C) 2009-2013 jointly by the following organizations:
24##     1. California Institute of Technology, Pasadena, CA, USA
25##     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
26##
27## Copyright (C) 2006-2008 by the California Institute of Technology,
28##     Pasadena, CA, USA
29##
30## Copyright (C) 2002-2005 jointly by the following organizations:
31##     1. California Institute of Technology, Pasadena, CA, USA
32##     2. Japan Science and Technology Agency, Japan
33##
34## This library is free software; you can redistribute it and/or modify it
35## under the terms of the GNU Lesser General Public License as published by
36## the Free Software Foundation.  A copy of the license agreement is provided
37## in the file named "LICENSE.txt" included with this software distribution
38## and also available online as http://sbml.org/software/libsbml/license.html
39## ------------------------------------------------------------------------ -->
40
41
42# -----------------------------------------------------------------------------
43# Configuration variables
44# -----------------------------------------------------------------------------
45# Some of the following are substituted automatically by `configure'.  If
46# you are looking at "Makefile", do not edit these values; instead, run the
47# configure script at the top level of the src tree.  It will recreate
48# "Makefile".
49
50include @top_srcdir@/config/makefile-common-vars.mk
51
52# `srcdir' points to the current directory, but should be set by configure.
53# `subdir' must be set manually to the relative dir under `srcdir'.  Don't
54# set `subdir' to an absolute path, or some `make' actions will fail.
55
56srcdir    = @srcdir@
57thisdir   = src/sbml/test
58
59# Variables `headers', `sources', `libraries', `extra_CPPFLAGS',
60# `extra_CXXFLAGS', `extra_LDFLAGS' and `distfiles' are used by the default
61# rules in `makefile-common-actions.mk' included at the end.
62
63test_sources =                   \
64  TestAlgebraicRule.c            \
65  TestAncestor.cpp               \
66  TestAssignmentRule.c           \
67  TestAttributeFunctions.cpp     \
68  TestCompartment.c              \
69  TestCompartmentType.c          \
70  TestCompartmentType_newSetters.c   \
71  TestCompartmentVolumeRule.c    \
72  TestCompartment_newSetters.c   \
73  TestConsistencyChecks.cpp      \
74  TestConstraint.c               \
75  TestConstraint_newSetters.c    \
76  TestCopyAndClone.cpp           \
77  TestDelay.c                    \
78  TestEvent.c                    \
79  TestEventAssignment.c          \
80  TestEventAssignment_newSetters.c          \
81  TestEvent_newSetters.c         \
82  TestFunctionDefinition.c       \
83  TestFunctionDefinition_newSetters.c       \
84  TestGetMultipleObjects.cpp     \
85  TestInitialAssignment.c        \
86  TestInitialAssignment_newSetters.c        \
87  TestInternalConsistencyChecks.cpp         \
88  TestKineticLaw.c               \
89  TestKineticLaw_newSetters.c    \
90  TestL3Compartment.c            \
91  TestL3Event.c                  \
92  TestL3KineticLaw.c             \
93  TestL3LocalParameter.c         \
94  TestL3Model.c                  \
95  TestL3Parameter.c              \
96  TestL3Reaction.c               \
97  TestL3Species.c                \
98  TestL3SpeciesReference.c       \
99  TestL3Trigger.c                \
100  TestL3Unit.c                   \
101  TestLevelCompatibility.cpp     \
102  TestListOf.c                   \
103  TestModel.c                    \
104  TestModel_newSetters.c         \
105  TestModifierSpeciesReference.c \
106  TestParameter.c                \
107  TestParameterRule.c            \
108  TestParameter_newSetters.c     \
109  TestPriority.c                 \
110  TestRateRule.c                 \
111  TestReaction.c                 \
112  TestReaction_newSetters.c      \
113  TestReadFromFile1.c            \
114  TestReadFromFile2.c            \
115  TestReadFromFile3.c            \
116  TestReadFromFile4.c            \
117  TestReadFromFile5.cpp          \
118  TestReadFromFile6.cpp          \
119  TestReadFromFile7.cpp          \
120  TestReadFromFile8.cpp          \
121  TestReadFromFile9.cpp          \
122  TestReadFromFileL2V5.cpp       \
123  TestReadFromFileL3V2.cpp       \
124  TestReadFromFileL3V2_1.cpp     \
125  TestReadFromFileL3V2_2.cpp     \
126  TestReadFromFileL3V2_3.cpp     \
127  TestReadFromFileL3V2_4.cpp     \
128  TestReadFromFileL3V2_5.cpp     \
129  TestReadFromFileL3V2_6.cpp     \
130  TestSBMLConvertFromL3V2.cpp    \
131  TestReadSBML.cpp               \
132  TestRemoveFromParent.cpp       \
133  TestRenameIDs.cpp              \
134  TestRequiredAttributes.cpp     \
135  TestRequiredElements.cpp       \
136  TestRule.c                     \
137  TestRule_newSetters.c          \
138  TestRunner.c                   \
139  TestSBMLConstructorException.cpp  \
140  TestSBMLConvert.c              \
141  TestSBMLConvertStrict.cpp      \
142  TestSBMLDocument.c             \
143  TestSBMLError.cpp              \
144  TestSBMLNamespaces.cpp         \
145  TestSBMLParentObject.cpp       \
146  TestSBMLTransforms.cpp         \
147  TestSBase.cpp                  \
148  TestSBaseIdName.cpp            \
149  TestSBase_newSetters.cpp       \
150  TestSpecies.c                  \
151  TestSpeciesConcentrationRule.c \
152  TestSpeciesReference.c         \
153  TestSpeciesReference_newSetters.c         \
154  TestSpeciesType.c              \
155  TestSpeciesType_newSetters.c   \
156  TestSpecies_newSetters.c       \
157  TestStoichiometryMath.c        \
158  TestSyntaxChecker.c            \
159  TestTrigger.c                  \
160  TestUnit.c                     \
161  TestUnitDefinition.c           \
162  TestUnitDefinition_newSetters.c           \
163  TestUnitKind.c                 \
164  TestUnit_newSetters.c          \
165  TestWriteL3SBML.cpp            \
166  TestWriteL3V2SBML.cpp          \
167  TestSBMLValidators.cpp         \
168  TestWriteSBML.cpp
169
170
171extra_CPPFLAGS = -I.. -I../..
172
173ifdef USE_LIBCHECK
174  check_driver      = TestRunner
175  ifeq "$(findstring $(LIBCHECK_CPPFLAGS),$(extra_CPPFLAGS))" ""
176    extra_CPPFLAGS  += $(LIBCHECK_CPPFLAGS)
177  endif
178  ifeq "$(findstring $(LIBCHECK_LDFLAGS),$(extra_LDFLAGS))" ""
179    extra_LDFLAGS   += $(LIBCHECK_LDFLAGS)
180  endif
181  ifeq "$(findstring $(LIBCHECK_LIBS),$(extra_LIBS))" ""
182    extra_LIBS      += $(LIBCHECK_LIBS)
183  endif
184  extra_clean       += $(check_driver)
185endif
186
187ifdef USE_EXPAT
188  extra_CPPFLAGS += $(EXPAT_CPPFLAGS) -DUSE_EXPAT
189  extra_LDFLAGS  += $(EXPAT_LDFLAGS)
190  extra_LIBS     += $(EXPAT_LIBS)
191endif
192
193ifdef USE_XERCES
194  extra_CPPFLAGS += $(XERCES_CPPFLAGS) -DUSE_XERCES
195  extra_LDFLAGS  += $(XERCES_LDFLAGS)
196  extra_LIBS     += $(XERCES_LIBS)
197endif
198
199ifdef USE_LIBXML
200  extra_CPPFLAGS += $(LIBXML_CPPFLAGS) -DUSE_LIBXML
201  extra_LDFLAGS  += $(LIBXML_LDFLAGS)
202  extra_LIBS     += $(LIBXML_LIBS)
203endif
204
205
206# `distfiles' determines the files and directories included in a distribution.
207# `distfiles_exclude' is used to filter out specific items, so that even if
208# they appear in `distfiles', they will not be copied in the distribution.
209
210test_data_files = $(wildcard test-data/*.xml) \
211		  $(wildcard test-data/*.xsd) \
212		  $(wildcard test-data/*.txt)
213
214distfiles = $(test_sources) $(test_data_files) Makefile.in CMakeLists.txt
215
216
217# -----------------------------------------------------------------------------
218# Primary build actions
219# -----------------------------------------------------------------------------
220
221# The default action is to do nothing except maybe remake the Makefile.  The
222# real actions are triggered by 'make check'.
223
224all: Makefile
225
226
227# -----------------------------------------------------------------------------
228# Checking.
229# -----------------------------------------------------------------------------
230
231# Variables $(test_objfiles), $(check_driver), and the rest of the code
232# for running check are abstracted out into makefile-common-actions.mk,
233# which is included at the bottom of this file.  Here we just need to construct
234# the appropriate list of object files to link together.  Because there are
235# dependencies on other subdirectoris of the source tree, we do some rummaging
236# around in .. and ../../subdirs.
237
238tmp           = $(test_sources:.cpp=.lo) $(test_sources:.c=.lo)
239localobjfiles = $(filter %.lo,$(tmp))
240
241otherdirs     = ..  ../util ../xml ../math ../units \
242                ../validator ../validator/constraints ../annotation \
243                ../compress ../common ../extension ../conversion
244
245ifdef USE_LAYOUT
246  otherdirs +=	../packages/layout/extension ../packages/layout/sbml \
247				../packages/layout/common  ../packages/layout/util \
248				../packages/layout/validator ../packages/layout/validator/constraints
249endif
250
251ifdef USE_FBC
252  otherdirs +=	../packages/fbc/extension ../packages/fbc/sbml \
253				../packages/fbc/common  ../packages/fbc/util \
254				../packages/fbc/validator ../packages/fbc/validator/constraints
255endif
256
257ifdef USE_QUAL
258  otherdirs +=	../packages/qual/extension ../packages/qual/sbml \
259				../packages/qual/common\
260				../packages/qual/validator ../packages/qual/validator/constraints
261endif
262
263ifdef USE_COMP
264  otherdirs +=	../packages/comp/extension ../packages/comp/sbml \
265				../packages/comp/common  ../packages/comp/util \
266				../packages/comp/validator ../packages/comp/validator/constraints
267endif
268
269otherobjfiles = $(wildcard $(addsuffix /*.lo,$(otherdirs)))
270
271test_objfiles = $(localobjfiles) $(otherobjfiles)
272
273ifdef USE_LIBCHECK
274  check: all run-checks
275else
276  check:; @echo Please first rerun 'configure' with the --with-check flag; exit 1
277endif
278
279
280# -----------------------------------------------------------------------------
281# Installation
282# -----------------------------------------------------------------------------
283
284# This library doesn't actually get installed.  The main libsbml library
285# (in ../src) slurps in the contents when it's built.
286
287install:
288
289uninstall:
290
291installcheck:
292
293
294# -----------------------------------------------------------------------------
295# Creating distribution (for libSBML maintainers only)
296# -----------------------------------------------------------------------------
297
298dist: all dist-normal
299
300distcheck: all distcheck-normal
301
302
303# -----------------------------------------------------------------------------
304# Miscellaneous
305# -----------------------------------------------------------------------------
306
307include @top_srcdir@/config/makefile-common-actions.mk
308
309
310# -----------------------------------------------------------------------------
311# End.
312# -----------------------------------------------------------------------------
313