]> sourceware.org Git - glibc.git/blob - inet/Makefile
bd3dc58322cacf96b5b4b352fa5f262230e4672d
[glibc.git] / inet / Makefile
1 # Copyright (C) 1991-2023 Free Software Foundation, Inc.
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
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.
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
12 # Lesser General Public License for more details.
13
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with the GNU C Library; if not, see
16 # <https://www.gnu.org/licenses/>.
17
18 #
19 # Sub-makefile for inet portion of the library.
20 #
21 subdir := inet
22
23 include ../Makeconfig
24
25 headers := \
26 $(wildcard arpa/*.h protocols/*.h) \
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
40
41 routines := \
42 bindresvport \
43 deadline \
44 ether_aton \
45 ether_aton_r \
46 ether_hton \
47 ether_line \
48 ether_ntoa \
49 ether_ntoa_r \
50 ether_ntoh \
51 gethstbyad \
52 gethstbyad_r \
53 gethstbynm \
54 gethstbynm2 \
55 gethstbynm2_r \
56 gethstbynm_r \
57 gethstent \
58 gethstent_r \
59 getipv4sourcefilter \
60 getnameinfo \
61 getnetbyad \
62 getnetbyad_r \
63 getnetbynm \
64 getnetbynm_r \
65 getnetent \
66 getnetent_r \
67 getnetgrent \
68 getnetgrent_r \
69 getproto \
70 getproto_r \
71 getprtent \
72 getprtent_r \
73 getprtname \
74 getprtname_r \
75 getrpcbyname \
76 getrpcbyname_r \
77 getrpcbynumber \
78 getrpcbynumber_r \
79 getrpcent \
80 getrpcent_r \
81 getservent \
82 getservent_r \
83 getsourcefilter \
84 getsrvbynm \
85 getsrvbynm_r \
86 getsrvbypt \
87 getsrvbypt_r \
88 herrno \
89 herrno-loc \
90 htonl \
91 htons \
92 idna \
93 idna_name_classify \
94 if_index \
95 ifaddrs \
96 in6_addr \
97 inet6_opt \
98 inet6_option \
99 inet6_rth \
100 inet6_scopeid_pton \
101 inet_lnaof \
102 inet_mkadr \
103 inet_net \
104 inet_netof \
105 inet_ntoa \
106 rcmd \
107 rexec \
108 ruserpass \
109 setipv4sourcefilter \
110 setsourcefilter \
111 # routines
112
113 install-others = $(inst_sysconfdir)/rpc
114
115 aux := check_pf check_native ifreq
116
117 tests := \
118 bug-if1 \
119 htontest \
120 test-hnto-types \
121 test-ifaddrs \
122 test-inet6_opt \
123 test_ifindex \
124 tst-checks \
125 tst-checks-posix \
126 tst-ether_aton \
127 tst-ether_line \
128 tst-gethnm \
129 tst-getni1 \
130 tst-getni2 \
131 tst-if_index-long \
132 tst-inet6_rth \
133 tst-network \
134 tst-ntoa \
135 tst-sockaddr \
136 # tests
137
138 # tst-deadline must be linked statically so that we can access
139 # internal functions.
140 tests-static += tst-deadline
141 tests-internal += tst-deadline
142
143 # tst-idna_name_classify must be linked statically because it tests
144 # internal functionality.
145 tests-static += tst-idna_name_classify
146 tests-internal += tst-idna_name_classify
147
148 # tst-inet6_scopeid_pton also needs internal functions but does not
149 # need to be linked statically.
150 tests-internal += tst-inet6_scopeid_pton
151
152 include ../Rules
153
154 LOCALES := en_US.UTF-8 en_US.ISO-8859-1
155 include ../gen-locales.mk
156
157 ifeq ($(have-thread-library),yes)
158
159 CFLAGS-gethstbyad_r.c += -fexceptions
160 CFLAGS-gethstbyad.c += -fexceptions
161 CFLAGS-gethstbynm_r.c += -fexceptions
162 CFLAGS-gethstbynm.c += -fexceptions
163 CFLAGS-gethstbynm2_r.c += -fexceptions
164 CFLAGS-gethstbynm2.c += -fexceptions
165 CFLAGS-gethstent_r.c += -fexceptions
166 CFLAGS-gethstent.c += -fexceptions
167 CFLAGS-rcmd.c += -fexceptions
168 CFLAGS-getnetbynm_r.c += -fexceptions
169 CFLAGS-getnetbynm.c += -fexceptions
170 CFLAGS-getnetbyad_r.c += -fexceptions
171 CFLAGS-getnetbyad.c += -fexceptions
172 CFLAGS-getnetent_r.c += -fexceptions
173 CFLAGS-getnetent.c += -fexceptions
174 CFLAGS-getrpcent_r.c += -fexceptions
175 CFLAGS-getrpcent.c += -fexceptions
176 CFLAGS-getservent_r.c += -fexceptions
177 CFLAGS-getservent.c += -fexceptions
178 CFLAGS-getprtent_r.c += -fexceptions
179 CFLAGS-getprtent.c += -fexceptions
180 CFLAGS-either_ntoh.c += -fexceptions
181 CFLAGS-either_hton.c += -fexceptions
182 CFLAGS-getnetgrent.c += -fexceptions
183 CFLAGS-getnetgrent_r.c += -fexceptions
184 CFLAGS-in6_addr.c += $(config-cflags-wno-ignored-attributes)
185 CFLAGS-if_index.c += $(config-cflags-wno-ignored-attributes)
186 CFLAGS-ifaddrs.c += $(config-cflags-wno-ignored-attributes)
187
188 CFLAGS-tst-checks-posix.c += -std=c99
189 CFLAGS-tst-sockaddr.c += -fno-strict-aliasing
190
191 endif
192
193 # Install the rpc database file.
194 $(inst_sysconfdir)/rpc: etc.rpc $(+force)
195 $(do-install)
196
197 ifeq ($(build-static-nss),yes)
198 CFLAGS += -DSTATIC_NSS
199 endif
200
201 # The test uses dlopen indirectly and would otherwise load system
202 # objects.
203 tst-idna_name_classify-ENV = \
204 LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx):$(common-objpfx)elf
205 $(objpfx)tst-idna_name_classify.out: $(gen-locales)
This page took 0.044135 seconds and 4 git commands to generate.