Makefile revision 5680
4675N/A#
4675N/A# CDDL HEADER START
4675N/A#
4675N/A# The contents of this file are subject to the terms of the
4675N/A# Common Development and Distribution License (the "License").
4675N/A# You may not use this file except in compliance with the License.
4675N/A#
4675N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4675N/A# or http://www.opensolaris.org/os/licensing.
4675N/A# See the License for the specific language governing permissions
4675N/A# and limitations under the License.
4675N/A#
4675N/A# When distributing Covered Code, include this CDDL HEADER in each
4675N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4675N/A# If applicable, add the following below this CDDL HEADER, with the
4675N/A# fields enclosed by brackets "[]" replaced with your own identifying
4675N/A# information: Portions Copyright [yyyy] [name of copyright owner]
4675N/A#
4675N/A# CDDL HEADER END
4675N/A#
5680N/A
5680N/A#
5453N/A# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4675N/A#
5680N/ABUILD_BITS= 64_and_32
5680N/Ainclude ../../make-rules/shared-macros.mk
4675N/A
4675N/ACOMPONENT_NAME= nettle
5056N/ACOMPONENT_VERSION= 3.1.1
4675N/ACOMPONENT_PROJECT_URL= http://www.lysator.liu.se/~nisse/nettle/
4675N/ACOMPONENT_ARCHIVE_HASH= \
5056N/A sha256:5fd4d25d64d8ddcb85d0d897572af73b05b4d163c6cc49438a5bfbb8ff293d4c
4675N/ACOMPONENT_BUGDB= library/nettle
4675N/A
5056N/ATPNO= 23793
4675N/A
5453N/A# We need to build an extra static version of these libraries for
5453N/A# GRUB/Wanboot support.
5453N/A
5453N/Aifeq ($(MACH),i386)
5453N/A
5453N/AWANBOOT_CONFIGURE = $(BUILD_DIR)/wanboot-amd64/.configured
5453N/AWANBOOT_BUILD = $(BUILD_DIR)/wanboot-amd64/.built
5453N/AWANBOOT_INSTALL = $(BUILD_DIR)/wanboot-amd64/.installed
5453N/A
5453N/ACONFIGURE_32_and_64 += $(WANBOOT_CONFIGURE)
5453N/ABUILD_32_and_64 += $(WANBOOT_BUILD)
5453N/AINSTALL_32_and_64 += $(WANBOOT_INSTALL)
5453N/A
5453N/Aendif
5453N/A
5680N/Ainclude $(WS_MAKE_RULES)/gnu-component.mk
5680N/A
5680N/AMCS = mcs
5680N/ASTRIP = strip
5680N/A
5453N/A# Set the wanboot CFLAGS as needed for the wanboot compilation
5453N/A
5453N/ACFLAGS.wanboot += -D_BOOT
5453N/ACFLAGS.wanboot += -g
5453N/ACFLAGS.wanboot += -falign-jumps=1
5453N/ACFLAGS.wanboot += -falign-loops=1
5453N/ACFLAGS.wanboot += -falign-functions
5453N/ACFLAGS.wanboot += -mno-mmx
5453N/ACFLAGS.wanboot += -mno-3dnow
5453N/ACFLAGS.wanboot += -fno-dwarf2-cfi-asm
5453N/ACFLAGS.wanboot += -fno-asynchronous-unwind-tables
5453N/ACFLAGS.wanboot += -fno-common
5453N/ACFLAGS.wanboot += -mcmodel=large
5453N/ACFLAGS.wanboot += -mno-red-zone
5453N/ACFLAGS.wanboot += -fno-stack-protector
5453N/ACFLAGS.wanboot += -mno-stack-arg-probe
5453N/A
4675N/ACONFIGURE_OPTIONS += --libexecdir=$(CONFIGURE_LIBDIR.$(BITS))
4675N/ACONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
5680N/ACONFIGURE_OPTIONS += --with-include-path=$(USRINCDIR)/gmp
4675N/ACONFIGURE_OPTIONS += --disable-elliptic-curves
4675N/ACONFIGURE_OPTIONS += --disable-knuth-lfib
4675N/A
5453N/A# Set the wanboot configure options as needed for wanboot
5453N/A
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-assembler
5453N/ACONFIGURE_OPTIONS.wanboot += --enable-static
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-shared
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-pic
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-gcov
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-openssl
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-documentation
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-fat
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-arm-neon
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-x86-aesni
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-mini-gmp
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-ld-version-script
5453N/A
4675N/A# The additional set of transforms to be applied to the
4675N/A# test results to try to normalize them.
4675N/ACOMPONENT_TEST_TRANSFORMS += \
4675N/A '-e "1,/run-tests/d"' \
4675N/A '-e "/^e/d"'
4675N/A
4675N/ACOMPONENT_PREP_ACTION = \
4675N/A (cd $(@D) ; ACLOCAL=aclocal-1.11 AUTOMAKE=automake-1.11 autoreconf -fiv)
4675N/A
4675N/AASLR_MODE = $(ASLR_ENABLE)
4675N/A
5453N/A$(BUILD_DIR)/$(MACH32)/.configured: CFLAGS += $(CFLAGS.shared)
5453N/A$(BUILD_DIR)/$(MACH32)/.configured: CONFIGURE_OPTIONS += $(CONFIGURE_OPTIONS.shared)
5453N/A$(BUILD_DIR)/$(MACH64)/.configured: CFLAGS += $(CFLAGS.shared)
5453N/A$(BUILD_DIR)/$(MACH64)/.configured: CONFIGURE_OPTIONS += $(CONFIGURE_OPTIONS.shared)
5453N/A$(BUILD_DIR)/wanboot-amd64/.configured: BITS=64
5453N/A$(BUILD_DIR)/wanboot-amd64/.configured: COMPILER=gcc
5453N/A$(BUILD_DIR)/wanboot-amd64/.configured: CFLAGS += $(CFLAGS.wanboot)
5453N/A$(BUILD_DIR)/wanboot-amd64/.configured: CONFIGURE_OPTIONS += $(CONFIGURE_OPTIONS.wanboot)
5453N/A
5453N/A$(BUILD_DIR)/wanboot-amd64/.installed: \
5453N/A COMPONENT_POST_INSTALL_ACTION += \
5453N/A $(MKDIR) $(PROTO_DIR)/usr/lib/grub/wanboot;
5453N/A$(BUILD_DIR)/wanboot-amd64/.installed: \
5453N/A COMPONENT_POST_INSTALL_ACTION += \
5453N/A $(MV) $(PROTO_DIR)/usr/lib/amd64/libnettle.a $(PROTO_DIR)/usr/lib/grub/wanboot/libnettle.a;
5453N/A$(BUILD_DIR)/wanboot-amd64/.installed: \
5453N/A COMPONENT_POST_INSTALL_ACTION += \
5453N/A $(STRIP) -x $(PROTO_DIR)/usr/lib/grub/wanboot/libnettle.a;
5453N/A$(BUILD_DIR)/wanboot-amd64/.installed: \
5453N/A COMPONENT_POST_INSTALL_ACTION += \
5453N/A $(MCS) -d $(PROTO_DIR)/usr/lib/grub/wanboot/libnettle.a;
5453N/A$(BUILD_DIR)/wanboot-amd64/.installed: \
5453N/A COMPONENT_POST_INSTALL_ACTION += \
5453N/A $(AR) ts $(PROTO_DIR)/usr/lib/grub/wanboot/libnettle.a;
5453N/A$(BUILD_DIR)/wanboot-amd64/.installed: \
5453N/A COMPONENT_POST_INSTALL_ACTION += \
5453N/A $(MV) $(PROTO_DIR)/usr/lib/amd64/libhogweed.a $(PROTO_DIR)/usr/lib/grub/wanboot/libhogweed.a;
5453N/A$(BUILD_DIR)/wanboot-amd64/.installed: \
5453N/A COMPONENT_POST_INSTALL_ACTION += \
5453N/A $(STRIP) -x $(PROTO_DIR)/usr/lib/grub/wanboot/libhogweed.a;
5453N/A$(BUILD_DIR)/wanboot-amd64/.installed: \
5453N/A COMPONENT_POST_INSTALL_ACTION += \
5453N/A $(MCS) -d $(PROTO_DIR)/usr/lib/grub/wanboot/libhogweed.a;
5453N/A$(BUILD_DIR)/wanboot-amd64/.installed: \
5453N/A COMPONENT_POST_INSTALL_ACTION += \
5453N/A $(AR) ts $(PROTO_DIR)/usr/lib/grub/wanboot/libhogweed.a;
5453N/A
5680N/A# Required by this Makefile.
5680N/AREQUIRED_PACKAGES += developer/build/automake-111
4675N/A
4675N/AREQUIRED_PACKAGES += library/gmp