-
Notifications
You must be signed in to change notification settings - Fork 43
/
Makefile.am
137 lines (111 loc) · 4.55 KB
/
Makefile.am
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# This file is part of nss-mdns.
#
# nss-mdns 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.1 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, see <https://www.gnu.org/licenses/>.
#
# SPDX-License-Identifier: LGPL-2.1-or-later
EXTRA_DIST=bootstrap.sh README.md ACKNOWLEDGEMENTS.md NEWS.md LICENSE
ACLOCAL_AMFLAGS=-I m4
# src
EXTRA_DIST += src/map-file
AM_CFLAGS = \
-DMDNS_ALLOW_FILE=\"$(MDNS_ALLOW_FILE)\" \
-DAVAHI_SOCKET=\"$(AVAHI_SOCKET)\"
AM_LDFLAGS=-avoid-version -module -export-dynamic
if FREEBSD_NSS
lib_LTLIBRARIES = \
nss_mdns.la \
nss_mdns4.la \
nss_mdns6.la \
nss_mdns_minimal.la \
nss_mdns4_minimal.la \
nss_mdns6_minimal.la
else
lib_LTLIBRARIES = \
libnss_mdns.la \
libnss_mdns4.la \
libnss_mdns6.la \
libnss_mdns_minimal.la \
libnss_mdns4_minimal.la \
libnss_mdns6_minimal.la
endif
check_PROGRAMS = nss-test avahi-test
libnss_mdns_la_SOURCES=src/util.c src/util.h src/avahi.c src/avahi.h src/nss.c src/nss.h
libnss_mdns_la_CFLAGS=$(AM_CFLAGS)
libnss_mdns_la_LDFLAGS=$(AM_LDFLAGS) -shrext .so.2 -Wl,-version-script=$(srcdir)/src/map-file
libnss_mdns_minimal_la_SOURCES=$(libnss_mdns_la_SOURCES)
libnss_mdns_minimal_la_CFLAGS=$(libnss_mdns_la_CFLAGS) -DMDNS_MINIMAL
libnss_mdns_minimal_la_LDFLAGS=$(libnss_mdns_la_LDFLAGS)
libnss_mdns4_la_SOURCES=$(libnss_mdns_la_SOURCES)
libnss_mdns4_la_CFLAGS=$(libnss_mdns_la_CFLAGS) -DNSS_IPV4_ONLY=1
libnss_mdns4_la_LDFLAGS=$(libnss_mdns_la_LDFLAGS)
libnss_mdns4_minimal_la_SOURCES=$(libnss_mdns_la_SOURCES)
libnss_mdns4_minimal_la_CFLAGS=$(libnss_mdns_la_CFLAGS) -DNSS_IPV4_ONLY=1 -DMDNS_MINIMAL
libnss_mdns4_minimal_la_LDFLAGS=$(libnss_mdns_la_LDFLAGS)
libnss_mdns6_la_SOURCES=$(libnss_mdns_la_SOURCES)
libnss_mdns6_la_CFLAGS=$(libnss_mdns_la_CFLAGS) -DNSS_IPV6_ONLY=1
libnss_mdns6_la_LDFLAGS=$(libnss_mdns_la_LDFLAGS)
libnss_mdns6_minimal_la_SOURCES=$(libnss_mdns_la_SOURCES)
libnss_mdns6_minimal_la_CFLAGS=$(libnss_mdns_la_CFLAGS) -DNSS_IPV6_ONLY=1 -DMDNS_MINIMAL
libnss_mdns6_minimal_la_LDFLAGS=$(libnss_mdns_la_LDFLAGS)
nss_mdns_la_SOURCES=$(libnss_mdns_la_SOURCES) src/bsdnss.c
nss_mdns_la_CFLAGS=$(AM_CFLAGS)
nss_mdns_la_LDFLAGS=$(AM_LDFLAGS) -shrext .so.1
nss_mdns_minimal_la_SOURCES=$(nss_mdns_la_SOURCES)
nss_mdns_minimal_la_CFLAGS=$(nss_mdns_la_CFLAGS) -DMDNS_MINIMAL
nss_mdns_minimal_la_LDFLAGS=$(nss_mdns_la_LDFLAGS)
nss_mdns4_la_SOURCES=$(nss_mdns_la_SOURCES)
nss_mdns4_la_CFLAGS=$(nss_mdns_la_CFLAGS) -DNSS_IPV4_ONLY=1
nss_mdns4_la_LDFLAGS=$(nss_mdns_la_LDFLAGS)
nss_mdns4_minimal_la_SOURCES=$(nss_mdns_la_SOURCES)
nss_mdns4_minimal_la_CFLAGS=$(nss_mdns_la_CFLAGS) -DNSS_IPV4_ONLY=1 -DMDNS_MINIMAL
nss_mdns4_minimal_la_LDFLAGS=$(nss_mdns_la_LDFLAGS)
nss_mdns6_la_SOURCES=$(nss_mdns_la_SOURCES)
nss_mdns6_la_CFLAGS=$(nss_mdns_la_CFLAGS) -DNSS_IPV6_ONLY=1
nss_mdns6_la_LDFLAGS=$(nss_mdns_la_LDFLAGS)
nss_mdns6_minimal_la_SOURCES=$(nss_mdns_la_SOURCES)
nss_mdns6_minimal_la_CFLAGS=$(nss_mdns_la_CFLAGS) -DNSS_IPV6_ONLY=1 -DMDNS_MINIMAL
nss_mdns6_minimal_la_LDFLAGS=$(nss_mdns_la_LDFLAGS)
avahi_test_SOURCES = \
src/avahi.c src/avahi.h \
src/util.c src/util.h \
src/avahi-test.c
nss_test_SOURCES = \
src/nss-test.c
install-exec-hook:
rm -f $(DESTDIR)$(libdir)/libnss_mdns.la
rm -f $(DESTDIR)$(libdir)/libnss_mdns_minimal.la
rm -f $(DESTDIR)$(libdir)/libnss_mdns4.la
rm -f $(DESTDIR)$(libdir)/libnss_mdns4_minimal.la
rm -f $(DESTDIR)$(libdir)/libnss_mdns6.la
rm -f $(DESTDIR)$(libdir)/libnss_mdns6_minimal.la
rm -f $(DESTDIR)$(libdir)/nss_mdns.la
rm -f $(DESTDIR)$(libdir)/nss_mdns_minimal.la
uninstall-hook:
rm -f $(DESTDIR)$(libdir)/libnss_mdns.so.2
rm -f $(DESTDIR)$(libdir)/libnss_mdns_minimal.so.2
rm -f $(DESTDIR)$(libdir)/libnss_mdns4.so.2
rm -f $(DESTDIR)$(libdir)/libnss_mdns4_minimal.so.2
rm -f $(DESTDIR)$(libdir)/libnss_mdns6.so.2
rm -f $(DESTDIR)$(libdir)/libnss_mdns6_minimal.so.2
rm -f $(DESTDIR)$(libdir)/nss_mdns.so.2
rm -f $(DESTDIR)$(libdir)/nss_mdns_minimal.so.2
# tests
if ENABLE_TESTS
TESTS = check_util
check_PROGRAMS += check_util
check_util_SOURCES = tests/check_util.c src/util.h
check_util_CFLAGS = @CHECK_CFLAGS@
check_util_LDADD = src/util.o @CHECK_LIBS@
endif
EXTRA_DIST += tests/check_util.c