]> git.ipfire.org Git - thirdparty/squid.git/blob - src/icmp/Makefile.am
Source Format Enforcement (#1234)
[thirdparty/squid.git] / src / icmp / Makefile.am
1 ## Copyright (C) 1996-2023 The Squid Software Foundation and contributors
2 ##
3 ## Squid software is distributed under GPLv2+ license and includes
4 ## contributions from numerous individuals and organizations.
5 ## Please see the COPYING and CONTRIBUTORS files for details.
6 ##
7
8 include $(top_srcdir)/src/Common.am
9 include $(top_srcdir)/src/TestHeaders.am
10
11 # ICMP Specific Configurations
12
13 if ENABLE_PINGER
14 libexec_PROGRAMS = pinger
15 else
16 EXTRA_PROGRAMS = pinger
17 endif
18
19 noinst_LTLIBRARIES = libicmpcore.la libicmp.la
20
21 # ICMP API definition ...
22 libicmpcore_la_SOURCES = \
23 Icmp.cc \
24 Icmp.h
25
26 # Squid Internal ICMP helper interface
27 libicmp_la_SOURCES = \
28 IcmpConfig.cc \
29 IcmpConfig.h \
30 IcmpSquid.cc \
31 IcmpSquid.h \
32 net_db.cc \
33 net_db.h
34
35 libicmp_la_LIBADD= libicmpcore.la
36
37 # pinger depends on these but install/dist is done elsewhere.
38 COPIED_SOURCE= \
39 globals.cc \
40 SquidConfig.cc \
41 tests/stub_HelperChildConfig.cc \
42 tests/STUB.h
43
44 # ICMP lookup helper
45 pinger_SOURCES = \
46 Icmp.h \
47 Icmp4.cc \
48 Icmp4.h \
49 Icmp6.cc \
50 Icmp6.h \
51 IcmpPinger.cc \
52 IcmpPinger.h \
53 pinger.cc
54 nodist_pinger_SOURCES = $(COPIED_SOURCE)
55 pinger_LDFLAGS = $(LIBADD_DL)
56 pinger_LDADD=\
57 libicmpcore.la \
58 $(top_builddir)/src/ip/libip.la \
59 $(top_builddir)/src/sbuf/libsbuf.la \
60 $(top_builddir)/src/debug/libdebug.la \
61 $(top_builddir)/src/comm/libminimal.la \
62 $(top_builddir)/src/time/libtime.la \
63 $(top_builddir)/src/base/libbase.la \
64 $(top_builddir)/src/mem/libminimal.la \
65 $(LIBCAP_LIBS) \
66 $(COMPAT_LIB) \
67 $(SSLLIB) \
68 $(XTRA_LIBS)
69
70 CLEANFILES += $(COPIED_SOURCE)
71
72 ##install-pinger:
73 ## @f=$(PINGER_EXE); \
74 ## if test -f $(libexecdir)/$$f; then \
75 ## echo $(MV) $(libexecdir)/$$f $(libexecdir)/-$$f; \
76 ## $(MV) $(libexecdir)/$$f $(libexecdir)/-$$f; \
77 ## fi; \
78 ## echo $(INSTALL_SUID) $$f $(libexecdir); \
79 ## $(INSTALL_SUID) $$f $(libexecdir) || exit 1; \
80 ## if test -f $(libexecdir)/-$$f; then \
81 ## echo $(RM) -f $(libexecdir)/-$$f; \
82 ## $(RM) -f $(libexecdir)/-$$f; \
83 ## fi
84
85 ## files we need to pull in from other locations
86 ## copied like this to avoid subdir-objects collisions on 'make clean'
87 globals.cc: $(top_srcdir)/src/globals.h
88 cp $(top_builddir)/src/globals.cc $@
89
90 SquidConfig.cc: $(top_srcdir)/src/SquidConfig.cc
91 cp $(top_srcdir)/src/SquidConfig.cc $@
92
93 tests/stub_HelperChildConfig.cc: $(top_srcdir)/src/tests/stub_HelperChildConfig.cc | tests
94 cp $(top_srcdir)/src/tests/stub_HelperChildConfig.cc $@
95
96 tests/STUB.h: $(top_srcdir)/src/tests/STUB.h | tests
97 cp $(top_srcdir)/src/tests/STUB.h $@
98
99 tests:
100 mkdir -p $@