2 # Makefile for the Squid ICMP and Network Measurement API
5 # Housekeeping, shared by all Squid Makefiles.
6 # TODO: make this set by configure?
7 AM_CFLAGS = @SQUID_CFLAGS@
8 AM_CXXFLAGS = @SQUID_CXXFLAGS@
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
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
20 # ICMP Specific Configurations
32 libexec_PROGRAMS = $(PINGER)
34 noinst_LTLIBRARIES = libicmp-core.la libicmp.la
36 # ICMP API definition ...
37 libicmp_core_la_SOURCES = \
41 # Squid Internal ICMP helper interface
42 libicmp_la_SOURCES = \
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 = \
69 pinger_LDFLAGS = $(LIBADD_DL)
72 $(top_builddir)/lib/libmiscutil.a
73 pinger_DEPENDENCIES= \
75 $(top_builddir)/lib/libmiscutil.a
80 ## @f=$(PINGER_EXE); \
81 ## if test -f $(libexecdir)/$$f; then \
82 ## echo $(MV) $(libexecdir)/$$f $(libexecdir)/-$$f; \
83 ## $(MV) $(libexecdir)/$$f $(libexecdir)/-$$f; \
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; \
93 check_PROGRAMS= testIcmp testHeaders
94 TESTS= $(check_PROGRAMS)
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
106 ## Tests of the ICMP base module.
107 # Its used by pinger so SHOULD NOT require more dependancies! :-(
112 ../tests/testMain.cc \
115 ../../test-suite/test_tools.cc \
117 testIcmp_LDFLAGS = $(LIBADD_DL)
119 @SQUID_CPPUNIT_LIBS@ \
122 $(top_builddir)/lib/libmiscutil.a
123 testIcmp_DEPENDENCIES= @SQUID_CPPUNIT_LA@ \
125 $(top_builddir)/lib/libmiscutil.a