#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
#
# Enable adiheap and adistack security extensions
# Mostly but not completely migrated from ON in S12.
# Although we build 32_and_64, everything except libmilter just wants 64,
# which is why the macros just below only have values for 64. libmilter
# is dealt with further below.
PKG_PROTO_DIRS += $(BUILD_DIR_64)
# Userland default includes -mt which links with libthread which we don't need.
# We set ARCH to match sendmail's configure-like script: on x86, it simply
# uses 'uname -m', but on sparc it shortens "sun4*" into "sun4".
# libmilter is built 32- and 64-bit, but its Makefile installs into a common
# location, so we use the macro below in its manifest to distinguish between
# the different built objects.
# This appends "+Sun" to the version string, which we do for historical
# reasons. If we did this via patch, then we would have to revise the patch
# with every new release, since the version string changes every time.
# libmilter and sendmail must come before include, so appending to the default
# value of LINT_FLAGS will not work; we must redefine it here.
# Sendmail looks for its build configuration in various per-OS config files
# in its devtools/Site sub-dir, with site.config.m4 being the fallback. So
# create that file as part of the 'prep' phase.
#
# To build debug:
# * Uncomment the following line:
# COMPONENT_BUILD_ENV += studio_OPT=""
# * Uncomment the 'confOPTIMIZE' line in the recipe below, and move it
# before the 'endef' line:
#define(\`confOPTIMIZE', \`-g')
export SITE_CONFIG_M4
# mailq's Makefile doesn't grok the 32- and 64-bit build. We just want 64.
# So we clean before we build, and the last build (64) wins, which is what
# we want.
# Without the two $(CP)s below we would pick up the version of submit.cf
# from under $(COMPONENT_SRC), which is not what we want because it contains
# information (user, hostname, date, build path) from the upstream machine
# where the distro was created. So we build our own version here, using
# $(M4_ARG), which suppresses the inclusion of all that information.
# The transforms below abstract out the 32- or 64-bit specific parts of
# the results, so we can use a common "all" master file.
'-e "s|$(SM_BUILD_SUB_DIR)|\\$$(SM_BUILD_SUB_DIR)|g" ' \
'-e "s|$(OS_VERSION)|\\$$(OS_VERSION)|g" ' \
'-e "s|$(ARCH)|\\$$(ARCH)|g" ' \
'-e "s|^$(CC).*$$|XXX_CC_XXX|g" ' \
'-e "/^XXX_CC_XXX\\$$/d" '
# common targets
REQUIRED_PACKAGES += $(PERL_PKG)