Makefile revision 3670
8495845a800cf09321436aed996188c9a92cd647bnicholes# CDDL HEADER START
8495845a800cf09321436aed996188c9a92cd647bnicholes# The contents of this file are subject to the terms of the
8495845a800cf09321436aed996188c9a92cd647bnicholes# Common Development and Distribution License (the "License").
8495845a800cf09321436aed996188c9a92cd647bnicholes# You may not use this file except in compliance with the License.
8495845a800cf09321436aed996188c9a92cd647bnicholes# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5594e2aca1550d202df69bf273a876de2ccf01d4fuankg# See the License for the specific language governing permissions
5594e2aca1550d202df69bf273a876de2ccf01d4fuankg# and limitations under the License.
5594e2aca1550d202df69bf273a876de2ccf01d4fuankg# When distributing Covered Code, include this CDDL HEADER in each
5594e2aca1550d202df69bf273a876de2ccf01d4fuankg# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5594e2aca1550d202df69bf273a876de2ccf01d4fuankg# If applicable, add the following below this CDDL HEADER, with the
f43432d112920ab9af58aecc78d9fd5bacefc216fuankg# fields enclosed by brackets "[]" replaced with your own identifying
f43432d112920ab9af58aecc78d9fd5bacefc216fuankg# information: Portions Copyright [yyyy] [name of copyright owner]
f43432d112920ab9af58aecc78d9fd5bacefc216fuankg# CDDL HEADER END
f43432d112920ab9af58aecc78d9fd5bacefc216fuankg# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
f43432d112920ab9af58aecc78d9fd5bacefc216fuankg sha256:36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d
f43432d112920ab9af58aecc78d9fd5bacefc216fuankgCOMPONENT_ARCHIVE_URL= http://downloads.sourceforge.net/project/libpng/zlib/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
5594e2aca1550d202df69bf273a876de2ccf01d4fuankg# We want to build hardware specific versions of the longest_match()
f43432d112920ab9af58aecc78d9fd5bacefc216fuankg# function into our shared library that has been hand optimised to use
f43432d112920ab9af58aecc78d9fd5bacefc216fuankg# some machine architecture specific instructions. Currently, we are doing
5594e2aca1550d202df69bf273a876de2ccf01d4fuankg# it for the T4 architecture, but later other architectures may be added.
5594e2aca1550d202df69bf273a876de2ccf01d4fuankg# This is done by taking advantage of the Solaris 11 linker-editor
5594e2aca1550d202df69bf273a876de2ccf01d4fuankg# "Symbol Capabilities" feature. Refer to the section "Creating a Family
8495845a800cf09321436aed996188c9a92cd647bnicholes# of Symbol Capabilities Functions", under "Identifying Capability
8495845a800cf09321436aed996188c9a92cd647bnicholes# Requirements" in the "Linker and Libraries Guide"
8495845a800cf09321436aed996188c9a92cd647bnicholes# (http://docs.oracle.com/cd/E19963-01/html/819-0690/chapter2-13.html#giskh).
70953fb44a7140fe206c3a5f011e24209c8c5c6abnicholesCAP_OBJS_sparcv7 += ../../capabilities/sun4v/sparcv7/symcap.o
c5ef27ed1cf15c6b6345335c51416d2ea36198bfbnicholesCAP_OBJS_sparcv9 += ../../capabilities/sun4v/sparcv9/symcap.o
8495845a800cf09321436aed996188c9a92cd647bnicholes# Zlib won't build without cloning. We need also to get rid of default
8495845a800cf09321436aed996188c9a92cd647bnicholes# Makefile and get our own version of zconf.h to avoid interactions
8495845a800cf09321436aed996188c9a92cd647bnicholes# between 32 and 64 bit builds.
8495845a800cf09321436aed996188c9a92cd647bnicholes# Also, the x86 architecture does not require alignment for multi-byte
8495845a800cf09321436aed996188c9a92cd647bnicholes# loads, so we can define UNALIGNED_OK for x86
5594e2aca1550d202df69bf273a876de2ccf01d4fuankgCFLAGS_EXTRA = -DUNALIGNED_OK -DORIG_LONGEST_MATCH_GLOBAL
8495845a800cf09321436aed996188c9a92cd647bnicholesCFLAGS_EXTRA = -DORIG_LONGEST_MATCH_GLOBAL -xinline=%auto,no%longest_match
5594e2aca1550d202df69bf273a876de2ccf01d4fuankg# Avoid *.lo.bc from Parfait analyze (see also parfait.patch).
8495845a800cf09321436aed996188c9a92cd647bnicholes# We need to reset configure options here because zlib is confused with
8495845a800cf09321436aed996188c9a92cd647bnicholes# CC and CFLAGS definitions as configure parameters.
8495845a800cf09321436aed996188c9a92cd647bnicholesCONFIGURE_OPTIONS.64 += --libdir=/usr/lib/$(MACH64)
8495845a800cf09321436aed996188c9a92cd647bnicholesCONFIGURE_ENV += CFLAGS="$(CFLAGS) -xalias_level=basic -xdepend"
8495845a800cf09321436aed996188c9a92cd647bnicholes# This LDSHARED definitions is forced to get all required options plus
8495845a800cf09321436aed996188c9a92cd647bnicholes# mapfile for result linking. While the one used with configure is just
8495845a800cf09321436aed996188c9a92cd647bnicholes# to allow Zlib detect capability of creating shared libraries.
8495845a800cf09321436aed996188c9a92cd647bnicholesCOMPONENT_BUILD_ARGS = LDSHARED="$(CC) $(CFLAGS) -G -h libz.so.1 $(LD_OPTIONS_SO) -M ../../mapfile -L." PIC_OBJA=$(PIC_OBJA)
8495845a800cf09321436aed996188c9a92cd647bnicholes$(BUILD_DIR)/sparc%/.built: COMPONENT_PRE_BUILD_ACTION = ( \
8495845a800cf09321436aed996188c9a92cd647bnicholes $(ENV) SUBDIRS="sun4v" BUILD_ARCH=$* $(GMAKE) build )
8495845a800cf09321436aed996188c9a92cd647bnicholes $(RM) -r $(BUILD_DIR) $(PROTO_DIR) capabilities/*/*/*.o