]> git.ipfire.org Git - thirdparty/glibc.git/blame - inet/Makefile
resolv/tst-idna_name_classify: Isolate from system libraries
[thirdparty/glibc.git] / inet / Makefile
CommitLineData
04277e02 1# Copyright (C) 1991-2019 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
PE
15# License along with the GNU C Library; if not, see
16# <http://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
e196b7dd 25headers := netinet/ether.h netinet/in.h netinet/in_systm.h \
d9997a45 26 netinet/if_ether.h netinet/igmp.h \
df4ef2ab 27 netinet/tcp.h netinet/ip.h $(wildcard arpa/*.h protocols/*.h) \
7f1deee6 28 aliases.h ifaddrs.h netinet/ip6.h netinet/icmp6.h bits/in.h
28f540f4 29
60c96635 30routines := htonl htons \
3d61b63c 31 inet_lnaof inet_mkadr \
270d9d47 32 inet_netof inet_ntoa inet_net herrno herrno-loc \
5f0e6fc7
RM
33 gethstbyad gethstbyad_r gethstbynm gethstbynm2 gethstbynm2_r \
34 gethstbynm_r gethstent gethstent_r \
7cbc6984 35 getnetbyad getnetbyad_r getnetbynm getnetent getnetent_r \
5f0e6fc7
RM
36 getnetbynm_r \
37 getproto getproto_r getprtent getprtent_r getprtname getprtname_r \
38 getsrvbynm getsrvbynm_r getsrvbypt getsrvbypt_r getservent \
39 getservent_r \
6dbe2837
RM
40 ether_aton ether_aton_r ether_hton ether_line \
41 ether_ntoa ether_ntoa_r ether_ntoh \
a68b0d31 42 rcmd rexec ruserpass \
26761c28 43 getnetgrent_r getnetgrent \
1fb05e3d 44 getaliasent_r getaliasent getaliasname getaliasname_r \
f89d6892
UD
45 in6_addr getnameinfo if_index ifaddrs inet6_option \
46 getipv4sourcefilter setipv4sourcefilter \
80d8cb91 47 getsourcefilter setsourcefilter inet6_opt inet6_rth \
7f9f1ecb 48 inet6_scopeid_pton deadline idna idna_name_classify
28f540f4 49
773e79b3 50aux := check_pf check_native ifreq
1dc869d1 51
11a9c0ce 52tests := htontest test_ifindex tst-ntoa tst-ether_aton tst-network \
d4f0720b 53 tst-gethnm test-ifaddrs bug-if1 test-inet6_opt tst-ether_line \
0abbe7cd 54 tst-getni1 tst-getni2 tst-inet6_rth tst-checks tst-checks-posix \
899478c2 55 tst-sockaddr test-hnto-types tst-if_index-long
cf0bd2f7
FW
56
57# tst-deadline must be linked statically so that we can access
58# internal functions.
59tests-static += tst-deadline
b07367bc 60tests-internal += tst-deadline
7c3018f9 61
7f9f1ecb
FW
62# tst-idna_name_classify must be linked statically because it tests
63# internal functionality.
64tests-static += tst-idna_name_classify
65tests-internal += tst-idna_name_classify
66
7c3018f9
ZW
67# tst-inet6_scopeid_pton also needs internal functions but does not
68# need to be linked statically.
b07367bc 69tests-internal += tst-inet6_scopeid_pton
1522c368 70
28f540f4 71include ../Rules
67479a70 72
7f9f1ecb
FW
73LOCALES := en_US.UTF-8 en_US.ISO-8859-1
74include ../gen-locales.mk
75
67479a70
UD
76ifeq ($(have-thread-library),yes)
77
36975e8e
L
78CFLAGS-gethstbyad_r.c += -fexceptions
79CFLAGS-gethstbyad.c += -fexceptions
80CFLAGS-gethstbynm_r.c += -fexceptions
81CFLAGS-gethstbynm.c += -fexceptions
82CFLAGS-gethstbynm2_r.c += -fexceptions
83CFLAGS-gethstbynm2.c += -fexceptions
84CFLAGS-gethstent_r.c += -fexceptions
85CFLAGS-gethstent.c += -fexceptions
86CFLAGS-rcmd.c += -fexceptions
87CFLAGS-getnetbynm_r.c += -fexceptions
88CFLAGS-getnetbynm.c += -fexceptions
89CFLAGS-getnetbyad_r.c += -fexceptions
90CFLAGS-getnetbyad.c += -fexceptions
91CFLAGS-getnetent_r.c += -fexceptions
92CFLAGS-getnetent.c += -fexceptions
93CFLAGS-getaliasent_r.c += -fexceptions
94CFLAGS-getaliasent.c += -fexceptions
95CFLAGS-getrpcent_r.c += -fexceptions
96CFLAGS-getrpcent.c += -fexceptions
97CFLAGS-getservent_r.c += -fexceptions
98CFLAGS-getservent.c += -fexceptions
99CFLAGS-getprtent_r.c += -fexceptions
100CFLAGS-getprtent.c += -fexceptions
101CFLAGS-either_ntoh.c += -fexceptions
102CFLAGS-either_hton.c += -fexceptions
103CFLAGS-getnetgrent.c += -fexceptions
104CFLAGS-getnetgrent_r.c += -fexceptions
105
106CFLAGS-tst-checks-posix.c += -std=c99
107CFLAGS-tst-sockaddr.c += -fno-strict-aliasing
3375cfaf 108
67479a70 109endif
ce85d65b
UD
110
111ifeq ($(build-static-nss),yes)
112CFLAGS += -DSTATIC_NSS
113endif
7f9f1ecb 114
76d9e44c
FW
115# The test uses dlopen indirectly and would otherwise load system
116# objects.
117tst-idna_name_classify-ENV = \
118 LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)elf
7f9f1ecb 119$(objpfx)tst-idna_name_classify.out: $(gen-locales)