xref: /titanic_52/usr/src/cmd/sgs/libdl/Makefile.com (revision bdfc6d18da790deeec2e0eb09c625902defe2498)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28
29LIBRARY=	libdl.a
30VERS=		.1
31
32include 	$(SRC)/lib/Makefile.lib
33include 	$(SRC)/cmd/sgs/Makefile.com
34
35MAPFILES=	../common/mapfile-vers mapfile-vers $(MAPFILE-FLTR)
36MAPOPTS=	$(MAPFILES:%=-M%)
37
38# Redefine shared object build rule to use $(LD) directly (this avoids .init
39# and .fini sections being added).  Also, since there are no OBJECTS, turn
40# off CTF.
41
42BUILD.SO=	$(LD) -o $@ -G $(DYNFLAGS)
43CTFMERGE_LIB=	:
44
45DYNFLAGS +=	$(ZNODUMP) $(VERSREF) $(CONVLIBDIR) -lconv
46
47LINTFLAGS +=	-u
48LINTFLAGS64 +=	-u
49SRCS=		../common/llib-ldl
50
51CLEANFILES +=
52CLOBBERFILES +=	$(DYNLIB) $(LINTLIB) $(LINTOUTS) $(LIBLINKS)
53CLOBBERFILES += $(MAPFILE)
54
55
56ROOTFS_DYNLIB64=	$(DYNLIB:%=$(ROOTFS_LIBDIR64)/%)
57ROOTFS_LINTLIB64=	$(LINTLIB:%=$(ROOTFS_LIBDIR64)/%)
58
59#
60# In the libc/libthread unified environment:
61# This library needs to be placed in /lib to allow
62# dlopen() functionality while in single-user mode.
63ROOTFS_DYNLIB=		$(DYNLIB:%=$(ROOTFS_LIBDIR)/%)
64ROOTFS_LINTLIB=		$(LINTLIB:%=$(ROOTFS_LIBDIR)/%)
65
66$(ROOTFS_DYNLIB) :=	FILEMODE= 755
67$(ROOTFS_DYNLIB64) :=	FILEMODE= 755
68
69#
70# In the libc/libthread un-unified environment:
71# A version of this library needs to be placed in /etc/lib to allow
72# dlopen() functionality while in single-user mode.
73ETCLIBDIR=	$(ROOT)/etc/lib
74ETCDYNLIB=	$(DYNLIB:%=$(ETCLIBDIR)/%)
75
76$(ETCDYNLIB) :=	FILEMODE= 755
77