]> git.ipfire.org Git - thirdparty/glibc.git/blame - inet/Makefile
Move getnameinfo from 'inet' to 'nss'
[thirdparty/glibc.git] / inet / Makefile
CommitLineData
6d7e8eda 1# Copyright (C) 1991-2023 Free Software Foundation, Inc.
28f540f4
RM
2# This file is part of the GNU C Library.
3
4# The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
5# modify it under the terms of the GNU Lesser General Public
6# License as published by the Free Software Foundation; either
7# version 2.1 of the License, or (at your option) any later version.
28f540f4
RM
8
9# The GNU C Library is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 12# Lesser General Public License for more details.
28f540f4 13
41bdb6e2 14# You should have received a copy of the GNU Lesser General Public
59ba27a6 15# License along with the GNU C Library; if not, see
5a82c748 16# <https://www.gnu.org/licenses/>.
28f540f4
RM
17
18#
19# Sub-makefile for inet portion of the library.
20#
21subdir := inet
22
a5f891ac
JM
23include ../Makeconfig
24
b6b8a88c
AS
25headers := \
26 $(wildcard arpa/*.h protocols/*.h) \
b6b8a88c
AS
27 bits/in.h \
28 ifaddrs.h \
29 netinet/ether.h \
30 netinet/icmp6.h \
31 netinet/if_ether.h \
32 netinet/igmp.h \
33 netinet/in.h \
34 netinet/in_systm.h \
35 netinet/ip.h \
36 netinet/ip6.h \
37 netinet/tcp.h \
38 rpc/netdb.h \
39 # headers
28f540f4 40
b6b8a88c
AS
41routines := \
42 bindresvport \
43 deadline \
44 ether_aton \
45 ether_aton_r \
b6b8a88c
AS
46 ether_line \
47 ether_ntoa \
48 ether_ntoa_r \
b6b8a88c 49 getipv4sourcefilter \
b6b8a88c 50 getsourcefilter \
b6b8a88c
AS
51 herrno \
52 herrno-loc \
53 htonl \
54 htons \
55 idna \
56 idna_name_classify \
57 if_index \
58 ifaddrs \
59 in6_addr \
60 inet6_opt \
61 inet6_option \
62 inet6_rth \
63 inet6_scopeid_pton \
64 inet_lnaof \
65 inet_mkadr \
66 inet_net \
67 inet_netof \
68 inet_ntoa \
69 rcmd \
70 rexec \
71 ruserpass \
72 setipv4sourcefilter \
73 setsourcefilter \
74 # routines
28f540f4 75
acb52792
FW
76install-others = $(inst_sysconfdir)/rpc
77
773e79b3 78aux := check_pf check_native ifreq
1dc869d1 79
b6b8a88c
AS
80tests := \
81 bug-if1 \
82 htontest \
83 test-hnto-types \
84 test-ifaddrs \
85 test-inet6_opt \
86 test_ifindex \
87 tst-checks \
88 tst-checks-posix \
89 tst-ether_aton \
90 tst-ether_line \
b6b8a88c
AS
91 tst-getni1 \
92 tst-getni2 \
93 tst-if_index-long \
94 tst-inet6_rth \
95 tst-network \
96 tst-ntoa \
97 tst-sockaddr \
98 # tests
cf0bd2f7
FW
99
100# tst-deadline must be linked statically so that we can access
101# internal functions.
102tests-static += tst-deadline
b07367bc 103tests-internal += tst-deadline
7c3018f9 104
7f9f1ecb
FW
105# tst-idna_name_classify must be linked statically because it tests
106# internal functionality.
107tests-static += tst-idna_name_classify
108tests-internal += tst-idna_name_classify
109
7c3018f9
ZW
110# tst-inet6_scopeid_pton also needs internal functions but does not
111# need to be linked statically.
b07367bc 112tests-internal += tst-inet6_scopeid_pton
1522c368 113
28f540f4 114include ../Rules
67479a70 115
7f9f1ecb
FW
116LOCALES := en_US.UTF-8 en_US.ISO-8859-1
117include ../gen-locales.mk
118
67479a70
UD
119ifeq ($(have-thread-library),yes)
120
36975e8e 121CFLAGS-rcmd.c += -fexceptions
36975e8e
L
122CFLAGS-either_ntoh.c += -fexceptions
123CFLAGS-either_hton.c += -fexceptions
8d98c7c0
AZ
124CFLAGS-in6_addr.c += $(config-cflags-wno-ignored-attributes)
125CFLAGS-if_index.c += $(config-cflags-wno-ignored-attributes)
126CFLAGS-ifaddrs.c += $(config-cflags-wno-ignored-attributes)
36975e8e
L
127
128CFLAGS-tst-checks-posix.c += -std=c99
129CFLAGS-tst-sockaddr.c += -fno-strict-aliasing
3375cfaf 130
67479a70 131endif
ce85d65b 132
acb52792
FW
133# Install the rpc database file.
134$(inst_sysconfdir)/rpc: etc.rpc $(+force)
135 $(do-install)
136
ce85d65b
UD
137ifeq ($(build-static-nss),yes)
138CFLAGS += -DSTATIC_NSS
139endif
7f9f1ecb 140
8dddf0bd
FW
141# The test uses dlopen indirectly and would otherwise load system
142# objects.
143tst-idna_name_classify-ENV = \
3dbbd2ff 144 LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx):$(common-objpfx)elf
7f9f1ecb 145$(objpfx)tst-idna_name_classify.out: $(gen-locales)