-fix no-dot-in-path issue on FreeBSD bot
[oweals/gnunet.git] / src / gns / nss / Makefile.am
1 # $Id$
2 #
3 # This file taken and modified from nss-gns.
4 #
5 # nss-gns is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License as
7 # published by the Free Software Foundation; either version 3 of the
8 # License, or (at your option) any later version.
9 #
10 # nss-gns is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # General Public License for more details.
14 #
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with nss-gns; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18 # USA.
19
20 EXTRA_DIST = map-file
21
22 AM_LDFLAGS=-avoid-version -module -export-dynamic
23
24 nssdir = $(NSS_DIR)
25
26 LIBTOOL = $(SUDO_BINARY) $(SHELL) $(top_builddir)/libtool
27
28 if !MINGW
29 if INSTALL_NSS
30 nss_LTLIBRARIES = \
31         libnss_gns.la \
32         libnss_gns4.la \
33         libnss_gns6.la
34 endif
35 endif
36
37 sources = nss_gns_query.h nss_gns_query.c
38
39 # GNU Libc
40 libnss_gns_la_SOURCES= $(sources) nss_gns.c
41 libnss_gns_la_CFLAGS=$(AM_CFLAGS) -D_GNU_SOURCE
42 libnss_gns_la_LDFLAGS=$(AM_LDFLAGS) -shrext .so.2 -Wl,-version-script=$(srcdir)/map-file
43
44 libnss_gns4_la_SOURCES=$(libnss_gns_la_SOURCES)
45 libnss_gns4_la_CFLAGS=$(libnss_gns_la_CFLAGS) -DNSS_IPV4_ONLY=1
46 libnss_gns4_la_LDFLAGS=$(libnss_gns_la_LDFLAGS)
47
48 libnss_gns6_la_SOURCES=$(libnss_gns_la_SOURCES)
49 libnss_gns6_la_CFLAGS=$(libnss_gns_la_CFLAGS) -DNSS_IPV6_ONLY=1
50 libnss_gns6_la_LDFLAGS=$(libnss_gns_la_LDFLAGS)
51
52 if !MINGW
53 install-data-hook:
54         $(top_srcdir)/src/gns/nss/install-nss-plugin.sh $(SHELL) $(top_builddir) $(nssdir) $(SUDO_BINARY)
55
56 uninstall-hook:
57         $(top_srcdir)/src/gns/nss/uninstall-nss-plugin.sh $(SHELL) $(top_builddir) "rm -f $(nssdir)/libnss_gns.so.2" $(SUDO_BINARY)
58         $(top_srcdir)/src/gns/nss/uninstall-nss-plugin.sh $(SHELL) $(top_builddir) "rm -f $(nssdir)/libnss_gns4.so.2" $(SUDO_BINARY)
59         $(top_srcdir)/src/gns/nss/uninstall-nss-plugin.sh $(SHELL) $(top_builddir) "rm -f $(nssdir)/libnss_gns6.so.2" $(SUDO_BINARY)
60 endif