xref: /freebsd/contrib/expat/lib/Makefile.am (revision dece5b05f577fc4c6b89af7ad48dfbdf7cc4945c)
1#
2#                          __  __            _
3#                       ___\ \/ /_ __   __ _| |_
4#                      / _ \\  /| '_ \ / _` | __|
5#                     |  __//  \| |_) | (_| | |_
6#                      \___/_/\_\ .__/ \__,_|\__|
7#                               |_| XML parser
8#
9# Copyright (c) 2017-2026 Sebastian Pipping <sebastian@pipping.org>
10# Copyright (c) 2017      Tomasz Kłoczko <kloczek@fedoraproject.org>
11# Copyright (c) 2019      David Loffredo <loffredo@steptools.com>
12# Copyright (c) 2026      Gordon Messmer <gordon.messmer@gmail.com>
13# Copyright (c) 2026      Nick Begg <nick@stunttruck.net>
14# Copyright (c) 2026      Matthew Fernandez <matthew.fernandez@gmail.com>
15# Licensed under the MIT license:
16#
17# Permission is  hereby granted,  free of charge,  to any  person obtaining
18# a  copy  of  this  software   and  associated  documentation  files  (the
19# "Software"),  to  deal in  the  Software  without restriction,  including
20# without  limitation the  rights  to use,  copy,  modify, merge,  publish,
21# distribute, sublicense, and/or sell copies of the Software, and to permit
22# persons  to whom  the Software  is  furnished to  do so,  subject to  the
23# following conditions:
24#
25# The above copyright  notice and this permission notice  shall be included
26# in all copies or substantial portions of the Software.
27#
28# THE  SOFTWARE  IS  PROVIDED  "AS  IS",  WITHOUT  WARRANTY  OF  ANY  KIND,
29# EXPRESS  OR IMPLIED,  INCLUDING  BUT  NOT LIMITED  TO  THE WARRANTIES  OF
30# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
31# NO EVENT SHALL THE AUTHORS OR  COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
32# DAMAGES OR  OTHER LIABILITY, WHETHER  IN AN  ACTION OF CONTRACT,  TORT OR
33# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
34# USE OR OTHER DEALINGS IN THE SOFTWARE.
35
36include_HEADERS = \
37    ../expat_config.h \
38    expat.h \
39    expat_external.h
40
41lib_LTLIBRARIES = libexpat.la
42if WITH_TESTS
43noinst_LTLIBRARIES = libtestpat.la
44endif
45
46libexpat_la_LDFLAGS = \
47    @AM_LDFLAGS@ \
48    @LIBM@ \
49    -no-undefined \
50    -version-info @LIBCURRENT@:@LIBREVISION@:@LIBAGE@
51if HAVE_VSCRIPT
52libexpat_la_LDFLAGS += $(VSCRIPT_LDFLAGS),@builddir@/libexpat.map
53endif
54
55libexpat_la_SOURCES = \
56    xcs.c \
57    xmlparse.c \
58    xmltok.c \
59    xmlrole.c
60
61if WITH_ARC4RANDOM
62    libexpat_la_SOURCES += \
63        random_arc4random.c \
64        random_arc4random.h
65endif
66
67if WITH_ARC4RANDOM_BUF
68    libexpat_la_SOURCES += \
69        random_arc4random_buf.c \
70        random_arc4random_buf.h
71endif
72
73if ! MINGW
74    libexpat_la_SOURCES += \
75        random_dev_urandom.c \
76        random_dev_urandom.h
77endif
78
79if WITH_GETENTROPY
80    libexpat_la_SOURCES += \
81        random_getentropy.c \
82        random_getentropy.h
83endif
84
85if WITH_EITHER_GETRANDOM
86    libexpat_la_SOURCES += \
87        random_getrandom.c \
88        random_getrandom.h
89endif
90
91if MINGW
92    libexpat_la_SOURCES += \
93        random_rand_s.c \
94        random_rand_s.h
95endif
96
97if WITH_TESTS
98libtestpat_la_CPPFLAGS = -DXML_TESTING
99
100libtestpat_la_SOURCES = $(libexpat_la_SOURCES)
101endif
102
103doc_DATA = \
104    ../AUTHORS \
105    ../Changes
106
107install-data-hook:
108	cd "$(DESTDIR)$(docdir)" && $(am__mv) Changes changelog
109
110uninstall-local:
111	$(RM) "$(DESTDIR)$(docdir)/changelog"
112
113EXTRA_DIST = \
114    ascii.h \
115    asciitab.h \
116    expat_external.h \
117    expat.h \
118    fallthrough.h \
119    hash_table.h \
120    iasciitab.h \
121    internal.h \
122    latin1tab.h \
123    libexpat.def.cmake \
124    memory_sanitizer.h \
125    nametab.h \
126    siphash.h \
127    utf8tab.h \
128    winconfig.h \
129    xcs.h \
130    xmlrole.h \
131    xmltok.h \
132    xmltok_impl.c \
133    xmltok_impl.h \
134    xmltok_ns.c
135