Makefile revision 7243
5088N/A# The contents of this file are subject to the terms of the 5088N/A# Common Development and Distribution License (the "License"). 5088N/A# You may not use this file except in compliance with the License. 5088N/A# See the License for the specific language governing permissions 5088N/A# and limitations under the License. 5088N/A# When distributing Covered Code, include this CDDL HEADER in each 5088N/A# If applicable, add the following below this CDDL HEADER, with the 5088N/A# fields enclosed by brackets "[]" replaced with your own identifying 5088N/A# information: Portions Copyright [yyyy] [name of copyright owner] 5088N/A# Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. 5088N/A# Enable adiheap and adistack security extensions 5171N/A# Mostly but not completely migrated from ON in S12. 5088N/A# Although we build 32_and_64, everything except libmilter just wants 64, 5088N/A# which is why the macros just below only have values for 64. libmilter 5088N/A# is dealt with further below. 5680N/A# Userland default includes -mt which links with libthread which we don't need. 5680N/A# We set ARCH to match sendmail's configure-like script: on x86, it simply 5088N/A# uses 'uname -m', but on sparc it shortens "sun4*" into "sun4". 5088N/A# libmilter is built 32- and 64-bit, but its Makefile installs into a common 5088N/A# location, so we use the macro below in its manifest to distinguish between 5088N/A# the different built objects. 5088N/A# This appends "+Sun" to the version string, which we do for historical 5088N/A# reasons. If we did this via patch, then we would have to revise the patch 5088N/A# with every new release, since the version string changes every time. 5088N/A# libmilter and sendmail must come before include, so appending to the default 5088N/A# value of LINT_FLAGS will not work; we must redefine it here. # Sendmail looks for its build configuration in various per-OS config files # create that file as part of the 'prep' phase. # * 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') # 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 # 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. # Then we copy it to $(PROTO_DIR)/cf/cf instead of the more intuitive # $(PROTOETCDIR)/mail/cf/cf to match the transform in the manifest that # picks up everything under etc/mail/cf/ from cf/ instead. # 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" '