xref: /titanic_51/usr/src/cmd/sgs/ldprof/Makefile.com (revision a859926565cb356b64ec9747a88da4ff003ad4f8)
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# ident	"%Z%%M%	%I%	%E% SMI"
23#
24# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
25# Use is subject to license terms.
26
27LIBRARY=	ldprof.a
28VERS=		.1
29COMOBJS=	profile.o
30BLTOBJ=		msg.o
31OBJECTS=	$(COMOBJS) $(BLTOBJ)
32
33include		../../../../lib/Makefile.lib
34include		../../Makefile.com
35
36ZIGNORE=
37
38ROOTLIBDIR=	$(ROOT)/usr/lib/link_audit
39
40SGSPROTO=	../../proto/$(MACH)
41
42MAPFILE=	mapfile-vers
43
44# Building SUNWonld results in a call to the `package' target.  Requirements
45# needed to run this application on older releases are established:
46#   dlopen/dlclose requires libdl.so.1 prior to 5.10
47#
48DLLIB =		$(VAR_DL_LIB)
49package	:=	DLLIB = $(VAR_PKG_DL_LIB)
50
51DYNFLAGS +=	-M$(MAPFILE) $(USE_PROTO)
52CPPFLAGS=	-I. -I../common -I../../include \
53		-I../../rtld/common \
54		-I../../include/$(MACH) \
55		-I$(SRCBASE)/lib/libc/inc \
56		-I$(SRCBASE)/uts/common/krtld \
57		-I$(SRC)/common/sgsrtcid \
58		-I$(SRCBASE)/uts/$(ARCH)/sys \
59		$(CPPFLAGS.master)
60CFLAGS +=	$(C_PICFLAGS)
61LDLIBS +=	-lmapmalloc -lc $(DLLIB)
62
63LINTFLAGS +=	-u -erroff=E_NAME_DECL_NOT_USED_DEF2
64LINTFLAGS64 +=	-u -erroff=E_NAME_DECL_NOT_USED_DEF2
65
66BLTDEFS=	msg.h
67BLTDATA=	msg.c
68BLTMESG=	$(SGSMSGDIR)/ldprof
69
70BLTFILES=	$(BLTDEFS) $(BLTDATA) $(BLTMESG)
71
72SGSMSGCOM=	../common/ldprof.msg
73SGSMSGTARG=	$(SGSMSGCOM)
74SGSMSGALL=	$(SGSMSGCOM)
75SGSMSGFLAGS +=	-h $(BLTDEFS) -d $(BLTDATA) -m $(BLTMESG) -n ldprof_msg
76
77SRCS=		$(COMOBJS:%.o=../common/%.c) $(BLTDATA)
78LINTSRCS=	$(SRCS) ../common/lintsup.c
79
80CLEANFILES +=	$(LINTOUTS) $(BLTFILES)
81CLOBBERFILES +=	$(DYNLIB) $(LINTLIB)
82
83ROOTDYNLIB=	$(DYNLIB:%=$(ROOTLIBDIR)/%)
84