Makefile revision 2985
d5b7ba26785d7494166d48876362ba30ff30b98awrowe#
c30ef289fe64ac7fedc44cfcc6b439f0f8458b4cgregames# CDDL HEADER START
c30ef289fe64ac7fedc44cfcc6b439f0f8458b4cgregames#
396aeca634b86a3ab34d5bdb9c32cbce73c72421jerenkrantz# The contents of this file are subject to the terms of the
1f78f6d87f69c241a3e903a46bae4666d17a8513trawick# Common Development and Distribution License (the "License").
1f78f6d87f69c241a3e903a46bae4666d17a8513trawick# You may not use this file except in compliance with the License.
1f78f6d87f69c241a3e903a46bae4666d17a8513trawick#
1f78f6d87f69c241a3e903a46bae4666d17a8513trawick# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz# or http://www.opensolaris.org/os/licensing.
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz# See the License for the specific language governing permissions
99d360dcbb5ac2be27694be74cc6124dbadf3315jerenkrantz# and limitations under the License.
3ded62d7f2c9b12616d718b8c97d3044baa9ecdbjerenkrantz#
3ded62d7f2c9b12616d718b8c97d3044baa9ecdbjerenkrantz# When distributing Covered Code, include this CDDL HEADER in each
3ded62d7f2c9b12616d718b8c97d3044baa9ecdbjerenkrantz# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5a8f3bcf803321e69b226d3b98314305a68a586cjerenkrantz# If applicable, add the following below this CDDL HEADER, with the
5a8f3bcf803321e69b226d3b98314305a68a586cjerenkrantz# fields enclosed by brackets "[]" replaced with your own identifying
5a8f3bcf803321e69b226d3b98314305a68a586cjerenkrantz# information: Portions Copyright [yyyy] [name of copyright owner]
031acbd88cdb9051f474a38ef67ca403cb7039b3nd#
031acbd88cdb9051f474a38ef67ca403cb7039b3nd# CDDL HEADER END
031acbd88cdb9051f474a38ef67ca403cb7039b3nd
031acbd88cdb9051f474a38ef67ca403cb7039b3nd#
ebf6c41faad84ab037fff4f04ec987463457ef2acoar# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
ebf6c41faad84ab037fff4f04ec987463457ef2acoar#
ebf6c41faad84ab037fff4f04ec987463457ef2acoar
ebf6c41faad84ab037fff4f04ec987463457ef2acoarinclude ../../make-rules/shared-macros.mk
ebf6c41faad84ab037fff4f04ec987463457ef2acoar
ab8c0315521735c73ce16c8072f91e17c406ca5bndCOMPONENT_NAME= sudo
ab8c0315521735c73ce16c8072f91e17c406ca5bndSRC_VERSION= 1.8.9
ab8c0315521735c73ce16c8072f91e17c406ca5bndSRC_PATCH_VERSION= 5
b9e99e0d3154bbebe3e1b8d11d6c15bde79510a5ndCOMPONENT_VERSION= $(SRC_VERSION).$(SRC_PATCH_VERSION)
b9e99e0d3154bbebe3e1b8d11d6c15bde79510a5ndCOMPONENT_SRC= $(COMPONENT_NAME)-$(SRC_VERSION)p$(SRC_PATCH_VERSION)
b9e99e0d3154bbebe3e1b8d11d6c15bde79510a5ndCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
b9e99e0d3154bbebe3e1b8d11d6c15bde79510a5ndCOMPONENT_ARCHIVE_HASH= \
ea5f8cfbb7ef1d19318f6994c26dd73c38ffd8ddjerenkrantz sha256:bc9d5c96de5f8b4d2b014f87a37870aef60d2891c869202454069150a21a5c21
ea5f8cfbb7ef1d19318f6994c26dd73c38ffd8ddjerenkrantzCOMPONENT_ARCHIVE_URL= http://www.sudo.ws/sudo/dist/$(COMPONENT_ARCHIVE)
ea5f8cfbb7ef1d19318f6994c26dd73c38ffd8ddjerenkrantzCOMPONENT_PROJECT_URL= http://www.sudo.ws/
4567cfc6a65328bd3e8dd2b758ca926b389c7058brianpCOMPONENT_BUGDB= utility/sudo
4567cfc6a65328bd3e8dd2b758ca926b389c7058brianp
4567cfc6a65328bd3e8dd2b758ca926b389c7058brianpTPNO= 16733
3068cf5757c8bdbea77e8f6805686aa0b0241a17nd
3068cf5757c8bdbea77e8f6805686aa0b0241a17ndinclude $(WS_TOP)/make-rules/prep.mk
3068cf5757c8bdbea77e8f6805686aa0b0241a17ndinclude $(WS_TOP)/make-rules/configure.mk
3068cf5757c8bdbea77e8f6805686aa0b0241a17ndinclude $(WS_TOP)/make-rules/ips.mk
4cdc5446050c19b9d519a273a129188586e8d445jerenkrantz
4cdc5446050c19b9d519a273a129188586e8d445jerenkrantzCOMPONENT_PREP_ACTION = ( cd $(@D) ; $(AUTORECONF) -f -I m4 )
4cdc5446050c19b9d519a273a129188586e8d445jerenkrantz
e0b93afc77decfbc0aab461b08ee224a0af89af2rederpjCONFIGURE_ENV += "CC=$(CC)"
e0b93afc77decfbc0aab461b08ee224a0af89af2rederpjCONFIGURE_ENV += "CFLAGS=$(CFLAGS)"
e0b93afc77decfbc0aab461b08ee224a0af89af2rederpjCONFIGURE_ENV += "CXX=$(CXX)"
e0b93afc77decfbc0aab461b08ee224a0af89af2rederpjCONFIGURE_ENV += "MAKE=$(GMAKE)"
e0b93afc77decfbc0aab461b08ee224a0af89af2rederpjCONFIGURE_ENV += "LDFLAGS=$(LDFLAGS)"
c30ef289fe64ac7fedc44cfcc6b439f0f8458b4cgregames
c30ef289fe64ac7fedc44cfcc6b439f0f8458b4cgregamesCONFIGURE_OPTIONS += --with-ldap
c30ef289fe64ac7fedc44cfcc6b439f0f8458b4cgregamesCONFIGURE_OPTIONS += --with-project
c30ef289fe64ac7fedc44cfcc6b439f0f8458b4cgregamesCONFIGURE_OPTIONS += --with-timedir=/system/volatile/sudo
c30ef289fe64ac7fedc44cfcc6b439f0f8458b4cgregamesCONFIGURE_OPTIONS += --with-pam --with-pam-login
2f408250e9111c4b85b2b4b9b8836e83987efdefstoddardCONFIGURE_OPTIONS += --with-tty-tickets
2f408250e9111c4b85b2b4b9b8836e83987efdefstoddardCONFIGURE_OPTIONS += --without-insults
2f408250e9111c4b85b2b4b9b8836e83987efdefstoddardCONFIGURE_OPTIONS += --without-lecture
2f408250e9111c4b85b2b4b9b8836e83987efdefstoddardCONFIGURE_OPTIONS += --with-ignore-dot
d5b7ba26785d7494166d48876362ba30ff30b98awroweCONFIGURE_OPTIONS += --with-solaris-audit
47fe07199bddec6124ab7251c6be5c6c9ac00485jerenkrantzCONFIGURE_OPTIONS += --libexecdir=/usr/lib/sudo
47fe07199bddec6124ab7251c6be5c6c9ac00485jerenkrantzCONFIGURE_OPTIONS += "sudo_cv_var_nroff_opt_Tascii=no"
6646a289c2d4778c8cd43d62b5a1cc966a356f85jerenkrantz
6646a289c2d4778c8cd43d62b5a1cc966a356f85jerenkrantzCOMPONENT_BUILD_ENV += CC=$(CC) CXX=$(CXX)
6646a289c2d4778c8cd43d62b5a1cc966a356f85jerenkrantzCOMPONENT_BUILD_ENV += "CFLAGS=$(CFLAGS)"
6646a289c2d4778c8cd43d62b5a1cc966a356f85jerenkrantz
aec70520ebe1e33e0d5e83c3626649d2a41dbe68wroweCOMPONENT_INSTALL_TARGETS = install
aec70520ebe1e33e0d5e83c3626649d2a41dbe68wroweCOMPONENT_INSTALL_ARGS += bindir=$(USRBINDIR)
aec70520ebe1e33e0d5e83c3626649d2a41dbe68wroweCOMPONENT_INSTALL_ARGS += sbindir=$(USRSBINDIR)
ad451e2e428a069086d1c18c9e3372f8846ec617wrowe
ad451e2e428a069086d1c18c9e3372f8846ec617wrowe
ad451e2e428a069086d1c18c9e3372f8846ec617wrowe# Enable aslr for this component
ad451e2e428a069086d1c18c9e3372f8846ec617wroweASLR_MODE = $(ASLR_ENABLE)
367cefc17f8dcfe65651c9c16cb3151589c6cecetrawick
74b84dd6e146edc93cf1b3200e411bfc581f7c36nd# common targets
74b84dd6e146edc93cf1b3200e411bfc581f7c36nd
74b84dd6e146edc93cf1b3200e411bfc581f7c36nd# 64 build corrupts audit logs because of 17561594. Until that is fixed do 32bit build.
74b84dd6e146edc93cf1b3200e411bfc581f7c36ndbuild: $(BUILD_32)
11e365512cbf021726cd3ec3d80743f408170ff9stoddard
11e365512cbf021726cd3ec3d80743f408170ff9stoddardinstall: $(INSTALL_32)
11e365512cbf021726cd3ec3d80743f408170ff9stoddard
11e365512cbf021726cd3ec3d80743f408170ff9stoddardVISUDO=$(BUILD_DIR_32)/plugins/sudoers/visudo
11e365512cbf021726cd3ec3d80743f408170ff9stoddardtest:
367cefc17f8dcfe65651c9c16cb3151589c6cecetrawick # Since linking with libmd.so (which provides sha2 capability on
2774f23eee36fdb1b30a8213bbcabe5336175e54jwoolley # Solaris) is optional, we have a check here to make sure that the
2774f23eee36fdb1b30a8213bbcabe5336175e54jwoolley # configure script found it correctly.
2774f23eee36fdb1b30a8213bbcabe5336175e54jwoolley # http://www.sudo.ws/bugs/show_bug.cgi?id=641
2774f23eee36fdb1b30a8213bbcabe5336175e54jwoolley
1944ddbbad413b60307d66081b022a3eee5f04cfbnicholes # Make sure that sudo is NOT built with it's internal sha2 implementation
1944ddbbad413b60307d66081b022a3eee5f04cfbnicholes if [[ -n $$( elfdump -s "$(VISUDO)" | grep SHA256Init | grep -v UNDEF ) ]]; then \
1944ddbbad413b60307d66081b022a3eee5f04cfbnicholes echo "SHA256Init is not an undefined symbol in $(VISUDO)"; \
1944ddbbad413b60307d66081b022a3eee5f04cfbnicholes exit 1; \
3b1dc8f8f153d7167da9e64ab44f3e90f486a458wrowe fi
3b1dc8f8f153d7167da9e64ab44f3e90f486a458wrowe # ... but is linked with libmd instead
3b1dc8f8f153d7167da9e64ab44f3e90f486a458wrowe if [[ -z $$( elfdump -d "$(VISUDO)" | grep 'NEEDED .* libmd.so' ) ]]; then \
3b1dc8f8f153d7167da9e64ab44f3e90f486a458wrowe echo "$(VISUDO) is not linked against libmd.so"; \
2404b81d39a1a539f980d4808d52d23997a9e006nd exit 1; \
2404b81d39a1a539f980d4808d52d23997a9e006nd fi
2404b81d39a1a539f980d4808d52d23997a9e006nd
a3754e9d2edd5758f94fd743b9cf9f814be80383nd
a3754e9d2edd5758f94fd743b9cf9f814be80383ndBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
a3754e9d2edd5758f94fd743b9cf9f814be80383nd
f9a987f71572291f35b9d0adc3fe79af96b2b147trawickinclude $(WS_TOP)/make-rules/depend.mk
f9a987f71572291f35b9d0adc3fe79af96b2b147trawick