11e49577aSRod Evans#
21e49577aSRod Evans# CDDL HEADER START
31e49577aSRod Evans#
41e49577aSRod Evans# The contents of this file are subject to the terms of the
51e49577aSRod Evans# Common Development and Distribution License (the "License").
61e49577aSRod Evans# You may not use this file except in compliance with the License.
71e49577aSRod Evans#
81e49577aSRod Evans# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
91e49577aSRod Evans# or http://www.opensolaris.org/os/licensing.
101e49577aSRod Evans# See the License for the specific language governing permissions
111e49577aSRod Evans# and limitations under the License.
121e49577aSRod Evans#
131e49577aSRod Evans# When distributing Covered Code, include this CDDL HEADER in each
141e49577aSRod Evans# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
151e49577aSRod Evans# If applicable, add the following below this CDDL HEADER, with the
161e49577aSRod Evans# fields enclosed by brackets "[]" replaced with your own identifying
171e49577aSRod Evans# information: Portions Copyright [yyyy] [name of copyright owner]
181e49577aSRod Evans#
191e49577aSRod Evans# CDDL HEADER END
201e49577aSRod Evans#
211e49577aSRod Evans
221e49577aSRod Evans#
231e49577aSRod Evans# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
241e49577aSRod Evans#
251e49577aSRod Evans
261e49577aSRod Evans#
271e49577aSRod Evans# libmd provides two families of optimized functions for SPARC platforms,
281e49577aSRod Evans# one for sun4u, and one for sun4v.  Previous implementations provided
291e49577aSRod Evans# these families as libmd_psr.so.1 libraries, triggered by tagging libmd.so.1
301e49577aSRod Evans# as an auxiliary filter.  These psr filtees were installed under
311e49577aSRod Evans# /usr/platform/sun4u/lib, and numerous symlinks were established to provide
321e49577aSRod Evans# the necessary $PLATFORM names, ie:
331e49577aSRod Evans#
341e49577aSRod Evans#  /usr/platform/SUNW,Ultra-2/lib/libmd_psr.so.1 -> ../../../sun4u
351e49577aSRod Evans#  /usr/platform/SUNW,Ultra-4/lib/libmd_psr.so.1 -> ../../../sun4u
361e49577aSRod Evans#  ....
371e49577aSRod Evans#
381e49577aSRod Evans# and:
391e49577aSRod Evans#
401e49577aSRod Evans#  /usr/platform/SUNW,Netra-CP3060/lib/libmd_psr.so.1 -> ../../sun4v
411e49577aSRod Evans#  /usr/platform/SUNW,Netra-CP3260/lib/libmd_psr.so.1 -> ../../sun4v/
421e49577aSRod Evans#  ....
431e49577aSRod Evans#
441e49577aSRod Evans# The objects that made up these filtees are now combined into one relocatable
451e49577aSRod Evans# object, pics/objcap.o, using ../common/mapfile-cap.  This mapfile identifies
461e49577aSRod Evans# the machine hardware name, together with establishing the global symbols that
471e49577aSRod Evans# should be exported to define each family.
481e49577aSRod Evans#
491e49577aSRod Evans# This object capabilities relocatable object is then translated into a symbol
501e49577aSRod Evans# capabilities relocatable object, pics/symcap.o.
511e49577aSRod Evans#
521e49577aSRod Evans# The sun4u and sun4v families of symbol capabilities object are eventually
531e49577aSRod Evans# included in the final build of libmd.so.1.
541e49577aSRod Evans
551e49577aSRod Evans$(SYMCAP):	$(OBJCAP)
561e49577aSRod Evans$(OBJCAP):	$(PICS)
571e49577aSRod Evans$(PICS):	pics
581e49577aSRod Evans
591e49577aSRod Evans# Combine all pic objects into one relocatable object.  Assign any capabilities
601e49577aSRod Evans# to this object, and define the interface.
611e49577aSRod Evans
621e49577aSRod Evanspics/objcap.o:	$(PICS) $(MAPFILE-CAP)
63*85f4cb87SRichard Lowe		$(LD) -r -o $@ $(MAPOPT-CAP) $(BREDUCE) $(PICS)
641e49577aSRod Evans
651e49577aSRod Evans# Convert the combined object capabilities object into a symbol capabilities
661e49577aSRod Evans# object.
671e49577aSRod Evans
681e49577aSRod Evanspics/symcap.o:	$(OBJCAP)
691e49577aSRod Evans		$(LD) -r -o $@ -z symbolcap $(OBJCAP)
701e49577aSRod Evans
711e49577aSRod Evansinclude		../../../Makefile.targ
72