Debian Codegraph @

subprojects/libglnx/Makefile-libglnx.am

raw
1 # Copyright (C) 2015 Colin Walters <[email protected]>
2 # SPDX-License-Identifier: LGPL-2.0-or-later
3 #
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2 of the License, or (at your option) any later version.
8 #
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the
16 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 # Boston, MA 02111-1307, USA.
18
19 EXTRA_DIST += \
20 $(libglnx_srcpath)/README.md \
21 $(libglnx_srcpath)/COPYING \
22 $(libglnx_srcpath)/LICENSES/LGPL-2.0-or-later.txt \
23 $(libglnx_srcpath)/LICENSES/LGPL-2.1-or-later.txt \
24 $(libglnx_srcpath)/libglnx.m4 \
25 $(NULL)
26
27 BUILT_SOURCES += $(top_builddir)/libglnx-config.h
28 CLEANFILES += $(top_builddir)/libglnx-config.h
29 $(top_builddir)/libglnx-config.h: Makefile.am
30 echo '#include "config.h"' > $@
31
32 libglnx_la_SOURCES = \
33 $(libglnx_srcpath)/glnx-macros.h \
34 $(libglnx_srcpath)/glnx-backport-autocleanups.h \
35 $(libglnx_srcpath)/glnx-backport-autoptr.h \
36 $(libglnx_srcpath)/glnx-backport-testutils.h \
37 $(libglnx_srcpath)/glnx-backport-testutils.c \
38 $(libglnx_srcpath)/glnx-backports.h \
39 $(libglnx_srcpath)/glnx-backports.c \
40 $(libglnx_srcpath)/glnx-chase.h \
41 $(libglnx_srcpath)/glnx-chase.c \
42 $(libglnx_srcpath)/glnx-local-alloc.h \
43 $(libglnx_srcpath)/glnx-local-alloc.c \
44 $(libglnx_srcpath)/glnx-errors.h \
45 $(libglnx_srcpath)/glnx-errors.c \
46 $(libglnx_srcpath)/glnx-console.h \
47 $(libglnx_srcpath)/glnx-console.c \
48 $(libglnx_srcpath)/glnx-dirfd.h \
49 $(libglnx_srcpath)/glnx-dirfd.c \
50 $(libglnx_srcpath)/glnx-fdio.h \
51 $(libglnx_srcpath)/glnx-fdio.c \
52 $(libglnx_srcpath)/glnx-lockfile.h \
53 $(libglnx_srcpath)/glnx-lockfile.c \
54 $(libglnx_srcpath)/glnx-missing-syscall.h \
55 $(libglnx_srcpath)/glnx-missing.h \
56 $(libglnx_srcpath)/glnx-xattrs.h \
57 $(libglnx_srcpath)/glnx-xattrs.c \
58 $(libglnx_srcpath)/glnx-shutil.h \
59 $(libglnx_srcpath)/glnx-shutil.c \
60 $(libglnx_srcpath)/libglnx.h \
61 $(libglnx_srcpath)/tests/libglnx-testlib.h \
62 $(NULL)
63
64 libglnx_la_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) -I$(builddir)
65 libglnx_la_LDFLAGS = -avoid-version -Bsymbolic-functions -export-symbols-regex "^glnx_" -no-undefined -export-dynamic
66 libglnx_la_LIBADD = $(libglnx_libs)
67
68 libglnx_tests = test-libglnx-xattrs test-libglnx-fdio test-libglnx-errors test-libglnx-macros test-libglnx-shutil
69 TESTS += $(libglnx_tests)
70
71 libglnx_testlib_sources = $(libglnx_srcpath)/tests/libglnx-testlib.c
72
73 check_PROGRAMS += $(libglnx_tests)
74 test_libglnx_xattrs_SOURCES = $(libglnx_testlib_sources) $(libglnx_srcpath)/tests/test-libglnx-xattrs.c
75 test_libglnx_xattrs_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags)
76 test_libglnx_xattrs_LDADD = $(libglnx_libs) libglnx.la
77
78 test_libglnx_fdio_SOURCES = $(libglnx_testlib_sources) $(libglnx_srcpath)/tests/test-libglnx-fdio.c
79 test_libglnx_fdio_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags)
80 test_libglnx_fdio_LDADD = $(libglnx_libs) libglnx.la
81
82 test_libglnx_errors_SOURCES = $(libglnx_testlib_sources) $(libglnx_srcpath)/tests/test-libglnx-errors.c
83 test_libglnx_errors_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags)
84 test_libglnx_errors_LDADD = $(libglnx_libs) libglnx.la
85
86 test_libglnx_macros_SOURCES = $(libglnx_testlib_sources) $(libglnx_srcpath)/tests/test-libglnx-macros.c
87 test_libglnx_macros_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags)
88 test_libglnx_macros_LDADD = $(libglnx_libs) libglnx.la
89
90 test_libglnx_shutil_SOURCES = $(libglnx_testlib_sources) $(libglnx_srcpath)/tests/test-libglnx-shutil.c
91 test_libglnx_shutil_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags)
92 test_libglnx_shutil_LDADD = $(libglnx_libs) libglnx.la