forked from avahi/nss-mdns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
97 lines (78 loc) · 3.25 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
# 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 of the
# License, or (at your option) any later version.
#
# nss-mdns 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
# General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with nss-mdns; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
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
lib_LTLIBRARIES = \
libnss_mdns.la \
libnss_mdns4.la \
libnss_mdns6.la \
libnss_mdns_minimal.la \
libnss_mdns4_minimal.la \
libnss_mdns6_minimal.la
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
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)
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
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
# 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