Makefile revision 1273
962f339c5f0f61adde79936f610fb05ce0854d6echuck# CDDL HEADER START
962f339c5f0f61adde79936f610fb05ce0854d6echuck# The contents of this file are subject to the terms of the
962f339c5f0f61adde79936f610fb05ce0854d6echuck# Common Development and Distribution License (the "License").
157e6980a24a44e4719173b1c555133caecbc172stoddard# You may not use this file except in compliance with the License.
157e6980a24a44e4719173b1c555133caecbc172stoddard# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
faa6e5d8b210456ae4dad0398dfa40a19fd89d59coar# See the License for the specific language governing permissions
171f8c636ff1374e3a3dfff333211becda355b98trawick# and limitations under the License.
171f8c636ff1374e3a3dfff333211becda355b98trawick# When distributing Covered Code, include this CDDL HEADER in each
171f8c636ff1374e3a3dfff333211becda355b98trawick# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
171f8c636ff1374e3a3dfff333211becda355b98trawick# If applicable, add the following below this CDDL HEADER, with the
171f8c636ff1374e3a3dfff333211becda355b98trawick# fields enclosed by brackets "[]" replaced with your own identifying
faa6e5d8b210456ae4dad0398dfa40a19fd89d59coar# information: Portions Copyright [yyyy] [name of copyright owner]
faa6e5d8b210456ae4dad0398dfa40a19fd89d59coar# CDDL HEADER END
ed105ee460bbaf479f0aa0f59d3951da85066e27stoddard# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
c7fe488773cf6f50a1b2d9211c2f30a2ace8b67ccoar sha256:1795c7d067a43174113fdf03447532f373e1c6c57c08d61d9e4e9be5e244b05e
c7fe488773cf6f50a1b2d9211c2f30a2ace8b67ccoarCOMPONENT_ARCHIVE_URL= http://downloads.sourceforge.net/project/libpng/zlib/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
853a0c44563b056e40e9cffe911190f554e63ec3chuck# We want to build hardware specific versions of the longest_match()
853a0c44563b056e40e9cffe911190f554e63ec3chuck# function into our shared library that has been hand optimised to use
853a0c44563b056e40e9cffe911190f554e63ec3chuck# some machine architecture specific instructions. Currently, we are doing
853a0c44563b056e40e9cffe911190f554e63ec3chuck# it for the T4 architecture, but later other architectures may be added.
330c042543440d0987244c94c65d14eeb7af0868rbb# This is done by taking advantage of the Solaris 11 linker-editor
330c042543440d0987244c94c65d14eeb7af0868rbb# "Symbol Capabilities" feature. Refer to the section "Creating a Family
f1fa5e69040a3a72054d185f6087a7d1592b83e8rbb# of Symbol Capabilities Functions", under "Identifying Capability
f1fa5e69040a3a72054d185f6087a7d1592b83e8rbb# Requirements" in the "Linker and Libraries Guide"
f1fa5e69040a3a72054d185f6087a7d1592b83e8rbb# (http://docs.oracle.com/cd/E19963-01/html/819-0690/chapter2-13.html#giskh).
f1fa5e69040a3a72054d185f6087a7d1592b83e8rbbCAP_OBJS_sparcv7 += ../../capabilities/sun4v/sparcv7/symcap.o
30e3e9b782c701f885583b7d13d8e46c37d7e1ddtrawickCAP_OBJS_sparcv9 += ../../capabilities/sun4v/sparcv9/symcap.o
30e3e9b782c701f885583b7d13d8e46c37d7e1ddtrawick# Zlib won't build without cloning. We need also to get rid of default
30e3e9b782c701f885583b7d13d8e46c37d7e1ddtrawick# Makefile and get our own version of zconf.h to avoid interactions
27faa3af8a50c1dc2dc6cb3049722378f85e5517rbb# between 32 and 64 bit builds.
27faa3af8a50c1dc2dc6cb3049722378f85e5517rbb# Also, the x86 architecture does not require alignment for multi-byte
27faa3af8a50c1dc2dc6cb3049722378f85e5517rbb# loads, so we can define UNALIGNED_OK for x86
141b1a93f508248cbc0e9a124cc38041eb3e2562rbbCFLAGS_EXTRA = -DUNALIGNED_OK -DORIG_LONGEST_MATCH_GLOBAL
865980dc9aeb61741e586502440f0c0fea4835c6trawickCFLAGS_EXTRA = -DORIG_LONGEST_MATCH_GLOBAL -xinline=%auto,no%longest_match
b42a7e46e4f80282bd27e96d43c9510b14ccb9aarbb# We need to reset configure options here because zlib is confused with
b42a7e46e4f80282bd27e96d43c9510b14ccb9aarbb# CC and CFLAGS definitions as configure parameters.
6501b757f710f75d47c950300d8110aca67dc0b0rbbCONFIGURE_ENV += CFLAGS="$(CFLAGS) -xalias_level=basic -xdepend"
dfd4950edac888e671b96f62ff5382b7cb350d48rbb# This LDSHARED definitions is forced to get all required options plus
dfd4950edac888e671b96f62ff5382b7cb350d48rbb# mapfile for result linking. While the one used with configure is just
a6d4b3f8d54aaf14d8ee5dda3a09bf8b6370dfa4wrowe# to allow Zlib detect capability of creating shared libraries.
a6d4b3f8d54aaf14d8ee5dda3a09bf8b6370dfa4wroweCOMPONENT_BUILD_ARGS = LDSHARED="$(CC) $(CFLAGS) -G -h libz.so.1 $(LD_OPTIONS_SO) -M ../../mapfile -L." PIC_OBJS=$(PIC_OBJS)