Debian Codegraph @

inet/Makefile

raw symbols SCIP
1 # Copyright (C) 1991-2026 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 bits/inet-fortified-decl.h \
29 bits/inet-fortified.h \
30 ifaddrs.h \
31 netinet/ether.h \
32 netinet/icmp6.h \
33 netinet/if_ether.h \
34 netinet/igmp.h \
35 netinet/in.h \
36 netinet/in_systm.h \
37 netinet/ip.h \
38 netinet/ip6.h \
39 netinet/tcp.h \
40 rpc/netdb.h \
41 # headers
42
43 routines := \
44 bindresvport \
45 deadline \
46 ether_aton \
47 ether_aton_r \
48 ether_line \
49 ether_ntoa \
50 ether_ntoa_r \
51 getipv4sourcefilter \
52 getsourcefilter \
53 herrno \
54 herrno-loc \
55 htonl \
56 htons \
57 idna \
58 idna_name_classify \
59 if_index \
60 ifaddrs \
61 in6_addr \
62 inet6_opt \
63 inet6_option \
64 inet6_rth \
65 inet6_scopeid_pton \
66 inet_lnaof \
67 inet_mkadr \
68 inet_net \
69 inet_netof \
70 inet_ntoa \
71 rcmd \
72 rexec \
73 ruserpass \
74 setipv4sourcefilter \
75 setsourcefilter \
76 # routines
77
78 install-others = $(inst_sysconfdir)/rpc
79
80 aux := check_pf check_native ifreq
81
82 tests := \
83 bug-if1 \
84 htontest \
85 test-hnto-types \
86 test-ifaddrs \
87 test-inet6_opt \
88 test_ifindex \
89 tst-checks \
90 tst-checks-posix \
91 tst-ether_aton \
92 tst-ether_line \
93 tst-getni1 \
94 tst-getni2 \
95 tst-if_index-long \
96 tst-if_nameindex \
97 tst-inet6_rth \
98 tst-network \
99 tst-ntoa \
100 tst-sockaddr \
101 # tests
102
103 # tst-deadline must be linked statically so that we can access
104 # internal functions.
105 tests-static += tst-deadline
106 tests-internal += tst-deadline
107
108 # tst-idna_name_classify must be linked statically because it tests
109 # internal functionality.
110 tests-static += tst-idna_name_classify
111 tests-internal += tst-idna_name_classify
112
113 # tst-inet6_scopeid_pton also needs internal functions but does not
114 # need to be linked statically.
115 tests-internal += tst-inet6_scopeid_pton
116
117 include ../Rules
118
119 LOCALES := en_US.UTF-8 en_US.ISO-8859-1
120 include ../gen-locales.mk
121
122 ifeq ($(have-thread-library),yes)
123
124 CFLAGS-rcmd.c += -fexceptions
125 CFLAGS-either_ntoh.c += -fexceptions
126 CFLAGS-either_hton.c += -fexceptions
127
128 CFLAGS-tst-checks-posix.c += -std=c99
129 CFLAGS-tst-sockaddr.c += -fno-strict-aliasing
130
131 endif
132
133 # Install the rpc database file.
134 $(inst_sysconfdir)/rpc: etc.rpc $(+force)
135 $(do-install)
136
137 ifeq ($(build-static-nss),yes)
138 CFLAGS += -DSTATIC_NSS
139 endif
140
141 ifeq ($(have-test-clang),yes)
142 CFLAGS-tst-deadline.c += -Wno-ignored-attributes
143 endif
144
145 # The test uses dlopen indirectly and would otherwise load system
146 # objects.
147 tst-idna_name_classify-ENV = \
148 LD_LIBRARY_PATH=$(ld-library-path):$(common-objpfx):$(common-objpfx)elf
149 $(objpfx)tst-idna_name_classify.out: $(gen-locales)