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)
14 SUBDIRS = purge squidclient
20 $(top_builddir)/src/ip/libip.la \
21 $(top_builddir)/lib/libmiscencoding.la \
22 $(top_builddir)/lib/libmiscutil.la \
28 include $(top_srcdir)/doc/manuals/Substitute.am
30 ## Several files need to be shared but we cannot depend on the other
31 ## directories to be built.
32 test_tools.cc: $(top_srcdir)/test-suite/test_tools.cc
33 cp $(top_srcdir)/test-suite/test_tools.cc .
35 stub_debug.cc: $(top_srcdir)/src/tests/stub_debug.cc
36 cp $(top_srcdir)/src/tests/stub_debug.cc .
38 time.cc: $(top_srcdir)/src/time.cc
39 cp $(top_srcdir)/src/time.cc .
41 # stock tools for unit tests - library independent versions of dlink_list
43 # globals.cc is needed by test_tools.cc.
44 # Neither of these should be disted from here.
45 TESTSOURCES= test_tools.cc
46 CLEANFILES += test_tools.cc stub_debug.cc time.cc
48 ## ##### helper-mux #####
50 libexec_SCRIPTS = helper-mux.pl
51 EXTRA_DIST += helper-mux.pl helper-mux.README
54 EXTRA_DIST += helper-ok-dying.pl helper-ok.pl
57 ## ##### cachemgr.cgi #####
59 DEFAULT_CACHEMGR_CONFIG = $(sysconfdir)/cachemgr.conf
61 libexec_PROGRAMS = cachemgr$(CGIEXT)
63 cachemgr__CGIEXT__SOURCES = cachemgr.cc \
68 cachemgr__CGIEXT__CXXFLAGS = -DDEFAULT_CACHEMGR_CONFIG=\"$(DEFAULT_CACHEMGR_CONFIG)\" $(AM_CXXFLAGS)
70 EXTRA_DIST += cachemgr.conf cachemgr.cgi.8 cachemgr.cgi.8.in
71 CLEANFILES += cachemgr.cgi.8
72 man_MANS += cachemgr.cgi.8
74 cachemgr.cgi.8: $(srcdir)/cachemgr.cgi.8.in Makefile
75 $(SUBSTITUTE) < $(srcdir)/cachemgr.cgi.8.in > $@
82 $(INSTALL_DATA) $(srcdir)/cachemgr.conf $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG).default
83 @if test -f $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG) ; then \
84 echo "$@ will not overwrite existing $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)" ; \
86 echo "$(INSTALL_DATA) $(srcdir)/cachemgr.conf $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)"; \
87 $(INSTALL_DATA) $(srcdir)/cachemgr.conf $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG); \
91 @$(SHELL) $(top_srcdir)/scripts/remove-cfg.sh "$(RM)" $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)
92 $(RM) -f $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG).default