1## @configure_input@
2##
3## \file    Makefile.in
4## \brief   Makefile template for libsbml MATLAB bindings test
5## \author  SBML Team <sbml-team@googlegroups.com>
6##
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
36# -----------------------------------------------------------------------------
37# Configuration variables
38# -----------------------------------------------------------------------------
39# Some of the following are substituted automatically by `configure'.  If
40# you are looking at "Makefile", do not edit these values; instead, run the
41# configure script at the top level of the src tree.  It will recreate
42# "Makefile".
43
44include @top_srcdir@/config/makefile-common-vars.mk
45
46# `srcdir' points to the current directory, but should be set by configure.
47# `subdir' must be set manually to the relative dir under `srcdir'.  Don't
48# set `subdir' to an absolute path, or some `make' actions will fail.
49
50srcdir    = @srcdir@
51thisdir   = src/bindings/matlab/test
52
53# Variables `headers', `sources', `libraries', `extra_CPPFLAGS',
54# `extra_CXXFLAGS', `extra_LDFLAGS' and `distfiles' are used by the default
55# rules in `makefile-common-actions.mk' included at the end.
56
57# `distfiles' determines the files and directories included in a distribution.
58# `distfiles_exclude' is used to filter out specific items, so that even if
59# they appear in `distfiles', they will not be copied in the distribution.
60
61test_data_files = $(wildcard test-data/*.xml)
62
63
64distfiles =                  \
65        Makefile.in          \
66        runTests.m           \
67        testBinding.m        \
68        testCVTerms.m        \
69        testIsSBMLModel.m    \
70        testMissingOutput.m  \
71        testReadFromFile1.m  \
72        testReadFromFile2.m  \
73        testReadFromFile3.m  \
74        testReadFromFile4.m  \
75        testReadFromFile5.m  \
76        testReadFromFile6.m  \
77        testReadFromFile7.m  \
78        testReadFromFile8.m  \
79        testReadFromFile9.m  \
80        testReadFromFile10.m \
81        testReadFromFile11.m \
82        testReadFromFile12.m \
83        testReadFromFile13.m \
84        testReadFromFile14.m \
85        testReadFromFile15.m \
86		testReadFromFile16.m \
87        testReadFlags.m      \
88        compareFiles.m       \
89        testOutput.m         \
90		testReadFromFileFbc1.m  \
91    testReadFromFileFbc2.m  \
92    testReadWriteGeneProductIds.m \
93    testReadWriteGeneProducts.m   \
94		testVersionInformation.m \
95		testGetSBMLDefaultStruct.m \
96    test-data/missing_out.mat \
97        $(test_data_files)
98
99# `extra_clean' and `extra_distclean' determine the files and directories
100# removed during "make clean" and "make distclean".
101
102extra_clean = test.log
103
104extra_distclean = Makefile
105
106
107# -----------------------------------------------------------------------------
108# Primary build actions
109# -----------------------------------------------------------------------------
110
111# The default action is to do nothing except maybe remake the Makefile.  The
112# real actions are triggered by 'make check'.
113
114all: Makefile
115
116
117# -----------------------------------------------------------------------------
118# Checking.
119# -----------------------------------------------------------------------------
120
121matlab_test_args = -$(MEX_ARCH) -nosplash -nodesktop -memmgr debug -logfile runTests.log
122
123# The default libsbmlrun sets DYLD/LD_LIBRARY_PATH, which seems to screw up
124# MATLAB on MacOS 10.5 if one has MacPorts installed and DYLD_LIBRARY_PATH
125# contains /opt/local/lib with libraries that conflict with MATLAB's own.
126# The following defines a run command that omits the library paths, at
127# the risk of causing some other problems for other people.  I'm not sure
128# how else to handle the problem at this time.
129
130define matlabrun
131  env MATLABROOT="$(MATLABROOT)" ARCH="$(MEX_ARCH)" CFLAGS="$(CFLAGS)" srcdir=. \
132    $(LIBTOOL) -dlopen $(TOP_BUILDDIR)/src/libsbml.la --mode=execute $(1)
133endef
134
135here = $(shell /bin/pwd)
136
137check: $(libraries)
138	@echo
139	@echo
140	@echo Running Tests in $(thisdir)
141	@echo -----------------------------------------------------------------
142	$(call matlabrun,$(MATLAB) $(matlab_test_args) -r "cd ('$(here)'); runTests")
143	@echo -----------------------------------------------------------------
144	@echo
145
146
147# -----------------------------------------------------------------------------
148# Installation
149# -----------------------------------------------------------------------------
150
151# This library doesn't actually get installed.  The main libsbml library
152# (in ../src) slurps in the contents when it's built.
153
154install:
155
156uninstall:
157
158installcheck:
159
160
161# -----------------------------------------------------------------------------
162# Cleaning.
163# -----------------------------------------------------------------------------
164
165clean: clean-normal
166
167distclean: distclean-normal
168
169mostlyclean: mostlyclean-normal
170
171maintainer-clean: maintainer-clean-normal
172
173
174# -----------------------------------------------------------------------------
175# Creating distribution (for libSBML maintainers only)
176# -----------------------------------------------------------------------------
177
178dist: all dist-normal
179
180distcheck: all distcheck-normal
181
182
183# -----------------------------------------------------------------------------
184# Miscellaneous
185# -----------------------------------------------------------------------------
186
187include @top_srcdir@/config/makefile-common-actions.mk
188
189
190# -----------------------------------------------------------------------------
191# End.
192# -----------------------------------------------------------------------------
193
194