components/yasm/Makefile
branchs11u3-sru
changeset 7034 55c87002c655
equal deleted inserted replaced
7033:a49f9f0272f2 7034:55c87002c655
       
     1 #
       
     2 # CDDL HEADER START
       
     3 #
       
     4 # The contents of this file are subject to the terms of the
       
     5 # Common Development and Distribution License (the "License").
       
     6 # You may not use this file except in compliance with the License.
       
     7 #
       
     8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
       
     9 # or http://www.opensolaris.org/os/licensing.
       
    10 # See the License for the specific language governing permissions
       
    11 # and limitations under the License.
       
    12 #
       
    13 # When distributing Covered Code, include this CDDL HEADER in each
       
    14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
       
    15 # If applicable, add the following below this CDDL HEADER, with the
       
    16 # fields enclosed by brackets "[]" replaced with your own identifying
       
    17 # information: Portions Copyright [yyyy] [name of copyright owner]
       
    18 #
       
    19 # CDDL HEADER END
       
    20 #
       
    21 
       
    22 #
       
    23 # Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
       
    24 #
       
    25 include ../../make-rules/shared-macros.mk
       
    26 
       
    27 COMPONENT_NAME=		yasm
       
    28 COMPONENT_VERSION=	1.3.0
       
    29 COMPONENT_PROJECT_URL=	http://yasm.tortall.net/
       
    30 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
       
    31 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
       
    32 COMPONENT_ARCHIVE_HASH=	\
       
    33     sha256:3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f
       
    34 COMPONENT_ARCHIVE_URL=	http://www.tortall.net/projects/$(COMPONENT_NAME)/releases/$(COMPONENT_ARCHIVE)
       
    35 COMPONENT_BUGDB=	utility/yasm
       
    36 
       
    37 TPNO=			23620
       
    38 
       
    39 # We're i386-only
       
    40 ifeq ($(MACH), sparc)
       
    41 PUBLISH_STAMP=
       
    42 endif
       
    43 
       
    44 # Enable ASLR for this component
       
    45 ASLR_MODE = $(ASLR_ENABLE)
       
    46 
       
    47 PYTHON_VERSIONS= 2.7
       
    48 
       
    49 include $(WS_MAKE_RULES)/prep.mk
       
    50 include $(WS_MAKE_RULES)/configure.mk
       
    51 include $(WS_MAKE_RULES)/ips.mk
       
    52 
       
    53 # Adjust all the source files in all the Makefile.inc files to generate
       
    54 # shared libraries rather than a library archive.
       
    55 # Note that the version number (in the shared-libraries.patch file) should be
       
    56 # bumped anytime upstream makes an incompatible change (that we're aware of).
       
    57 COMPONENT_PRE_CONFIGURE_ACTION = \
       
    58 	$(CLONEY) $(SOURCE_DIR) $(@D) ; \
       
    59 	mlist=`/usr/bin/find $(SOURCE_DIR) -name 'Makefile.inc'` ; \
       
    60 	for f in $$mlist ; do \
       
    61 	    $(GSED) -i -e 's|libyasm_a_SOURCES|libyasm_la_SOURCES|g' \
       
    62 			-e 's|LDADD = libyasm.a|LDADD = libyasm.la|g' \
       
    63 			$$f ; \
       
    64 	done ; \
       
    65 	(cd $(@D) ; \
       
    66 	libtoolize --automake --copy ; \
       
    67 	aclocal -I m4 ; \
       
    68 	autoheader ; \
       
    69 	automake --add-missing --copy ; \
       
    70 	autoconf)
       
    71 
       
    72 CONFIGURE_ENV += CFLAGS="$(CFLAGS)"
       
    73 CONFIGURE_ENV += CXXFLAGS="$(CXXFLAGS)"
       
    74 CONFIGURE_ENV += LDFLAGS="$(LDFLAGS)"
       
    75 
       
    76 CONFIGURE_ENV += am_cv_python_pythondir=$(PYTHON_VENDOR_PACKAGES)
       
    77 CONFIGURE_ENV += am_cv_python_pyexecdir=$(PYTHON_VENDOR_PACKAGES)
       
    78 
       
    79 CONFIGURE_OPTIONS += --enable-python
       
    80 CONFIGURE_OPTIONS += --disable-python-bindings
       
    81 
       
    82 # Needed for "gmake test" to work successfully.
       
    83 # If SHELLOPTS is exported (as it is by the userland makefiles),
       
    84 # then all shell options get exported to child invocations of bash,
       
    85 # which results in test failures due to nounset and xtrace being
       
    86 # set unexpectedly, and errors such as "$1: unbound variable" and
       
    87 # diffs failing due to script tracing in output files.
       
    88 unexport SHELLOPTS
       
    89 
       
    90 sparc:
       
    91 	@echo "Not available."
       
    92 
       
    93 configure_sparc:	sparc
       
    94 build_sparc:		sparc
       
    95 install_sparc:		sparc
       
    96 test_sparc:		sparc
       
    97 
       
    98 configure_i386:	$(CONFIGURE_32_and_64)
       
    99 build_i386:	$(BUILD_32_and_64)
       
   100 install_i386:	$(INSTALL_32_and_64)
       
   101 test_i386:	$(TEST_32_and_64)
       
   102 
       
   103 # common targets. we're i386-only so we have to
       
   104 # be slightly tricky.
       
   105 
       
   106 configure:	configure_$(MACH)
       
   107 
       
   108 build:		build_$(MACH)
       
   109 
       
   110 install:	install_$(MACH)
       
   111 
       
   112 test:		test_$(MACH)
       
   113 
       
   114 # Required for man pages.
       
   115 REQUIRED_PACKAGES += developer/documentation-tool/xmlto
       
   116 REQUIRED_PACKAGES += system/library