1## @configure_input@
2##
3## \file    Makefile.in
4## \brief   Makefile template for libsbml src/xml directory
5## \author  Michael Hucka <mhucka@caltech.edu>
6##
7## <!--------------------------------------------------------------------------
8## This file is part of libSBML.  Please visit http://sbml.org for more
9## information about SBML, and the latest version of libSBML.
10##
11## Copyright (C) 2020 jointly by the following organizations:
12##     1. California Institute of Technology, Pasadena, CA, USA
13##     2. University of Heidelberg, Heidelberg, Germany
14##     3. University College London, London, UK
15##
16## Copyright (C) 2013-2018 jointly by the following organizations:
17##     1. California Institute of Technology, Pasadena, CA, USA
18##     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
19##     3. University of Heidelberg, Heidelberg, Germany
20##
21## Copyright (C) 2009-2013 jointly by the following organizations:
22##     1. California Institute of Technology, Pasadena, CA, USA
23##     2. EMBL European Bioinformatics Institute (EMBL-EBI), Hinxton, UK
24##
25## Copyright (C) 2006-2008 by the California Institute of Technology,
26##     Pasadena, CA, USA
27##
28## Copyright (C) 2002-2005 jointly by the following organizations:
29##     1. California Institute of Technology, Pasadena, CA, USA
30##     2. Japan Science and Technology Agency, Japan
31##
32## This library is free software; you can redistribute it and/or modify it
33## under the terms of the GNU Lesser General Public License as published by
34## the Free Software Foundation.  A copy of the license agreement is provided
35## in the file named "LICENSE.txt" included with this software distribution
36## and also available online as http://sbml.org/software/libsbml/license.html
37## ------------------------------------------------------------------------ -->
38
39
40# -----------------------------------------------------------------------------
41# Configuration variables
42# -----------------------------------------------------------------------------
43# Some of the following are substituted automatically by `configure'.  If
44# you are looking at "Makefile", do not edit these values; instead, run the
45# configure script at the top level of the src tree.  It will recreate
46# "Makefile".
47
48include @top_srcdir@/config/makefile-common-vars.mk
49
50# `srcdir' points to the current directory, but should be set by configure.
51# `subdir' must be set manually to the relative dir under `srcdir'.  Don't
52# set `subdir' to an absolute path, or some `make' actions will fail.
53
54srcdir    = @srcdir@
55thisdir   = src/sbml/xml
56
57common_headers =              \
58  XMLAttributes.h             \
59  XMLBuffer.h                 \
60  XMLConstructorException.h   \
61  XMLError.h                  \
62  XMLErrorLog.h               \
63  XMLExtern.h                 \
64  XMLFileBuffer.h             \
65  XMLHandler.h                \
66  XMLInputStream.h            \
67  XMLLogOverride.h            \
68  XMLMemoryBuffer.h           \
69  XMLNamespaces.h             \
70  XMLNode.h                   \
71  XMLOutputStream.h           \
72  XMLParser.h                 \
73  XMLToken.h                  \
74  XMLTokenizer.h              \
75  XMLTriple.h
76
77common_sources =              \
78  XMLAttributes.cpp           \
79  XMLBuffer.cpp               \
80  XMLConstructorException.cpp \
81  XMLError.cpp                \
82  XMLErrorLog.cpp             \
83  XMLFileBuffer.cpp           \
84  XMLHandler.cpp              \
85  XMLInputStream.cpp          \
86  XMLLogOverride.cpp          \
87  XMLMemoryBuffer.cpp         \
88  XMLNamespaces.cpp           \
89  XMLNode.cpp                 \
90  XMLOutputStream.cpp         \
91  XMLParser.cpp               \
92  XMLToken.cpp                \
93  XMLTokenizer.cpp            \
94  XMLTriple.cpp
95
96xerces_headers =              \
97  XercesAttributes.h          \
98  XercesHandler.h             \
99  XercesNamespaces.h          \
100  XercesParser.h              \
101  XercesTranscode.h
102
103xerces_sources =              \
104  XercesAttributes.cpp        \
105  XercesHandler.cpp           \
106  XercesNamespaces.cpp        \
107  XercesParser.cpp            \
108  XercesTranscode.cpp
109
110expat_headers =               \
111  ExpatAttributes.h           \
112  ExpatHandler.h              \
113  ExpatParser.h
114
115expat_sources =               \
116  ExpatAttributes.cpp         \
117  ExpatHandler.cpp            \
118  ExpatParser.cpp
119
120libxml_headers =              \
121  LibXMLAttributes.h          \
122  LibXMLHandler.h             \
123  LibXMLNamespaces.h          \
124  LibXMLParser.h              \
125  LibXMLTranscode.h
126
127libxml_sources =              \
128  LibXMLAttributes.cpp        \
129  LibXMLHandler.cpp           \
130  LibXMLNamespaces.cpp        \
131  LibXMLParser.cpp            \
132  LibXMLTranscode.cpp
133
134# Variables `subdirs', `headers', `sources', `libraries', `extra_CPPFLAGS',
135# `extra_CXXFLAGS', `extra_LDFLAGS' and `distfiles' are used by the default
136# rules in `makefile-common-actions.mk' included at the end.
137
138sources = $(common_sources)
139headers = $(common_headers)
140
141ifdef USE_EXPAT
142  sources        += $(expat_sources)
143  headers        += $(expat_headers)
144
145  extra_CPPFLAGS += $(EXPAT_CPPFLAGS) -DUSE_EXPAT
146  extra_LDFLAGS  += $(EXPAT_LDFLAGS)
147  extra_LIBS     += $(EXPAT_LIBS)
148endif
149
150ifdef USE_XERCES
151  sources        += $(xerces_sources)
152  headers        += $(xerces_headers)
153
154  extra_CPPFLAGS += $(XERCES_CPPFLAGS) -DUSE_XERCES
155  extra_LDFLAGS  += $(XERCES_LDFLAGS)
156  extra_LIBS     += $(XERCES_LIBS)
157endif
158
159ifdef USE_LIBXML
160  sources        += $(libxml_sources)
161  headers        += $(libxml_headers)
162
163  extra_CPPFLAGS += $(LIBXML_CPPFLAGS) -DUSE_LIBXML
164  extra_LDFLAGS  += $(LIBXML_LDFLAGS)
165  extra_LIBS     += $(LIBXML_LIBS)
166endif
167
168ifeq "$(HOST_TYPE)" "cygwin"
169
170# Under cygwin, at least in gcc 3.4.4, the standard gcc STL class files
171# generate compiler warnings about use of uninitialized variables.  To
172# avoid confusing libSBML users, ignore this particular warning.  This is
173# not very safe because it can mask a real problem in OUR code, but it's
174# not easy to figure out what else to do, and anyway, if there are problems
175# we will probably catch them when testing on other platforms.
176
177problemversions = $(shell expr match `gcc -dumpversion` "3.4.4")
178
179CXXFLAGS += $(shell if (($(problemversions))); then echo -Wno-uninitialized; fi)
180
181endif
182
183header_inst_prefix = xml
184
185subdirs = test
186
187# `distfiles' determines the files and directories included in a distribution.
188# `distfiles_exclude' is used to filter out specific items, so that even if
189# they appear in `distfiles', they will not be copied in the distribution.
190
191distfiles = $(sources) $(expat_sources) $(xerces_sources) $(libxml_sources) \
192	    $(headers) $(expat_headers) $(xerces_headers) $(libxml_headers) \
193	    Makefile.in
194
195
196# -----------------------------------------------------------------------------
197# Primary build actions
198# -----------------------------------------------------------------------------
199
200# The default action is to remake everything.
201
202all: Makefile default
203
204
205# -----------------------------------------------------------------------------
206# Checking.
207# -----------------------------------------------------------------------------
208
209check: all check-recursive
210
211
212# -----------------------------------------------------------------------------
213# Tags.
214# -----------------------------------------------------------------------------
215
216tags: etags ctags
217
218
219# -----------------------------------------------------------------------------
220# Installation
221# -----------------------------------------------------------------------------
222
223# This library doesn't actually get installed.  The main libsbml library
224# (in ../src) slurps in the contents when it's built.
225
226install: all install-headers
227
228installcheck: all installcheck-headers
229
230uninstall: uninstall-headers
231
232
233# -----------------------------------------------------------------------------
234# Cleaning.
235# -----------------------------------------------------------------------------
236
237clean: clean-normal clean-recursive
238
239distclean: distclean-normal distclean-recursive
240
241mostlyclean: mostlyclean-normal mostlyclean-recursive
242
243maintainer-clean: maintainer-clean-normal maintainer-clean-recursive
244
245
246# -----------------------------------------------------------------------------
247# Creating distribution (for libSBML maintainers only)
248# -----------------------------------------------------------------------------
249
250dist: all dist-normal dist-recursive
251
252distcheck: all distcheck-normal distcheck-recursive
253
254
255# -----------------------------------------------------------------------------
256# Miscellaneous
257# -----------------------------------------------------------------------------
258
259include @top_srcdir@/config/makefile-common-actions.mk
260
261
262# -----------------------------------------------------------------------------
263# End.
264# -----------------------------------------------------------------------------
265
266