Makefile revision 1258
e9458b1a7a19a63aa4c179f9ab20f4d50681c168Jens Elkner# CDDL HEADER START
57a2436f9d44e37042498a3b3dfacd301d91bb6dChristian Maeder# The contents of this file are subject to the terms of the
98890889ffb2e8f6f722b00e265a211f13b5a861Corneliu-Claudiu Prodescu# Common Development and Distribution License (the "License").
57a2436f9d44e37042498a3b3dfacd301d91bb6dChristian Maeder# You may not use this file except in compliance with the License.
57a2436f9d44e37042498a3b3dfacd301d91bb6dChristian Maeder# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
57a2436f9d44e37042498a3b3dfacd301d91bb6dChristian Maeder# or http://www.opensolaris.org/os/licensing.
57a2436f9d44e37042498a3b3dfacd301d91bb6dChristian Maeder# See the License for the specific language governing permissions
e6d40133bc9f858308654afb1262b8b483ec5922Till Mossakowski# and limitations under the License.
57a2436f9d44e37042498a3b3dfacd301d91bb6dChristian Maeder# When distributing Covered Code, include this CDDL HEADER in each
57a2436f9d44e37042498a3b3dfacd301d91bb6dChristian Maeder# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
57a2436f9d44e37042498a3b3dfacd301d91bb6dChristian Maeder# If applicable, add the following below this CDDL HEADER, with the
57a2436f9d44e37042498a3b3dfacd301d91bb6dChristian Maeder# fields enclosed by brackets "[]" replaced with your own identifying
57a2436f9d44e37042498a3b3dfacd301d91bb6dChristian Maeder# information: Portions Copyright [yyyy] [name of copyright owner]
57a2436f9d44e37042498a3b3dfacd301d91bb6dChristian Maeder# CDDL HEADER END
57a2436f9d44e37042498a3b3dfacd301d91bb6dChristian Maeder# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroederinclude ../../make-rules/shared-macros.mk
9029484754c7b2037321e7cbd077580866845265Christian MaederCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
57a2436f9d44e37042498a3b3dfacd301d91bb6dChristian Maeder sha256:1795c7d067a43174113fdf03447532f373e1c6c57c08d61d9e4e9be5e244b05e
57a2436f9d44e37042498a3b3dfacd301d91bb6dChristian MaederCOMPONENT_ARCHIVE_URL= http://downloads.sourceforge.net/project/libpng/zlib/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
9029484754c7b2037321e7cbd077580866845265Christian Maeder# We want to build hardware specific versions of the longest_match()
57a2436f9d44e37042498a3b3dfacd301d91bb6dChristian Maeder# function into our shared library that has been hand optimised to use
57a2436f9d44e37042498a3b3dfacd301d91bb6dChristian Maeder# some machine architecture specific instructions. Currently, we are doing
57a2436f9d44e37042498a3b3dfacd301d91bb6dChristian Maeder# it for the T4 architecture, but later other architectures may be added.
57a2436f9d44e37042498a3b3dfacd301d91bb6dChristian Maeder# This is done by taking advantage of the Solaris 11 linker-editor
57a2436f9d44e37042498a3b3dfacd301d91bb6dChristian Maeder# "Symbol Capabilities" feature. Refer to the section "Creating a Family
9029484754c7b2037321e7cbd077580866845265Christian Maeder# of Symbol Capabilities Functions", under "Identifying Capability
9029484754c7b2037321e7cbd077580866845265Christian Maeder# Requirements" in the "Linker and Libraries Guide"
57a2436f9d44e37042498a3b3dfacd301d91bb6dChristian Maeder# (http://docs.oracle.com/cd/E19963-01/html/819-0690/chapter2-13.html#giskh).
57a2436f9d44e37042498a3b3dfacd301d91bb6dChristian MaederCAP_OBJS_sparcv7 += ../../capabilities/sun4v/sparcv7/symcap.o
57a2436f9d44e37042498a3b3dfacd301d91bb6dChristian MaederCAP_OBJS_sparcv9 += ../../capabilities/sun4v/sparcv9/symcap.o
57a2436f9d44e37042498a3b3dfacd301d91bb6dChristian Maeder$(BUILD_DIR)/%/.built: CAP_OBJS=$(CAP_OBJS_$*)
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder# Zlib won't build without cloning. We need also to get rid of default
3d3889e0cefcdce9b3f43c53aaa201943ac2e895Jonathan von Schroeder# Makefile and get our own version of zconf.h to avoid interactions
57a2436f9d44e37042498a3b3dfacd301d91bb6dChristian Maeder# between 32 and 64 bit builds.
57a2436f9d44e37042498a3b3dfacd301d91bb6dChristian Maeder# Also, the x86 architecture does not require alignment for multi-byte
9029484754c7b2037321e7cbd077580866845265Christian Maeder# loads, so we can define UNALIGNED_OK for x86
9029484754c7b2037321e7cbd077580866845265Christian MaederCFLAGS_EXTRA = -DUNALIGNED_OK -DORIG_LONGEST_MATCH_GLOBAL
57a2436f9d44e37042498a3b3dfacd301d91bb6dChristian MaederCFLAGS_EXTRA = -DORIG_LONGEST_MATCH_GLOBAL -xinline=%auto,no%longest_match
COMPONENT_BUILD_ARGS = LDSHARED="$(CC) $(CFLAGS) -G -h libz.so.1 $(LD_OPTIONS_SO) -M ../../mapfile -L." PIC_OBJS=$(PIC_OBJS)
cd capabilities; \
COMPONENT_TEST_TARGETS = test
test: $(TEST_32_and_64)
clean::