2 # Makefile for the Squid Object Cache server
4 # Uncomment and customize the following to suit your needs:
7 include $(top_srcdir)/src/Common.am
9 AUTOMAKE_OPTIONS = subdir-objects
11 ## we need our local files too (but avoid -I. at all costs)
12 INCLUDES += -I$(srcdir)
20 $(top_builddir)/src/ip/libip.la \
21 $(top_builddir)/lib/libmiscencoding.la \
22 $(top_builddir)/lib/libmiscutil.la \
27 include $(top_srcdir)/doc/manuals/Substitute.am
29 ## Several files need to be shared but we cannot depend on the other
30 ## directories to be built.
31 test_tools.cc: $(top_srcdir)/test-suite/test_tools.cc
32 cp $(top_srcdir)/test-suite/test_tools.cc .
34 stub_debug.cc: $(top_srcdir)/src/tests/stub_debug.cc
35 cp $(top_srcdir)/src/tests/stub_debug.cc .
37 stub_fd.cc: $(top_srcdir)/src/tests/stub_fd.cc
38 cp $(top_srcdir)/src/tests/stub_fd.cc .
40 time.cc: $(top_srcdir)/src/time.cc
41 cp $(top_srcdir)/src/time.cc .
43 # stock tools for unit tests - library independent versions of dlink_list
45 # globals.cc is needed by test_tools.cc.
46 # Neither of these should be disted from here.
47 TESTSOURCES= test_tools.cc
48 CLEANFILES += test_tools.cc stub_debug.cc stub_fd.cc time.cc
50 ## ##### helper-mux #####
52 libexec_SCRIPTS = helper-mux.pl
53 EXTRA_DIST += helper-mux.pl helper-mux.README
56 EXTRA_DIST += helper-ok-dying.pl helper-ok.pl
58 ## ##### squidclient #####
60 bin_PROGRAMS = squidclient
62 squidclient_SOURCES = squidclient.cc \
68 EXTRA_DIST += squidclient.1
69 man_MANS += squidclient.1
73 ## ##### cachemgr.cgi #####
75 DEFAULT_CACHEMGR_CONFIG = $(sysconfdir)/cachemgr.conf
77 libexec_PROGRAMS = cachemgr$(CGIEXT)
79 cachemgr__CGIEXT__SOURCES = cachemgr.cc \
84 cachemgr__CGIEXT__CXXFLAGS = -DDEFAULT_CACHEMGR_CONFIG=\"$(DEFAULT_CACHEMGR_CONFIG)\" $(AM_CXXFLAGS)
86 EXTRA_DIST += cachemgr.conf cachemgr.cgi.8 cachemgr.cgi.8.in
87 CLEANFILES += cachemgr.cgi.8
88 man_MANS += cachemgr.cgi.8
90 cachemgr.cgi.8: $(srcdir)/cachemgr.cgi.8.in Makefile
91 $(SUBSTITUTE) < $(srcdir)/cachemgr.cgi.8.in > $@
98 $(INSTALL_DATA) $(srcdir)/cachemgr.conf $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG).default
99 @if test -f $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG) ; then \
100 echo "$@ will not overwrite existing $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)" ; \
102 echo "$(INSTALL_DATA) $(srcdir)/cachemgr.conf $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)"; \
103 $(INSTALL_DATA) $(srcdir)/cachemgr.conf $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG); \
107 @$(SHELL) $(top_srcdir)/scripts/remove-cfg.sh "$(RM)" $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)
108 $(RM) -f $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG).default