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@
13 -I$(top_srcdir)/libsquid-compat \
15 -I$(top_srcdir)/include \
16 -I$(top_builddir)/lib \
19 $(OBJS): $(top_srcdir)/include/version.h $(top_srcdir)/include/autoconf.h
21 # TODO: get rid of this when config filename is no longer a global constant.
22 # its only here so the testIcmp will link .
23 DEFS += -DDEFAULT_CONFIG_FILE=NULL
27 # ICMP Specific Configurations
39 libexec_PROGRAMS = $(PINGER)
41 noinst_LTLIBRARIES = libicmp-core.la libicmp.la
43 # ICMP API definition ...
44 libicmp_core_la_SOURCES = \
48 # Squid Internal ICMP helper interface
49 libicmp_la_SOURCES = \
67 # depends on these but install/dist is done elsewhere.
68 # TODO: remove when these are cleaned up in their own way.
69 nodist_pinger_SOURCES = \
76 pinger_LDFLAGS = $(LIBADD_DL)
80 $(top_builddir)/lib/libmiscutil.a
81 pinger_DEPENDENCIES= \
83 $(top_builddir)/lib/libmiscutil.a
88 ## @f=$(PINGER_EXE); \
89 ## if test -f $(libexecdir)/$$f; then \
90 ## echo $(MV) $(libexecdir)/$$f $(libexecdir)/-$$f; \
91 ## $(MV) $(libexecdir)/$$f $(libexecdir)/-$$f; \
93 ## echo $(INSTALL_SUID) $$f $(libexecdir); \
94 ## $(INSTALL_SUID) $$f $(libexecdir) || exit 1; \
95 ## if test -f $(libexecdir)/-$$f; then \
96 ## echo $(RM) -f $(libexecdir)/-$$f; \
97 ## $(RM) -f $(libexecdir)/-$$f; \
101 check_PROGRAMS= testIcmp testHeaders
102 TESTS= $(check_PROGRAMS)
104 ## Special Universal .h dependency test script
105 ## aborts if error encountered
106 testHeaders: $(top_srcdir)/src/icmp/*.h
107 $(SHELL) $(top_srcdir)/test-suite/testheaders.sh "$(CXXCOMPILE)" "$(top_srcdir)/src/icmp/" || exit 1
112 CLEANFILES += testHeaders.c
115 ## Tests of the ICMP base module.
116 # Its used by pinger so SHOULD NOT require more dependancies! :-(
121 nodist_testIcmp_SOURCES = \
122 ../tests/testMain.cc \
125 ../../test-suite/test_tools.cc \
127 testIcmp_LDFLAGS = $(LIBADD_DL)
129 @SQUID_CPPUNIT_LIBS@ \
133 $(top_builddir)/lib/libmiscutil.a
134 testIcmp_DEPENDENCIES= @SQUID_CPPUNIT_LA@ \
136 $(top_builddir)/lib/libmiscutil.a