1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans#
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# CDDL HEADER START
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans#
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# The contents of this file are subject to the terms of the
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# Common Development and Distribution License (the "License").
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# You may not use this file except in compliance with the License.
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans#
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# or http://www.opensolaris.org/os/licensing.
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# See the License for the specific language governing permissions
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# and limitations under the License.
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans#
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# When distributing Covered Code, include this CDDL HEADER in each
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# If applicable, add the following below this CDDL HEADER, with the
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# fields enclosed by brackets "[]" replaced with your own identifying
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# information: Portions Copyright [yyyy] [name of copyright owner]
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans#
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# CDDL HEADER END
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans#
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans#
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans#
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans#
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# libmd provides two families of optimized functions for SPARC platforms,
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# one for sun4u, and one for sun4v. Previous implementations provided
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# these families as libmd_psr.so.1 libraries, triggered by tagging libmd.so.1
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# as an auxiliary filter. These psr filtees were installed under
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# /usr/platform/sun4u/lib, and numerous symlinks were established to provide
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# the necessary $PLATFORM names, ie:
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans#
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# /usr/platform/SUNW,Ultra-2/lib/libmd_psr.so.1 -> ../../../sun4u
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# /usr/platform/SUNW,Ultra-4/lib/libmd_psr.so.1 -> ../../../sun4u
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# ....
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans#
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# and:
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans#
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# /usr/platform/SUNW,Netra-CP3060/lib/libmd_psr.so.1 -> ../../sun4v
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# /usr/platform/SUNW,Netra-CP3260/lib/libmd_psr.so.1 -> ../../sun4v/
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# ....
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans#
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# The objects that made up these filtees are now combined into one relocatable
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# object, pics/objcap.o, using ../common/mapfile-cap. This mapfile identifies
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# the machine hardware name, together with establishing the global symbols that
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# should be exported to define each family.
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans#
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# This object capabilities relocatable object is then translated into a symbol
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# capabilities relocatable object, pics/symcap.o.
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans#
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# The sun4u and sun4v families of symbol capabilities object are eventually
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# included in the final build of libmd.so.1.
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans$(SYMCAP): $(OBJCAP)
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans$(OBJCAP): $(PICS)
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans$(PICS): pics
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# Combine all pic objects into one relocatable object. Assign any capabilities
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# to this object, and define the interface.
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evanspics/objcap.o: $(PICS) $(MAPFILE-CAP)
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans $(LD) -r -o $@ $(MAPOPT-CAP) -Breduce $(PICS)
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# Convert the combined object capabilities object into a symbol capabilities
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans# object.
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evanspics/symcap.o: $(OBJCAP)
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans $(LD) -r -o $@ -z symbolcap $(OBJCAP)
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evans
1e49577a7fcde812700ded04431b49d67cc57d6dRod Evansinclude ../../../Makefile.targ