Makefile revision 3649
9dae059450bb6954fa548f86779ef90312be74bdDav Glass# CDDL HEADER START
9dae059450bb6954fa548f86779ef90312be74bdDav Glass# The contents of this file are subject to the terms of the
e5d90d0a84af3c76d6f7a8625caf9eb028680726Dav Glass# Common Development and Distribution License (the "License").
e5d90d0a84af3c76d6f7a8625caf9eb028680726Dav Glass# You may not use this file except in compliance with the License.
e5d90d0a84af3c76d6f7a8625caf9eb028680726Dav Glass# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
aa21e7e5a0527e42135e15729423313faf515e23Dav Glass# See the License for the specific language governing permissions
8367c40f471b6d7692cc67b0ad710817521d835dDav Glass# and limitations under the License.
31fda9ac7c62c1555a44b50f6c266d58d0e17260Dav Glass# When distributing Covered Code, include this CDDL HEADER in each
9dae059450bb6954fa548f86779ef90312be74bdDav Glass# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9dae059450bb6954fa548f86779ef90312be74bdDav Glass# If applicable, add the following below this CDDL HEADER, with the
9dae059450bb6954fa548f86779ef90312be74bdDav Glass# fields enclosed by brackets "[]" replaced with your own identifying
9dae059450bb6954fa548f86779ef90312be74bdDav Glass# information: Portions Copyright [yyyy] [name of copyright owner]
9dae059450bb6954fa548f86779ef90312be74bdDav Glass# CDDL HEADER END
9dae059450bb6954fa548f86779ef90312be74bdDav Glass# Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
9dae059450bb6954fa548f86779ef90312be74bdDav GlassCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
9dae059450bb6954fa548f86779ef90312be74bdDav GlassCOMPONENT_PROJECT_URL= ftp://ftp.sendmail.org/pub/sendmail/
9dae059450bb6954fa548f86779ef90312be74bdDav GlassCOMPONENT_ARCHIVE= $(COMPONENT_NAME).$(COMPONENT_VERSION).tar.gz
9dae059450bb6954fa548f86779ef90312be74bdDav Glass sha256:f5a497151abd8f341cca0736c3f9bd703d574d93146b2989689dff6d7a445d75
9dae059450bb6954fa548f86779ef90312be74bdDav GlassCOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)$(COMPONENT_ARCHIVE)
9dae059450bb6954fa548f86779ef90312be74bdDav GlassPKG_PROTO_DIRS += $(BUILD_DIR_32)/obj.SunOS.$(OS_VERSION).$(ARCH)
6f3ae49d2c323c8a52f4e09a0bf08f743c5f24f4Dav Glass# Userland default includes -mt which links with libthread which we don't need.
6f3ae49d2c323c8a52f4e09a0bf08f743c5f24f4Dav Glass# We set ARCH to match sendmail's configure-like script: on x86, it simply
6f3ae49d2c323c8a52f4e09a0bf08f743c5f24f4Dav Glass# uses 'uname -m', but on sparc it shortens "sun4*" into "sun4".
6f3ae49d2c323c8a52f4e09a0bf08f743c5f24f4Dav Glass# This appends "+Sun" to the version string, which we do for historical
6f3ae49d2c323c8a52f4e09a0bf08f743c5f24f4Dav Glass# reasons. If we did this via patch, then we would have to revise the patch
6f3ae49d2c323c8a52f4e09a0bf08f743c5f24f4Dav Glass# with every new release, since the version string changes every time.
6f3ae49d2c323c8a52f4e09a0bf08f743c5f24f4Dav GlassCOMPONENT_PREP_ACTION = $(GSED) -i -e 's/\(Version\[\] = "8\.[^"]*\)/\1+Sun/' \
6f3ae49d2c323c8a52f4e09a0bf08f743c5f24f4Dav Glass# libmilter and sendmail must come before include, so appending to the default
9dae059450bb6954fa548f86779ef90312be74bdDav Glass# value of LINT_FLAGS will not work; we must redefine it here.
9dae059450bb6954fa548f86779ef90312be74bdDav GlassSM_INCLUDES= -I$(SM_BUILD_DIR)/libmilter -I$(SOURCE_DIR)/sendmail \
64c6e02eab1938ea506b95e4146200cbbcced599Dav GlassCCOPTS = -erroff=E_STATEMENT_NOT_REACHED $(CC_BITS)
9dae059450bb6954fa548f86779ef90312be74bdDav GlassCOMPONENT_POST_BUILD_ACTION = cd $(FILE_DIR)/aux ; $(GMAKE) build
6f3ae49d2c323c8a52f4e09a0bf08f743c5f24f4Dav GlassCOMPONENT_POST_INSTALL_ACTION += cd $(FILE_DIR)/aux ; $(GMAKE) install ;
9dae059450bb6954fa548f86779ef90312be74bdDav Glass $(CP) $(FILE_DIR)/cf/domain/solaris-generic.m4 $(@D)/cf/domain/ ;
64c6e02eab1938ea506b95e4146200cbbcced599Dav Glass $(CP) $(FILE_DIR)/cf/cf/sendmail.mc $(@D)/cf/cf/ ;
9dae059450bb6954fa548f86779ef90312be74bdDav Glass m4 $(M4_ARG) ../m4/cf.m4 submit.mc > submit.cf ; \
9dae059450bb6954fa548f86779ef90312be74bdDav Glass m4 $(M4_ARG) ../m4/cf.m4 sendmail.mc > sendmail.cf
9dae059450bb6954fa548f86779ef90312be74bdDav Glass '-e "s|$(SM_BUILD_SUB_DIR)|\\$$(SM_BUILD_SUB_DIR)|g" ' \
6f3ae49d2c323c8a52f4e09a0bf08f743c5f24f4Dav Glass '-e "s|$(OS_VERSION)|\\$$(OS_VERSION)|g" ' \
64c6e02eab1938ea506b95e4146200cbbcced599Dav Glass '-e "s|$(ARCH)|\\$$(ARCH)|g" ' \
9dae059450bb6954fa548f86779ef90312be74bdDav Glass '-e "s|$(CC)|\\$$(CC)|g" '
9dae059450bb6954fa548f86779ef90312be74bdDav Glass# common targets