Makefile revision 3651
2N/A#
2N/A# CDDL HEADER START
2N/A#
2N/A# The contents of this file are subject to the terms of the
2N/A# Common Development and Distribution License (the "License").
2N/A# You may not use this file except in compliance with the License.
2N/A#
2N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A# or http://www.opensolaris.org/os/licensing.
2N/A# See the License for the specific language governing permissions
2N/A# and limitations under the License.
2N/A#
2N/A# When distributing Covered Code, include this CDDL HEADER in each
2N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A# If applicable, add the following below this CDDL HEADER, with the
2N/A# fields enclosed by brackets "[]" replaced with your own identifying
2N/A# information: Portions Copyright [yyyy] [name of copyright owner]
2N/A#
2N/A# CDDL HEADER END
2N/A#
2N/A# Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
2N/A#
2N/Ainclude ../../make-rules/shared-macros.mk
2N/A
2N/ACOMPONENT_NAME= sendmail
2N/ACOMPONENT_VERSION= 8.14.9
2N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
2N/ACOMPONENT_PROJECT_URL= ftp://ftp.sendmail.org/pub/sendmail/
2N/ACOMPONENT_ARCHIVE= $(COMPONENT_NAME).$(COMPONENT_VERSION).tar.gz
2N/ACOMPONENT_ARCHIVE_HASH= \
2N/A sha256:f5a497151abd8f341cca0736c3f9bd703d574d93146b2989689dff6d7a445d75
2N/ACOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)$(COMPONENT_ARCHIVE)
2N/ACOMPONENT_SIG_URL= $(COMPONENT_ARCHIVE_URL).sig
2N/ACOMPONENT_BUGDB= utility/sendmail
2N/A
2N/ATPNO= 7435
2N/A
2N/Ainclude ../../make-rules/prep.mk
2N/Ainclude ../../make-rules/justmake.mk
2N/Ainclude ../../make-rules/ips.mk
2N/Ainclude ../../make-rules/lint-libraries.mk
2N/A
2N/A# Although we build 32_and_64, everything except libmilter just wants 64,
2N/A# which is why the macros just below only have values for 64. libmilter
2N/A# is dealt with further below.
2N/APKG_PROTO_DIRS += $(BUILD_DIR_64)
2N/APKG_PROTO_DIRS += $(BUILD_DIR_64)/obj.SunOS.$(OS_VERSION).$(ARCH)
2N/APKG_PROTO_DIRS += $(COMPONENT_DIR)/files
2N/APKG_PROTO_DIRS += $(COMPONENT_DIR)/files/man
2N/A
2N/A# Userland default includes -mt which links with libthread which we don't need.
2N/Astudio_MT =
2N/A
2N/A# We set ARCH to match sendmail's configure-like script: on x86, it simply
2N/A# uses 'uname -m', but on sparc it shortens "sun4*" into "sun4".
2N/AARCH := $(shell uname -m)
2N/Aifeq ($(findstring sun4,$(ARCH)),sun4)
2N/AARCH = sun4
2N/Aendif
2N/AFILE_DIR=$(COMPONENT_DIR)/files
2N/AM4_ARG=-DSUN_HIDE_INTERNAL_DETAILS
2N/ASM_BUILD_SUB_DIR=obj.SunOS.$(OS_VERSION).$(ARCH)
2N/ASM_BUILD_DIR=$(@D)/$(SM_BUILD_SUB_DIR)
2N/A
2N/A# libmilter is built 32- and 64-bit, but its Makefile installs into a common
2N/A# location, so we use the macro below in its manifest to distinguish between
2N/A# the different built objects.
2N/APKG_MACROS += LIBMILTER_BUILD_DIR=$(SM_BUILD_SUB_DIR)
2N/A
2N/ACLEAN_PATHS += $(FILE_DIR)/aux/mailq
2N/A
2N/A# This appends "+Sun" to the version string, which we do for historical
2N/A# reasons. If we did this via patch, then we would have to revise the patch
2N/A# with every new release, since the version string changes every time.
2N/ACOMPONENT_PREP_ACTION = $(GSED) -i -e 's/\(Version\[\] = "8\.[^"]*\)/\1+Sun/' \
2N/A $(COMPONENT_SRC)/sendmail/version.c
2N/A
2N/A# libmilter and sendmail must come before include, so appending to the default
2N/A# value of LINT_FLAGS will not work; we must redefine it here.
2N/ASM_DEFS= -DSOLARIS=21200
2N/ASM_INCLUDES= -I$(SM_BUILD_DIR)/libmilter -I$(SOURCE_DIR)/sendmail \
2N/A -I$(SOURCE_DIR)/include -I$(SOURCE_DIR) -I.
2N/ALINT_FLAGS = -nsvx $(SM_DEFS) $(SM_INCLUDES)
2N/ACCOPTS = -erroff=E_STATEMENT_NOT_REACHED $(CC_BITS)
2N/A
2N/ACOMPONENT_BUILD_ARGS += CC="$(CC)"
2N/ACOMPONENT_BUILD_ARGS += CCOPTS="$(CCOPTS)"
2N/ACOMPONENT_BUILD_ARGS += CCLINK="$(CC)"
2N/ACOMPONENT_BUILD_ARGS += CC_PIC="$(CC_PIC)"
2N/ACOMPONENT_BUILD_ARGS += LDOPTS="$(CC_BITS)"
2N/A
2N/A# mailq's Makefile doesn't grok the 32- and 64-bit build. We just want 64.
2N/A# So we clean before we build, and the last build (64) wins, which is what
2N/A# we want.
2N/ACOMPONENT_POST_BUILD_ACTION = cd $(FILE_DIR)/aux ; \
2N/A $(GMAKE) BITS=$(BITS) clean build
2N/A
2N/ACOMPONENT_POST_INSTALL_ACTION += cd $(FILE_DIR)/aux ; $(GMAKE) install ;
2N/ACOMPONENT_POST_INSTALL_ACTION += \
2N/A $(CP) $(FILE_DIR)/cf/domain/solaris-generic.m4 $(@D)/cf/domain/ ;
2N/ACOMPONENT_POST_INSTALL_ACTION += \
2N/A $(CP) $(FILE_DIR)/cf/cf/sendmail.mc $(@D)/cf/cf/ ;
2N/ACOMPONENT_POST_INSTALL_ACTION += \
2N/A cd $(@D)/cf/cf ; \
2N/A $(RM) submit.cf ; \
2N/A m4 $(M4_ARG) ../m4/cf.m4 submit.mc > submit.cf ; \
2N/A m4 $(M4_ARG) ../m4/cf.m4 sendmail.mc > sendmail.cf
2N/A
2N/ACOMPONENT_TEST_ARGS += CC="$(CC)"
2N/ACOMPONENT_TEST_ARGS += CCOPTS="$(CCOPTS)"
2N/ACOMPONENT_TEST_ARGS += CCLINK="$(CC)"
2N/ACOMPONENT_TEST_ARGS += CC_PIC="$(CC_PIC)"
2N/ACOMPONENT_TEST_ARGS += LDOPTS="$(CC_BITS)"
2N/A
2N/ACOMPONENT_TEST_ENV += PATH=/usr/gnu/bin:/usr/bin
2N/A
2N/A# The transforms below abstract out the 32- or 64-bit specific parts of
2N/A# the results, so we can use a common "all" master file.
2N/ACOMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
2N/A
2N/ACOMPONENT_TEST_TRANSFORMS += \
2N/A '-e "s|$(SM_BUILD_SUB_DIR)|\\$$(SM_BUILD_SUB_DIR)|g" ' \
2N/A '-e "s|$(OS_VERSION)|\\$$(OS_VERSION)|g" ' \
2N/A '-e "s|$(ARCH)|\\$$(ARCH)|g" ' \
2N/A '-e "s|$(CC)|\\$$(CC)|g" ' \
2N/A '-e "s|$(CC_BITS)|\\$$(CC_BITS)|g" '
2N/A
2N/AASLR_MODE = $(ASLR_ENABLE)
2N/A
2N/AINSTALL_64=
2N/A
2N/A# common targets
2N/Abuild: $(BUILD_32_and_64)
2N/A
2N/Ainstall: $(INSTALL_32_and_64)
2N/A
2N/Atest: $(TEST_32_and_64)
2N/A
2N/ABUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
2N/A
2N/Ainclude ../../make-rules/depend.mk
2N/A