]> git.ipfire.org Git - thirdparty/glibc.git/blame - inet/Makefile
Move 'services' routines from 'inet' into '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
AS
49 getipv4sourcefilter \
50 getnameinfo \
b6b8a88c 51 getsourcefilter \
b6b8a88c
AS
52 herrno \
53 herrno-loc \
54 htonl \
55 htons \
56 idna \
57 idna_name_classify \
58 if_index \
59 ifaddrs \
60 in6_addr \
61 inet6_opt \
62 inet6_option \
63 inet6_rth \
64 inet6_scopeid_pton \
65 inet_lnaof \
66 inet_mkadr \
67 inet_net \
68 inet_netof \
69 inet_ntoa \
70 rcmd \
71 rexec \
72 ruserpass \
73 setipv4sourcefilter \
74 setsourcefilter \
75 # routines
28f540f4 76
acb52792
FW
77install-others = $(inst_sysconfdir)/rpc
78
773e79b3 79aux := check_pf check_native ifreq
1dc869d1 80
b6b8a88c
AS
81tests := \
82 bug-if1 \
83 htontest \
84 test-hnto-types \
85 test-ifaddrs \
86 test-inet6_opt \
87 test_ifindex \
88 tst-checks \
89 tst-checks-posix \
90 tst-ether_aton \
91 tst-ether_line \
b6b8a88c
AS
92 tst-getni1 \
93 tst-getni2 \
94 tst-if_index-long \
95 tst-inet6_rth \
96 tst-network \
97 tst-ntoa \
98 tst-sockaddr \
99 # tests
cf0bd2f7
FW
100
101# tst-deadline must be linked statically so that we can access
102# internal functions.
103tests-static += tst-deadline
b07367bc 104tests-internal += tst-deadline
7c3018f9 105
7f9f1ecb
FW
106# tst-idna_name_classify must be linked statically because it tests
107# internal functionality.
108tests-static += tst-idna_name_classify
109tests-internal += tst-idna_name_classify
110
7c3018f9
ZW
111# tst-inet6_scopeid_pton also needs internal functions but does not
112# need to be linked statically.
b07367bc 113tests-internal += tst-inet6_scopeid_pton
1522c368 114
28f540f4 115include ../Rules
67479a70 116
7f9f1ecb
FW
117LOCALES := en_US.UTF-8 en_US.ISO-8859-1
118include ../gen-locales.mk
119
67479a70
UD
120ifeq ($(have-thread-library),yes)
121
36975e8e 122CFLAGS-rcmd.c += -fexceptions
36975e8e
L
123CFLAGS-either_ntoh.c += -fexceptions
124CFLAGS-either_hton.c += -fexceptions
8d98c7c0
AZ
125CFLAGS-in6_addr.c += $(config-cflags-wno-ignored-attributes)
126CFLAGS-if_index.c += $(config-cflags-wno-ignored-attributes)
127CFLAGS-ifaddrs.c += $(config-cflags-wno-ignored-attributes)
36975e8e
L
128
129CFLAGS-tst-checks-posix.c += -std=c99
130CFLAGS-tst-sockaddr.c += -fno-strict-aliasing
3375cfaf 131
67479a70 132endif
ce85d65b 133
acb52792
FW
134# Install the rpc database file.
135$(inst_sysconfdir)/rpc: etc.rpc $(+force)
136 $(do-install)
137
ce85d65b
UD
138ifeq ($(build-static-nss),yes)
139CFLAGS += -DSTATIC_NSS
140endif
7f9f1ecb 141
8dddf0bd
FW
142# The test uses dlopen indirectly and would otherwise load system
143# objects.
144tst-idna_name_classify-ENV = \
3dbbd2ff 145 LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx):$(common-objpfx)elf
7f9f1ecb 146$(objpfx)tst-idna_name_classify.out: $(gen-locales)