]> git.ipfire.org Git - thirdparty/glibc.git/blame - inet/Makefile
Move 'ethers' 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 gethstbyad \
50 gethstbyad_r \
51 gethstbynm \
52 gethstbynm2 \
53 gethstbynm2_r \
54 gethstbynm_r \
55 gethstent \
56 gethstent_r \
57 getipv4sourcefilter \
58 getnameinfo \
59 getnetbyad \
60 getnetbyad_r \
61 getnetbynm \
62 getnetbynm_r \
63 getnetent \
64 getnetent_r \
65 getnetgrent \
66 getnetgrent_r \
67 getproto \
68 getproto_r \
69 getprtent \
70 getprtent_r \
71 getprtname \
72 getprtname_r \
73 getrpcbyname \
74 getrpcbyname_r \
75 getrpcbynumber \
76 getrpcbynumber_r \
77 getrpcent \
78 getrpcent_r \
79 getservent \
80 getservent_r \
81 getsourcefilter \
82 getsrvbynm \
83 getsrvbynm_r \
84 getsrvbypt \
85 getsrvbypt_r \
86 herrno \
87 herrno-loc \
88 htonl \
89 htons \
90 idna \
91 idna_name_classify \
92 if_index \
93 ifaddrs \
94 in6_addr \
95 inet6_opt \
96 inet6_option \
97 inet6_rth \
98 inet6_scopeid_pton \
99 inet_lnaof \
100 inet_mkadr \
101 inet_net \
102 inet_netof \
103 inet_ntoa \
104 rcmd \
105 rexec \
106 ruserpass \
107 setipv4sourcefilter \
108 setsourcefilter \
109 # routines
28f540f4 110
acb52792
FW
111install-others = $(inst_sysconfdir)/rpc
112
773e79b3 113aux := check_pf check_native ifreq
1dc869d1 114
b6b8a88c
AS
115tests := \
116 bug-if1 \
117 htontest \
118 test-hnto-types \
119 test-ifaddrs \
120 test-inet6_opt \
121 test_ifindex \
122 tst-checks \
123 tst-checks-posix \
124 tst-ether_aton \
125 tst-ether_line \
126 tst-gethnm \
127 tst-getni1 \
128 tst-getni2 \
129 tst-if_index-long \
130 tst-inet6_rth \
131 tst-network \
132 tst-ntoa \
133 tst-sockaddr \
134 # tests
cf0bd2f7
FW
135
136# tst-deadline must be linked statically so that we can access
137# internal functions.
138tests-static += tst-deadline
b07367bc 139tests-internal += tst-deadline
7c3018f9 140
7f9f1ecb
FW
141# tst-idna_name_classify must be linked statically because it tests
142# internal functionality.
143tests-static += tst-idna_name_classify
144tests-internal += tst-idna_name_classify
145
7c3018f9
ZW
146# tst-inet6_scopeid_pton also needs internal functions but does not
147# need to be linked statically.
b07367bc 148tests-internal += tst-inet6_scopeid_pton
1522c368 149
28f540f4 150include ../Rules
67479a70 151
7f9f1ecb
FW
152LOCALES := en_US.UTF-8 en_US.ISO-8859-1
153include ../gen-locales.mk
154
67479a70
UD
155ifeq ($(have-thread-library),yes)
156
36975e8e
L
157CFLAGS-gethstbyad_r.c += -fexceptions
158CFLAGS-gethstbyad.c += -fexceptions
159CFLAGS-gethstbynm_r.c += -fexceptions
160CFLAGS-gethstbynm.c += -fexceptions
161CFLAGS-gethstbynm2_r.c += -fexceptions
162CFLAGS-gethstbynm2.c += -fexceptions
163CFLAGS-gethstent_r.c += -fexceptions
164CFLAGS-gethstent.c += -fexceptions
165CFLAGS-rcmd.c += -fexceptions
166CFLAGS-getnetbynm_r.c += -fexceptions
167CFLAGS-getnetbynm.c += -fexceptions
168CFLAGS-getnetbyad_r.c += -fexceptions
169CFLAGS-getnetbyad.c += -fexceptions
170CFLAGS-getnetent_r.c += -fexceptions
171CFLAGS-getnetent.c += -fexceptions
36975e8e
L
172CFLAGS-getrpcent_r.c += -fexceptions
173CFLAGS-getrpcent.c += -fexceptions
174CFLAGS-getservent_r.c += -fexceptions
175CFLAGS-getservent.c += -fexceptions
176CFLAGS-getprtent_r.c += -fexceptions
177CFLAGS-getprtent.c += -fexceptions
178CFLAGS-either_ntoh.c += -fexceptions
179CFLAGS-either_hton.c += -fexceptions
180CFLAGS-getnetgrent.c += -fexceptions
181CFLAGS-getnetgrent_r.c += -fexceptions
8d98c7c0
AZ
182CFLAGS-in6_addr.c += $(config-cflags-wno-ignored-attributes)
183CFLAGS-if_index.c += $(config-cflags-wno-ignored-attributes)
184CFLAGS-ifaddrs.c += $(config-cflags-wno-ignored-attributes)
36975e8e
L
185
186CFLAGS-tst-checks-posix.c += -std=c99
187CFLAGS-tst-sockaddr.c += -fno-strict-aliasing
3375cfaf 188
67479a70 189endif
ce85d65b 190
acb52792
FW
191# Install the rpc database file.
192$(inst_sysconfdir)/rpc: etc.rpc $(+force)
193 $(do-install)
194
ce85d65b
UD
195ifeq ($(build-static-nss),yes)
196CFLAGS += -DSTATIC_NSS
197endif
7f9f1ecb 198
8dddf0bd
FW
199# The test uses dlopen indirectly and would otherwise load system
200# objects.
201tst-idna_name_classify-ENV = \
3dbbd2ff 202 LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx):$(common-objpfx)elf
7f9f1ecb 203$(objpfx)tst-idna_name_classify.out: $(gen-locales)