chiark / gitweb /
Use legacy getifaddrs() on GNU/kFreeBSD
[elogind.git] / Makefile.am
1 # This file is part of nss-myhostname.
2 #
3 # Copyright 2008 Lennart Poettering
4 #
5 # nss-myhostname is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU Lesser General Public License
7 # as published by the Free Software Foundation, either version 2.1 of
8 # the License, or (at your option) any later version.
9 #
10 # nss-myhostname is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser 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-myhostname. If not, If not, see
17 # <http://www.gnu.org/licenses/>.
18
19 ACLOCAL_AMFLAGS = -I m4
20
21 lib_LTLIBRARIES = libnss_myhostname.la
22
23 EXTRA_DIST=bootstrap.sh README LICENSE
24 SUBDIRS=doc
25
26 AM_CPPFLAGS = -include $(top_builddir)/config.h
27
28 MAINTAINERCLEANFILES=README
29 noinst_DATA = README
30
31 README:
32         rm -f README
33         $(MAKE) -C doc README
34         cd $(srcdir) && ln -s doc/README README
35
36 homepage: all dist
37         test -d $$HOME/homepage/private
38         mkdir -p $$HOME/homepage/private/projects/nss-myhostname
39         cp nss-myhostname-@PACKAGE_VERSION@.tar.gz doc/README.html doc/style.css $$HOME/homepage/private/projects/nss-myhostname
40         ln -sf README.html $$HOME/homepage/private/projects/nss-myhostname/index.html
41
42 .PHONY: homepage
43
44 libnss_myhostname_la_SOURCES = \
45         nss-myhostname.c \
46         ifconf.h
47
48 if LEGACY
49 libnss_myhostname_la_SOURCES += legacy.c
50 else
51 libnss_myhostname_la_SOURCES += netlink.c
52 endif
53
54 libnss_myhostname_la_LDFLAGS = \
55         -avoid-version \
56         -module \
57         -export-dynamic \
58         -shrext .so.2
59
60 install-exec-hook:
61         rm -f $(DESTDIR)$(libdir)/libnss_myhostname.la
62         rm -f $(DESTDIR)$(libdir)/libnss_myhostname_minimal.la
63
64 uninstall-hook:
65         rm -f $(DESTDIR)$(libdir)/libnss_myhostname.so.2
66         rm -f $(DESTDIR)$(libdir)/libnss_myhostname_minimal.so.2