|
| 1 | +# Copyright (C) 2015 Colin Walters <walters@verbum.org> |
| 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-local-alloc.h \ |
| 41 | + $(libglnx_srcpath)/glnx-local-alloc.c \ |
| 42 | + $(libglnx_srcpath)/glnx-errors.h \ |
| 43 | + $(libglnx_srcpath)/glnx-errors.c \ |
| 44 | + $(libglnx_srcpath)/glnx-console.h \ |
| 45 | + $(libglnx_srcpath)/glnx-console.c \ |
| 46 | + $(libglnx_srcpath)/glnx-dirfd.h \ |
| 47 | + $(libglnx_srcpath)/glnx-dirfd.c \ |
| 48 | + $(libglnx_srcpath)/glnx-fdio.h \ |
| 49 | + $(libglnx_srcpath)/glnx-fdio.c \ |
| 50 | + $(libglnx_srcpath)/glnx-lockfile.h \ |
| 51 | + $(libglnx_srcpath)/glnx-lockfile.c \ |
| 52 | + $(libglnx_srcpath)/glnx-missing-syscall.h \ |
| 53 | + $(libglnx_srcpath)/glnx-missing.h \ |
| 54 | + $(libglnx_srcpath)/glnx-xattrs.h \ |
| 55 | + $(libglnx_srcpath)/glnx-xattrs.c \ |
| 56 | + $(libglnx_srcpath)/glnx-shutil.h \ |
| 57 | + $(libglnx_srcpath)/glnx-shutil.c \ |
| 58 | + $(libglnx_srcpath)/libglnx.h \ |
| 59 | + $(libglnx_srcpath)/tests/libglnx-testlib.h \ |
| 60 | + $(NULL) |
| 61 | + |
| 62 | +libglnx_la_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) -I$(builddir) |
| 63 | +libglnx_la_LDFLAGS = -avoid-version -Bsymbolic-functions -export-symbols-regex "^glnx_" -no-undefined -export-dynamic |
| 64 | +libglnx_la_LIBADD = $(libglnx_libs) |
| 65 | + |
| 66 | +libglnx_tests = test-libglnx-xattrs test-libglnx-fdio test-libglnx-errors test-libglnx-macros test-libglnx-shutil |
| 67 | +TESTS += $(libglnx_tests) |
| 68 | + |
| 69 | +libglnx_testlib_sources = $(libglnx_srcpath)/tests/libglnx-testlib.c |
| 70 | + |
| 71 | +check_PROGRAMS += $(libglnx_tests) |
| 72 | +test_libglnx_xattrs_SOURCES = $(libglnx_testlib_sources) $(libglnx_srcpath)/tests/test-libglnx-xattrs.c |
| 73 | +test_libglnx_xattrs_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) |
| 74 | +test_libglnx_xattrs_LDADD = $(libglnx_libs) libglnx.la |
| 75 | + |
| 76 | +test_libglnx_fdio_SOURCES = $(libglnx_testlib_sources) $(libglnx_srcpath)/tests/test-libglnx-fdio.c |
| 77 | +test_libglnx_fdio_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) |
| 78 | +test_libglnx_fdio_LDADD = $(libglnx_libs) libglnx.la |
| 79 | + |
| 80 | +test_libglnx_errors_SOURCES = $(libglnx_testlib_sources) $(libglnx_srcpath)/tests/test-libglnx-errors.c |
| 81 | +test_libglnx_errors_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) |
| 82 | +test_libglnx_errors_LDADD = $(libglnx_libs) libglnx.la |
| 83 | + |
| 84 | +test_libglnx_macros_SOURCES = $(libglnx_testlib_sources) $(libglnx_srcpath)/tests/test-libglnx-macros.c |
| 85 | +test_libglnx_macros_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) |
| 86 | +test_libglnx_macros_LDADD = $(libglnx_libs) libglnx.la |
| 87 | + |
| 88 | +test_libglnx_shutil_SOURCES = $(libglnx_testlib_sources) $(libglnx_srcpath)/tests/test-libglnx-shutil.c |
| 89 | +test_libglnx_shutil_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) |
| 90 | +test_libglnx_shutil_LDADD = $(libglnx_libs) libglnx.la |
0 commit comments