Debian Codegraph @

ping/Makefile.am

raw
1 #
2 # Copyright (C) 1997-2026 Free Software Foundation, Inc.
3 #
4 # This file is part of GNU Inetutils.
5 #
6 # GNU Inetutils is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or (at
9 # your option) any later version.
10 #
11 # GNU Inetutils is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # General Public License for more details.
15 #
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see `http://www.gnu.org/licenses/'.
18
19 AM_CPPFLAGS = \
20 $(iu_INCLUDES) \
21 -I$(top_srcdir)/libicmp \
22 $(INCIDN)
23
24 AM_CFLAGS = $(WARN_CFLAGS)
25
26 LDADD = \
27 $(iu_LIBRARIES) \
28 $(LIBIDN) \
29 $(CLOCK_TIME_LIB) \
30 $(PTHREAD_SIGMASK_LIB) \
31 $(SELECT_LIB)
32
33 bin_PROGRAMS = $(ping_BUILD) $(ping6_BUILD)
34
35 EXTRA_PROGRAMS = ping ping6
36
37 ping_SOURCES = ping.c ping_common.c ping_echo.c ping_address.c \
38 ping_router.c ping_timestamp.c ping_common.h ping_impl.h ping.h libping.c
39 ping_LDADD = $(top_builddir)/libicmp/libicmp.a $(LDADD) $(LIBSOCKET) \
40 $(HOSTENT_LIB) $(LIBINTL) $(GETADDRINFO_LIB)
41
42 ping6_SOURCES = ping6.c ping_common.c ping_common.h ping6.h
43 ping6_LDADD = $(top_builddir)/libicmp/libicmp.a $(LDADD) $(LIBSOCKET) \
44 $(HOSTENT_LIB) $(LIBINTL) $(GETADDRINFO_LIB)
45
46 SUIDMODE = -o root -m 4755
47
48 install-ping-hook:
49 -@for x in $(bin_PROGRAMS); do \
50 $(INSTALL_PROGRAM) $(SUIDMODE) $(AM_INSTALL_PROGRAM_FLAGS) $$x $(DESTDIR)$(bindir)/`echo $$x|sed '$(transform)'` ; OUTCOME=$$?; \
51 if test $$OUTCOME -ne 0; then \
52 echo "WARNING: Failed to install $$x (exit code $$OUTCOME)"; \
53 echo "NOTE: This program often needs to be owned by root."; \
54 fi \
55 done
56
57 install-exec-hook: $(ping_INSTALL_HOOK)