Makefile revision 4337
12343c067e12be071a68bbb10d1d1c4870696769Tinderbox User#
6c2a76b3e2ccd32c35814b6e0f54da00190749d7Evan Hunt# CDDL HEADER START
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater#
c7fd128f8ea8a527fe27c1b95ab46df7155bc8e4Tinderbox User# The contents of this file are subject to the terms of the
c7fd128f8ea8a527fe27c1b95ab46df7155bc8e4Tinderbox User# Common Development and Distribution License (the "License").
ba9e87b35e561bc7354ce3f4b9685b747b7be507Tinderbox User# You may not use this file except in compliance with the License.
1f9754245cbd5eec2d2a667bb292f62f72386d4bMark Andrews#
59663800d2ec04777dae2791dd92aa563faf94c8Evan Hunt# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# or http://www.opensolaris.org/os/licensing.
1f9754245cbd5eec2d2a667bb292f62f72386d4bMark Andrews# See the License for the specific language governing permissions
59663800d2ec04777dae2791dd92aa563faf94c8Evan Hunt# and limitations under the License.
1ca2cf024391992fe14b2df7d3ae0f575d074452Evan Hunt#
0726d872f6f36901ea09321df57084614e5bb6faTinderbox User# When distributing Covered Code, include this CDDL HEADER in each
1ca2cf024391992fe14b2df7d3ae0f575d074452Evan Hunt# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
a2c370ca12bb0360ff7e969474ead3f788c65fffTinderbox User# If applicable, add the following below this CDDL HEADER, with the
8de3f14f1c300c3e1ed99084cc03485b42c92bf1Tinderbox User# fields enclosed by brackets "[]" replaced with your own identifying
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews#
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User# CDDL HEADER END
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews
2b7254075b883d70852a2757210793603085a0f1Tinderbox User#
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
b91d11bfcc30b96f2c80f3a76d12e3dcc8597a68Mark Andrews
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrewsinclude ../../make-rules/shared-macros.mk
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCOMPONENT_NAME= sudo
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark AndrewsSRC_VERSION= 1.8.9
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark AndrewsSRC_PATCH_VERSION= 5
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCOMPONENT_VERSION= $(SRC_VERSION).$(SRC_PATCH_VERSION)
415d630b6309922caee8469384a6fab75cf05032Mark AndrewsCOMPONENT_SRC= $(COMPONENT_NAME)-$(SRC_VERSION)p$(SRC_PATCH_VERSION)
0eb371ca0dab50ae3462e98794a6126198c52f4bMark AndrewsCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
415d630b6309922caee8469384a6fab75cf05032Mark AndrewsCOMPONENT_ARCHIVE_HASH= \
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark Andrews sha256:bc9d5c96de5f8b4d2b014f87a37870aef60d2891c869202454069150a21a5c21
9218b940febade3085fd6d95a15e67d5f94833f0Tinderbox UserCOMPONENT_ARCHIVE_URL= http://www.sudo.ws/sudo/dist/$(COMPONENT_ARCHIVE)
0eb371ca0dab50ae3462e98794a6126198c52f4bMark AndrewsCOMPONENT_PROJECT_URL= http://www.sudo.ws/
415d630b6309922caee8469384a6fab75cf05032Mark AndrewsCOMPONENT_BUGDB= utility/sudo
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark AndrewsTPNO= 16733
9218b940febade3085fd6d95a15e67d5f94833f0Tinderbox User
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrewsinclude $(WS_MAKE_RULES)/prep.mk
415d630b6309922caee8469384a6fab75cf05032Mark Andrewsinclude $(WS_MAKE_RULES)/configure.mk
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrewsinclude $(WS_MAKE_RULES)/ips.mk
415d630b6309922caee8469384a6fab75cf05032Mark Andrews
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark AndrewsCOMPONENT_PREP_ACTION = ( cd $(@D) ; $(AUTORECONF) -f -I m4 )
9218b940febade3085fd6d95a15e67d5f94833f0Tinderbox User
0eb371ca0dab50ae3462e98794a6126198c52f4bMark AndrewsCONFIGURE_ENV += "CC=$(CC)"
015055b6e23f5c08f6a5b34726f90b62597e9e45Tinderbox UserCONFIGURE_ENV += "CFLAGS=$(CFLAGS)"
7fcb9dbe08bc0111c5e03e953ba889f86a38b854Tinderbox UserCONFIGURE_ENV += "CXX=$(CXX)"
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan HuntCONFIGURE_ENV += "MAKE=$(GMAKE)"
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark AndrewsCONFIGURE_ENV += "CPPFLAGS=$(CPPFLAGS) -I/usr/include/openldap"
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark AndrewsCONFIGURE_ENV += "LDFLAGS=$(LDFLAGS) -m64 -lldap_r-2.4"
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark AndrewsCONFIGURE_OPTIONS += --with-ldap
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark AndrewsCONFIGURE_OPTIONS += --with-project
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark AndrewsCONFIGURE_OPTIONS += --with-timedir=/system/volatile/sudo
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan HuntCONFIGURE_OPTIONS += --with-pam
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark AndrewsCONFIGURE_OPTIONS += --with-pam-login
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark AndrewsCONFIGURE_OPTIONS += --disable-pam-session
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan HuntCONFIGURE_OPTIONS += --with-tty-tickets
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark AndrewsCONFIGURE_OPTIONS += --without-insults
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark AndrewsCONFIGURE_OPTIONS += --without-lecture
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark AndrewsCONFIGURE_OPTIONS += --with-ignore-dot
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark AndrewsCONFIGURE_OPTIONS += --with-solaris-audit
0eb371ca0dab50ae3462e98794a6126198c52f4bMark AndrewsCONFIGURE_OPTIONS += --libexecdir=/usr/lib/sudo
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic UpdaterCONFIGURE_OPTIONS += "sudo_cv_var_nroff_opt_Tascii=no"
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark Andrews
9218b940febade3085fd6d95a15e67d5f94833f0Tinderbox UserCOMPONENT_BUILD_ENV += CC=$(CC) CXX=$(CXX)
0eb371ca0dab50ae3462e98794a6126198c52f4bMark AndrewsCOMPONENT_BUILD_ENV += "CFLAGS=$(CFLAGS)"
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterCOMPONENT_INSTALL_TARGETS = install
0eb371ca0dab50ae3462e98794a6126198c52f4bMark AndrewsCOMPONENT_INSTALL_ARGS += bindir=$(USRBINDIR)
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark AndrewsCOMPONENT_INSTALL_ARGS += sbindir=$(USRSBINDIR)
9218b940febade3085fd6d95a15e67d5f94833f0Tinderbox User
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# Since linking with libmd.so (which provides sha2 capability on
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Solaris) is optional, we have a check here to make sure that the
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# configure script found it correctly.
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark Andrews# http://www.sudo.ws/bugs/show_bug.cgi?id=641
0eb371ca0dab50ae3462e98794a6126198c52f4bMark Andrews# Make sure that sudo is NOT built with its internal sha2 implementation
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark Andrews# ... but is linked with libmd instead
9218b940febade3085fd6d95a15e67d5f94833f0Tinderbox UserCOMPONENT_TEST_ENV_CMD =
0eb371ca0dab50ae3462e98794a6126198c52f4bMark AndrewsCOMPONENT_TEST_CMD = \
015055b6e23f5c08f6a5b34726f90b62597e9e45Tinderbox User if [[ -n $$( elfdump -s "$(VISUDO)" | grep SHA256Init | grep -v UNDEF ) ]]; then \
3ccf87473f7cf6d9faac156df38a935a238f96fdTinderbox User echo "SHA256Init is not an undefined symbol in $(VISUDO)"; \
fec6e13f2d1e69fe1c2b8fac36f732f124cf5398Mark Andrews exit 1; \
b378314925e78f21853a98cec924788ce1822c6cTinderbox User fi; \
ebe53509ca55a141131c104b6d722236b606e0efTinderbox User if [[ -z $$( elfdump -d "$(VISUDO)" | grep 'NEEDED .* libmd.so' ) ]]; then \
fec6e13f2d1e69fe1c2b8fac36f732f124cf5398Mark Andrews echo "$(VISUDO) is not linked against libmd.so"; \
415d630b6309922caee8469384a6fab75cf05032Mark Andrews exit 1; \
2ae159b376dac23870d8005563c585acf85a4b5aEvan Hunt fi
415d630b6309922caee8469384a6fab75cf05032Mark AndrewsCOMPONENT_TEST_TARGETS =
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark Andrews
9218b940febade3085fd6d95a15e67d5f94833f0Tinderbox User# Enable aslr for this component
2ae159b376dac23870d8005563c585acf85a4b5aEvan HuntASLR_MODE = $(ASLR_ENABLE)
7cc0a5d21ef046bfd630c4769943d896a7d7472cTinderbox User
3ccf87473f7cf6d9faac156df38a935a238f96fdTinderbox User# common targets
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
9218b940febade3085fd6d95a15e67d5f94833f0Tinderbox Userconfigure: $(CONFIGURE_64)
551e6d2414c4f47d58a9bb0b37f206f915a4f5acTinderbox User
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewsbuild: $(BUILD_64)
9218b940febade3085fd6d95a15e67d5f94833f0Tinderbox User
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewsinstall: $(INSTALL_64)
9218b940febade3085fd6d95a15e67d5f94833f0Tinderbox User
9218b940febade3085fd6d95a15e67d5f94833f0Tinderbox UserVISUDO=$(BUILD_DIR_64)/plugins/sudoers/visudo
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewstest: $(TEST_64)
51aeb0ae19596e99b029cfa933e73b76ebec480aTinderbox User
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewssystem-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED)
9218b940febade3085fd6d95a15e67d5f94833f0Tinderbox User
9218b940febade3085fd6d95a15e67d5f94833f0Tinderbox User
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsREQUIRED_PACKAGES += library/zlib
415d630b6309922caee8469384a6fab75cf05032Mark AndrewsREQUIRED_PACKAGES += library/openldap
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonREQUIRED_PACKAGES += system/library
415d630b6309922caee8469384a6fab75cf05032Mark AndrewsREQUIRED_PACKAGES += system/library/security/crypto
e813f036c8251b6d9d2a72fa84f80c2c9d2795afMark Andrews