xref: /titanic_50/usr/src/lib/Makefile.filter.com (revision 2a8d6eba033e4713ab12b61178f0513f1f075482)
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#   LIBS +=	   $(LINTLIB)				(2)
48#   DYNFLAGS +=	   -F filtee				(3)
49#   MAPFILEDIR =   .					(4)
50#
51# 1.  Use Makefile.rootfs when destination is /lib (rather than /usr/lib).
52# 2.  Add LINTLIB when a lint library is produced.
53# 3.  Customize DYNFLAGS to indicate filtee name.
54# 4.  Change MAPFILEDIR if mapfiles are not under ../common.
55#
56# The typical use of Makefile.filter.com and Makefile.filter.targ is through
57# inclusion from a standard filters machine specific Makefiles:
58#
59#   % cat $(MACH)/Makefile
60#   ...
61#   include	   $(SRC)/lib/Makefile.filter.com
62#   include	   ../Makefile.com
63#   include	   (SRC)/lib/Makefile.lib.64		(1)
64#
65#   DYNFLAGS +=	   -h libyyyyy.so.1			(2)
66#
67#   install	   all $(ROOT......
68#
69#   include	   $(SRC)/lib/Makefile.filter.targ
70#
71# 1.  Use Makefile.lib.64 for 64-bit builds.
72# 2.  Customize DYNFLAGS for $MACH if necessary.
73#
74
75include	   	$(SRC)/lib/Makefile.lib
76
77# Define common flags, that override or append to Makefile.lib rules.
78
79DYNFLAGS +=	$(ZNODUMP) $(ZNOLDYNSYM)
80LIBS =		$(DYNLIB)
81SRCDIR =	../common
82MAPFILES +=	$(MAPFILE.FLT)
83