components/sbsigntool/Makefile
author jiawliu <gerry.liu@oracle.com>
Thu, 28 Jul 2016 14:41:31 -0700
changeset 6510 d00d3d1fc778
permissions -rw-r--r--
PSARC/2016/276 sbsigntool integration 23185392 Add sbsigntool to Userland
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6510
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
     1
#
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
     3
#
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
     7
#
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    12
#
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    18
#
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    20
#
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    21
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    22
#
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    23
# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    24
#
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    25
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    26
BUILD_ARCH= i386
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    27
BUILD_BITS= 64
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    28
# component fails to build with Studio
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    29
COMPILER= gcc
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    30
include ../../make-rules/shared-macros.mk
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    31
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    32
COMPONENT_NAME=		sbsigntool
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    33
COMPONENT_VERSION=	0.6
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    34
COMPONENT_PROJECT_URL=  https://launchpad.net/ubuntu/+source/sbsigntool
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    35
COMPONENT_ARCHIVE=	$(COMPONENT_NAME)_$(COMPONENT_VERSION).orig.tar.gz
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    36
COMPONENT_ARCHIVE_HASH= \
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    37
    sha256:84fb0c8f6fb1e79aa418a4f70a3139b38d5630043b28291c875f383e9b4294b8
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    38
COMPONENT_ARCHIVE_URL=  https://launchpad.net/ubuntu/+archive/primary/+files/$(COMPONENT_ARCHIVE)
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    39
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    40
TPNO=		        27912	
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    41
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    42
include $(WS_MAKE_RULES)/common.mk
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    43
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    44
studio_C99MODE= $(studio_C99_ENABLE) 
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    45
CFLAGS += -I. -I/usr/gnu/include -I/usr/include/ -I/usr/include/efi/x86_64 -I/usr/include/efi/
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    46
CONFIGURE_OPTIONS  +=  uuid_CFLAGS="-I/usr/include/uuid" uuid_LIBS="-luuid"
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    47
PATH=/usr/gnu/bin:/usr/bin
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    48
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    49
COMPONENT_PREP_ACTION = \
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    50
        (cd $(@D) ; ACLOCAL=aclocal-1.11 AUTOMAKE=automake-1.11 autoreconf -fiv)
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    51
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    52
COMPONENT_PRE_TEST_ACTION = \
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    53
        (cp test-x86_64_sol2.lds  $(SOURCE_DIR)/tests/.)
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    54
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    55
include $(WS_MAKE_RULES)/shared-targets.mk
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    56
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    57
COMPONENT_TEST_TRANSFORMS += \
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    58
	'-n -e "/tests passed/p" ' \
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    59
	'-e "/PASS/p" ' \
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    60
	'-e "/FAIL/p" '
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    61
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    62
ifeq ($(MACH), i386)
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    63
REQUIRED_PACKAGES += library/libgnuefi
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    64
endif
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    65
REQUIRED_PACKAGES += library/security/openssl
d00d3d1fc778 PSARC/2016/276 sbsigntool integration
jiawliu <gerry.liu@oracle.com>
parents:
diff changeset
    66
REQUIRED_PACKAGES += library/security/openssl/openssl-fips-140