]> git.ipfire.org Git - thirdparty/squid.git/blob - src/icmp/Makefile.am
Merge from trunk
[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 CLEANFILES =
11
12 INCLUDES = \
13 -I$(top_srcdir) \
14 -I$(top_srcdir)/src \
15 -I$(top_srcdir)/include \
16 -I$(top_builddir)/lib \
17 @SQUID_CPPUNIT_INC@
18
19 $(OBJS): $(top_srcdir)/include/version.h $(top_srcdir)/include/autoconf.h
20
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
24
25
26
27 # ICMP Specific Configurations
28
29 if ENABLE_PINGER
30 PINGER = pinger
31 else
32 PINGER =
33 endif
34
35 EXTRA_PROGRAMS = \
36 pinger \
37 testIcmp
38
39 libexec_PROGRAMS = $(PINGER)
40
41 noinst_LTLIBRARIES = libicmp-core.la libicmp.la
42
43 # ICMP API definition ...
44 libicmp_core_la_SOURCES = \
45 Icmp.h \
46 Icmp.cc
47
48 # Squid Internal ICMP helper interface
49 libicmp_la_SOURCES = \
50 IcmpConfig.h \
51 IcmpSquid.h \
52 IcmpSquid.cc \
53 net_db.h \
54 net_db.cc
55
56 # ICMP lookup helper
57 pinger_SOURCES = \
58 Icmp.h \
59 IcmpPinger.h \
60 IcmpPinger.cc \
61 Icmp4.h \
62 Icmp4.cc \
63 Icmp6.h \
64 Icmp6.cc \
65 pinger.cc
66
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 = \
70 ../debug.cc \
71 ../globals.cc \
72 ../time.cc \
73 ../SquidConfig.cc \
74 ../SquidNew.cc
75
76 pinger_LDFLAGS = $(LIBADD_DL)
77 pinger_LDADD=\
78 libicmp-core.la \
79 ../ip/libip.la \
80 $(top_builddir)/lib/libmiscutil.a
81 pinger_DEPENDENCIES= \
82 libicmp-core.la \
83 $(top_builddir)/lib/libmiscutil.a
84
85
86
87 ##install-pinger:
88 ## @f=$(PINGER_EXE); \
89 ## if test -f $(libexecdir)/$$f; then \
90 ## echo $(MV) $(libexecdir)/$$f $(libexecdir)/-$$f; \
91 ## $(MV) $(libexecdir)/$$f $(libexecdir)/-$$f; \
92 ## fi; \
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; \
98 ## fi
99
100
101 check_PROGRAMS= testIcmp testHeaders
102 TESTS= $(check_PROGRAMS)
103
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
108
109 ## No such file...
110 testHeaders.c:
111 touch testHeaders.c
112 CLEANFILES += testHeaders.c
113
114
115 ## Tests of the ICMP base module.
116 # Its used by pinger so SHOULD NOT require more dependancies! :-(
117 testIcmp_SOURCES = \
118 Icmp.h \
119 testIcmp.h \
120 testIcmp.cc
121 nodist_testIcmp_SOURCES = \
122 ../tests/testMain.cc \
123 ../SquidTime.h \
124 ../time.cc \
125 ../../test-suite/test_tools.cc \
126 ../globals.cc
127 testIcmp_LDFLAGS = $(LIBADD_DL)
128 testIcmp_LDADD=\
129 @SQUID_CPPUNIT_LIBS@ \
130 @SQUID_CPPUNIT_LA@ \
131 libicmp-core.la \
132 ../ip/libip.la \
133 $(top_builddir)/lib/libmiscutil.a
134 testIcmp_DEPENDENCIES= @SQUID_CPPUNIT_LA@ \
135 libicmp-core.la \
136 $(top_builddir)/lib/libmiscutil.a