1## Copyright (C) 1996-2021 The Squid Software Foundation and contributors
2##
3## Squid software is distributed under GPLv2+ license and includes
4## contributions from numerous individuals and organizations.
5## Please see the COPYING and CONTRIBUTORS files for details.
6##
7
8## Settings common to many Squid Makefiles
9
10## This file should be included first in all src/subdir/Makefile.am
11## so it must not contain stuff specific to or bad for some subdirectories.
12
13## Default variables
14DEFAULT_HTTP_PORT	= 3128
15DEFAULT_ICP_PORT	= 3130
16DEFAULT_PREFIX		= $(prefix)
17DEFAULT_CONFIG_DIR	= $(sysconfdir)
18DEFAULT_CONFIG_FILE	= $(DEFAULT_CONFIG_DIR)/squid.conf
19DEFAULT_MIME_TABLE	= $(DEFAULT_CONFIG_DIR)/mime.conf
20DEFAULT_SSL_CRTD	= $(libexecdir)/`echo security_file_certgen | sed '$(transform);s/$$/$(EXEEXT)/'`
21DEFAULT_LOG_PREFIX	= $(DEFAULT_LOG_DIR)
22DEFAULT_CACHE_LOG	= $(DEFAULT_LOG_PREFIX)/cache.log
23DEFAULT_ACCESS_LOG	= $(DEFAULT_LOG_PREFIX)/access.log
24DEFAULT_STORE_LOG	= $(DEFAULT_LOG_PREFIX)/store.log
25DEFAULT_NETDB_FILE	= $(DEFAULT_SWAP_DIR)/netdb.state
26DEFAULT_SSL_DB_DIR	= $(DEFAULT_SWAP_DIR)/ssl_db
27DEFAULT_PINGER		= $(libexecdir)/`echo pinger | sed '$(transform);s/$$/$(EXEEXT)/'`
28DEFAULT_UNLINKD		= $(libexecdir)/`echo unlinkd | sed '$(transform);s/$$/$(EXEEXT)/'`
29DEFAULT_LOGFILED	= $(libexecdir)/`echo log_file_daemon | sed '$(transform);s/$$/$(EXEEXT)/'`
30DEFAULT_DISKD		= $(libexecdir)/`echo diskd | sed '$(transform);s/$$/$(EXEEXT)/'`
31DEFAULT_ICON_DIR	= $(datadir)/icons
32DEFAULT_ERROR_DIR	= $(datadir)/errors
33
34## TODO: make this set by configure?
35AM_CFLAGS = $(SQUID_CFLAGS)
36AM_CXXFLAGS = $(SQUID_CXXFLAGS)
37DEFS = @DEFS@
38
39# Make ./configure location settings above available to the code
40DEFS += -DDEFAULT_CONFIG_FILE=\"$(DEFAULT_CONFIG_FILE)\" \
41	-DDEFAULT_SQUID_DATA_DIR=\"$(datadir)\" \
42	-DDEFAULT_SQUID_CONFIG_DIR=\"$(sysconfdir)\"
43
44## so that others can always use += for these variables
45CLEANFILES =
46check_PROGRAMS =
47TESTS =
48
49AM_CPPFLAGS = \
50	-I$(top_srcdir) \
51	-I$(top_srcdir)/include \
52	-I$(top_srcdir)/lib \
53	-I$(top_srcdir)/src \
54	-I$(top_builddir)/include \
55	$(LIBCPPUNIT_CFLAGS)
56
57## Kerberos headers require their include path.
58## Because we use libcompat for comm_err.h header protections ...
59AM_CPPFLAGS += $(KRB5INCS)
60
61## Loadable Modules requires LTDL include paths.
62## Because we need this to use the libray linking headers...
63if ENABLE_LOADABLE_MODULES
64AM_CPPFLAGS += $(INCLTDL)
65endif
66
67## make all compiled sources depend on generated files
68## XXX: Do we really need this? Does auto-dependency tracking work?
69$(OBJS): $(top_srcdir)/include/version.h $(top_builddir)/include/autoconf.h
70
71## Internal profiler is used even by some of the compat library stuff.
72if ENABLE_XPROF_STATS
73LIBPROFILER = $(top_builddir)/lib/profiler/libprofiler.la
74else
75LIBPROFILER=
76endif
77
78## Because compatibility is almost universal. And the link order is important.
79COMPAT_LIB = $(top_builddir)/compat/libcompatsquid.la $(LIBPROFILER)
80
81## Some helpers are written in Perl and need the local shell defined properly
82subst_perlshell = sed -e 's,[@]PERL[@],$(PERL),g' <$(srcdir)/$@.pl.in >$@ || ($(RM) -f $@ ; exit 1)
83