]> git.ipfire.org Git - thirdparty/squid.git/blob - src/icmp/Makefile.am
Author: Francesco Chemolli <kinkie@squid-cache.org>
[thirdparty/squid.git] / src / icmp / Makefile.am
1 #
2 # Makefile for the Squid ICMP and Network Measurement API
3 #
4
5 # Housekeeping, shared by all Squid Makefiles.
6 # TODO: make this set by configure?
7 AM_CFLAGS = @SQUID_CFLAGS@
8 AM_CXXFLAGS = @SQUID_CXXFLAGS@
9 DEFS = @DEFS@
10
11 INCLUDES = -I$(top_srcdir)/src @SQUID_CPPUNIT_INC@ -I$(top_srcdir)/include -I$(top_builddir)/lib
12 $(OBJS): $(top_srcdir)/include/version.h $(top_srcdir)/include/autoconf.h
13
14 # TODO: get rid of this when config filename is no longer a global constant.
15 # its only here so the testIcmp will link .
16 DEFS += -DDEFAULT_CONFIG_FILE=NULL
17
18
19
20 # ICMP Specific Configurations
21
22 if ENABLE_PINGER
23 PINGER = pinger
24 else
25 PINGER =
26 endif
27
28 EXTRA_PROGRAMS = \
29 pinger \
30 testIcmp
31
32 libexec_PROGRAMS = $(PINGER)
33
34 noinst_LTLIBRARIES = libicmp-core.la libicmp.la
35
36 # ICMP API definition ...
37 libicmp_core_la_SOURCES = \
38 Icmp.h \
39 Icmp.cc
40
41 # Squid Internal ICMP helper interface
42 libicmp_la_SOURCES = \
43 IcmpConfig.h \
44 IcmpSquid.h \
45 IcmpSquid.cc \
46 net_db.h \
47 net_db.cc
48
49 # ICMP lookup helper
50 pinger_SOURCES = \
51 IcmpPinger.h \
52 IcmpPinger.cc \
53 Icmp4.h \
54 Icmp4.cc \
55 Icmp6.h \
56 Icmp6.cc \
57 pinger.cc
58
59 # depends on these but install/dist is done elsewhere.
60 # TODO: remove when these are cleaned up in their own way.
61 nodist_pinger_SOURCES = \
62 Icmp.h \
63 ../debug.cc \
64 ../time.cc \
65 ../SquidConfig.cc \
66 ../SquidNew.cc \
67 ../globals.cc
68
69 pinger_LDFLAGS = $(LIBADD_DL)
70 pinger_LDADD=\
71 libicmp-core.la \
72 $(top_builddir)/lib/libmiscutil.a
73 pinger_DEPENDENCIES= \
74 libicmp-core.la \
75 $(top_builddir)/lib/libmiscutil.a
76
77
78
79 ##install-pinger:
80 ## @f=$(PINGER_EXE); \
81 ## if test -f $(libexecdir)/$$f; then \
82 ## echo $(MV) $(libexecdir)/$$f $(libexecdir)/-$$f; \
83 ## $(MV) $(libexecdir)/$$f $(libexecdir)/-$$f; \
84 ## fi; \
85 ## echo $(INSTALL_SUID) $$f $(libexecdir); \
86 ## $(INSTALL_SUID) $$f $(libexecdir) || exit 1; \
87 ## if test -f $(libexecdir)/-$$f; then \
88 ## echo $(RM) -f $(libexecdir)/-$$f; \
89 ## $(RM) -f $(libexecdir)/-$$f; \
90 ## fi
91
92
93 check_PROGRAMS= testIcmp testHeaders
94 TESTS= $(check_PROGRAMS)
95
96 ## Special Universal .h dependency test script
97 ## aborts if error encountered
98 testHeaders: $(top_srcdir)/src/icmp/*.h
99 $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "$(top_srcdir)/src/icmp/" || exit 1
100
101 ## No such file...
102 testHeaders.c:
103 touch testHeaders.c
104
105
106 ## Tests of the ICMP base module.
107 # Its used by pinger so SHOULD NOT require more dependancies! :-(
108 testIcmp_SOURCES=\
109 Icmp.h \
110 testIcmp.h \
111 testIcmp.cc \
112 ../tests/testMain.cc \
113 ../SquidTime.h \
114 ../time.cc \
115 ../../test-suite/test_tools.cc \
116 ../globals.cc
117 testIcmp_LDFLAGS = $(LIBADD_DL)
118 testIcmp_LDADD=\
119 @SQUID_CPPUNIT_LIBS@ \
120 @SQUID_CPPUNIT_LA@ \
121 libicmp-core.la \
122 $(top_builddir)/lib/libmiscutil.a
123 testIcmp_DEPENDENCIES= @SQUID_CPPUNIT_LA@ \
124 libicmp-core.la \
125 $(top_builddir)/lib/libmiscutil.a