xref: /titanic_51/usr/src/cmd/sgs/link_audit/Makefile.com (revision 63251bc7f1ca38259078c48e316fee4ed66d4e93)
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
26include		../../../../lib/Makefile.lib
27include		../../Makefile.com
28
29NO_ASM_WARN=	-erroff=E_ASM_DISABLES_OPTIMIZATION
30
31SGSPROTO=	../../proto/$(MACH)
32
33TRUSSLIB=	truss.so.1
34TRUSSSRC=	truss.c
35
36SYMBINDREP=	symbindrep.so.1
37SYMBINDREPSRC=	symbindrep.c
38
39PERFLIB=	perfcnt.so.1
40PERFSRC=	perfcnt.c hash.c
41
42WHOLIB=		who.so.1
43WHOSRC=		who.c
44
45BINDLIB=	bindings.so.1
46BINDSRC=	bindings.c
47
48ONSCRIPTS=	perfcnt symbindrep
49ONPROGS=	dumpbind
50ONLIBS=		$(SYMBINDREP) $(PERFLIB) $(BINDLIB)
51
52USRSCRIPTS=	sotruss whocalls
53CCSLIBS=	$(TRUSSLIB) $(WHOLIB)
54
55PICDIR=		pics
56OBJDIR=		objs
57
58TRUSSPICS=	$(TRUSSSRC:%.c=$(PICDIR)/%.o) $(PICDIR)/env.o
59PERFPICS=	$(PERFSRC:%.c=$(PICDIR)/%.o) $(PICDIR)/env.o
60WHOPICS=	$(WHOSRC:%.c=$(PICDIR)/%.o) $(PICDIR)/env.o
61SYMBINDREPPICS=	$(SYMBINDREPSRC:%.c=$(PICDIR)/%.o) $(PICDIR)/env.o
62BINDPICS=	$(BINDSRC:%.c=$(PICDIR)/%.o) $(PICDIR)/env.o
63
64$(WHOPICS):=	SEMANTICCHK=
65
66LDLIBS +=	$(CONVLIBDIR) $(CONV_LIB)
67
68$(TRUSSLIB):=	PICS = $(TRUSSPICS)
69$(PERFLIB):=	PICS = $(PERFPICS)
70$(WHOLIB):=	PICS = $(WHOPICS)
71$(SYMBINDREP):=	PICS = $(SYMBINDREPPICS)
72$(BINDLIB):=	PICS = $(BINDPICS)
73
74$(TRUSSLIB):=	LDLIBS += $(ZRECORD) -lmapmalloc -lc
75$(PERFLIB):=	LDLIBS += $(ZRECORD) -lmapmalloc -lc
76$(WHOLIB):=	LDLIBS += $(ELFLIBDIR) -lelf $(ZRECORD) -lmapmalloc $(DLLIB) -lc
77$(SYMBINDREP):=	LDLIBS += $(ZRECORD) -lmapmalloc -lc
78$(BINDLIB):=	LDLIBS += $(ZRECORD) -lmapmalloc -lc
79
80$(TRUSSLIB):=	SONAME = $(TRUSSLIB)
81$(PERFLIB):=	SONAME = $(PERFLIB)
82$(WHOLIB):=	SONAME = $(WHOLIB)
83$(SYMBINDREP):=	SONAME = $(SYMBINDREP)
84$(BINDLIB):=	SONAME = $(BINDLIB)
85
86$(TRUSSLIB):=	MAPFILES = mapfile-vers-truss
87$(PERFLIB):=	MAPFILES = mapfile-vers-perfcnt
88$(WHOLIB):=	MAPFILES = mapfile-vers-who
89$(SYMBINDREP):=	MAPFILES = mapfile-vers-symbindrep
90$(BINDLIB):=	MAPFILES = mapfile-vers-bindings
91
92$(ROOTCCSLIB) :=	OWNER =		root
93$(ROOTCCSLIB) :=	GROUP =		bin
94$(ROOTCCSLIB) :=	DIRMODE =	755
95
96CPPFLAGS +=	-D_REENTRANT
97LDFLAGS +=	$(USE_PROTO)
98DYNFLAGS +=	$(VERSREF)
99
100LINTFLAGS +=	-uaxs $(LDLIBS)
101LINTFLAGS64 +=	-uaxs $(LDLIBS)
102
103CLEANFILES +=	$(LINTOUT) $(OBJDIR)/* $(PICDIR)/*
104CLOBBERFILES +=	$(ONSCRIPTS) $(ONPROGS) $(ONLIBS) $(CCSLIBS) $(USRSCRIPTS)
105
106ROOTONLDLIB=		$(ROOT)/opt/SUNWonld/lib
107ROOTONLDLIBS=		$(ONLIBS:%=$(ROOTONLDLIB)/%)
108ROOTONLDLIB64=		$(ROOTONLDLIB)/$(MACH64)
109ROOTONLDLIBS64=		$(ONLIBS:%=$(ROOTONLDLIB64)/%)
110
111ROOTONLDBIN=		$(ROOT)/opt/SUNWonld/bin
112ROOTONLDBINPROG=	$(ONSCRIPTS:%=$(ROOTONLDBIN)/%) \
113			$(ONPROGS:%=$(ROOTONLDBIN)/%)
114
115ROOTCCSLIB=		$(ROOT)/usr/lib/link_audit
116ROOTCCSLIB64=		$(ROOT)/usr/lib/link_audit/$(MACH64)
117ROOTCCSLIBS=		$(CCSLIBS:%=$(ROOTCCSLIB)/%)
118ROOTCCSLIBS64=		$(CCSLIBS:%=$(ROOTCCSLIB64)/%)
119
120ROOTUSRBIN=		$(ROOT)/usr/bin
121ROOTUSRBINS=		$(USRSCRIPTS:%=$(ROOTUSRBIN)/%)
122
123FILEMODE=	0755
124
125.PARALLEL:	$(LIBS) $(PROGS) $(SCRIPTS) $(TRUSSPICS) $(PERFPICS) \
126		$(WHOPICS) $(SYMBINDREPPICS) $(BINDPICS)
127