1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21#
22# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# Makefile.filter.com and Makefile.filter.targ provide centralized Makefiles
26# for driving the creation of standard shared object filters.  This class of
27# filter contains absolutely no implementation (code), instead associating all
28# symbol definitions to an alternative shared object (filtee).
29#
30# Standard filters are commonly used to preserve previously documented system
31# interfaces when moving symbol definitions from one library to another.  They
32# are analogous to the way symbolic links are used in the system to preserve
33# well known file names.  For example, the Unified Process Model folded threads
34# processing into libc.so.1, and left standard filters /lib/lib[p]thread.so.1
35# in place.  These filters are built under usr/src/lib/lib[p]thread, and serve
36# as typical examples.
37#
38# A typical Makefile.com for building a standard filter library contains:
39#
40#   % cat Makefile.com
41#   ...
42#   LIBRARY =	   libxxxx.a
43#   VERS =	   .1
44#
45#   include	   $(SRC)/lib/Makefile.rootfs		(1)
46#
47#   DYNFLAGS +=	   -F filtee				(2)
48#   MAPFILEDIR =   .					(3)
49#
50# 1.  Use Makefile.rootfs when destination is /lib (rather than /usr/lib).
51# 2.  Customize DYNFLAGS to indicate filtee name.
52# 3.  Change MAPFILEDIR if mapfiles are not under ../common.
53#
54# The typical use of Makefile.filter.com and Makefile.filter.targ is through
55# inclusion from a standard filters machine specific Makefiles:
56#
57#   % cat $(MACH)/Makefile
58#   ...
59#   include	   $(SRC)/lib/Makefile.filter.com
60#   include	   ../Makefile.com
61#   include	   (SRC)/lib/Makefile.lib.64		(1)
62#
63#   DYNFLAGS +=	   -h libyyyyy.so.1			(2)
64#
65#   install	   all $(ROOT......
66#
67#   include	   $(SRC)/lib/Makefile.filter.targ
68#
69# 1.  Use Makefile.lib.64 for 64-bit builds.
70# 2.  Customize DYNFLAGS for $MACH if necessary.
71#
72
73include		$(SRC)/lib/Makefile.lib
74
75# Define common flags, that override or append to Makefile.lib rules.
76
77DYNFLAGS +=	$(ZNODUMP) $(ZNOLDYNSYM)
78LIBS =		$(DYNLIB)
79SRCDIR =	../common
80MAPFILES +=	$(MAPFILE.FLT)
81