summaryrefslogtreecommitdiff
path: root/Makefile-libglnx.am
blob: 5934a2b6f1974ae227b38b3ac8b977e59a5077f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Copyright (C) 2015 Colin Walters <walters@verbum.org>
# SPDX-License-Identifier: LGPL-2.0-or-later
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.

EXTRA_DIST += \
	$(libglnx_srcpath)/README.md \
	$(libglnx_srcpath)/COPYING \
	$(libglnx_srcpath)/LICENSES/LGPL-2.0-or-later.txt \
	$(libglnx_srcpath)/LICENSES/LGPL-2.1-or-later.txt \
	$(libglnx_srcpath)/libglnx.m4 \
	$(NULL)

BUILT_SOURCES += $(top_builddir)/libglnx-config.h
CLEANFILES += $(top_builddir)/libglnx-config.h
$(top_builddir)/libglnx-config.h: Makefile.am
	echo '#include "config.h"' > $@

libglnx_la_SOURCES = \
	$(libglnx_srcpath)/glnx-macros.h \
	$(libglnx_srcpath)/glnx-backport-autocleanups.h \
	$(libglnx_srcpath)/glnx-backport-autoptr.h \
	$(libglnx_srcpath)/glnx-backport-testutils.h \
	$(libglnx_srcpath)/glnx-backport-testutils.c \
	$(libglnx_srcpath)/glnx-backports.h \
	$(libglnx_srcpath)/glnx-backports.c \
	$(libglnx_srcpath)/glnx-local-alloc.h \
	$(libglnx_srcpath)/glnx-local-alloc.c \
	$(libglnx_srcpath)/glnx-errors.h \
	$(libglnx_srcpath)/glnx-errors.c \
	$(libglnx_srcpath)/glnx-console.h \
	$(libglnx_srcpath)/glnx-console.c \
	$(libglnx_srcpath)/glnx-dirfd.h \
	$(libglnx_srcpath)/glnx-dirfd.c \
	$(libglnx_srcpath)/glnx-fdio.h \
	$(libglnx_srcpath)/glnx-fdio.c \
	$(libglnx_srcpath)/glnx-lockfile.h \
	$(libglnx_srcpath)/glnx-lockfile.c \
	$(libglnx_srcpath)/glnx-missing-syscall.h \
	$(libglnx_srcpath)/glnx-missing.h \
	$(libglnx_srcpath)/glnx-xattrs.h \
	$(libglnx_srcpath)/glnx-xattrs.c \
	$(libglnx_srcpath)/glnx-shutil.h \
	$(libglnx_srcpath)/glnx-shutil.c \
	$(libglnx_srcpath)/libglnx.h \
	$(libglnx_srcpath)/tests/libglnx-testlib.h \
	$(NULL)

libglnx_la_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags) -I$(builddir)
libglnx_la_LDFLAGS = -avoid-version -Bsymbolic-functions -export-symbols-regex "^glnx_" -no-undefined -export-dynamic 
libglnx_la_LIBADD = $(libglnx_libs)

libglnx_tests = test-libglnx-xattrs test-libglnx-fdio test-libglnx-errors test-libglnx-macros test-libglnx-shutil
TESTS += $(libglnx_tests)

libglnx_testlib_sources = $(libglnx_srcpath)/tests/libglnx-testlib.c

check_PROGRAMS += $(libglnx_tests)
test_libglnx_xattrs_SOURCES = $(libglnx_testlib_sources) $(libglnx_srcpath)/tests/test-libglnx-xattrs.c
test_libglnx_xattrs_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags)
test_libglnx_xattrs_LDADD = $(libglnx_libs) libglnx.la

test_libglnx_fdio_SOURCES = $(libglnx_testlib_sources) $(libglnx_srcpath)/tests/test-libglnx-fdio.c
test_libglnx_fdio_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags)
test_libglnx_fdio_LDADD = $(libglnx_libs) libglnx.la

test_libglnx_errors_SOURCES = $(libglnx_testlib_sources) $(libglnx_srcpath)/tests/test-libglnx-errors.c
test_libglnx_errors_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags)
test_libglnx_errors_LDADD = $(libglnx_libs) libglnx.la

test_libglnx_macros_SOURCES = $(libglnx_testlib_sources) $(libglnx_srcpath)/tests/test-libglnx-macros.c
test_libglnx_macros_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags)
test_libglnx_macros_LDADD = $(libglnx_libs) libglnx.la

test_libglnx_shutil_SOURCES = $(libglnx_testlib_sources) $(libglnx_srcpath)/tests/test-libglnx-shutil.c
test_libglnx_shutil_CFLAGS = $(AM_CFLAGS) $(libglnx_cflags)
test_libglnx_shutil_LDADD = $(libglnx_libs) libglnx.la