xref: /titanic_50/usr/src/cmd/sgs/link_audit/Makefile.com (revision a307732568c3d861c38b0342ae32434226d10e94)
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#
23# Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
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 = ../common/mapfile-vers-truss
87$(PERFLIB):=	MAPFILES = ../common/mapfile-vers-perfcnt
88$(WHOLIB):=	MAPFILES = ../common/mapfile-vers-who
89$(SYMBINDREP):=	MAPFILES = ../common/mapfile-vers-symbindrep
90$(BINDLIB):=	MAPFILES = ../common/mapfile-vers-bindings
91
92$(ROOTCCSLIB) :=	DIRMODE =	755
93
94CPPFLAGS +=	-D_REENTRANT
95LDFLAGS +=	$(CC_USE_PROTO)
96DYNFLAGS +=	$(VERSREF)
97
98LINTFLAGS +=	-uaxs $(LDLIBS)
99LINTFLAGS64 +=	-uaxs $(LDLIBS)
100
101CLEANFILES +=	$(LINTOUT) $(OBJDIR)/* $(PICDIR)/*
102CLOBBERFILES +=	$(ONSCRIPTS) $(ONPROGS) $(ONLIBS) $(CCSLIBS) $(USRSCRIPTS)
103
104ROOTONLDLIB=		$(ROOT)/opt/SUNWonld/lib
105ROOTONLDLIBS=		$(ONLIBS:%=$(ROOTONLDLIB)/%)
106ROOTONLDLIB64=		$(ROOTONLDLIB)/$(MACH64)
107ROOTONLDLIBS64=		$(ONLIBS:%=$(ROOTONLDLIB64)/%)
108
109ROOTONLDBIN=		$(ROOT)/opt/SUNWonld/bin
110ROOTONLDBINPROG=	$(ONSCRIPTS:%=$(ROOTONLDBIN)/%) \
111			$(ONPROGS:%=$(ROOTONLDBIN)/%)
112
113ROOTCCSLIB=		$(ROOT)/usr/lib/link_audit
114ROOTCCSLIB64=		$(ROOT)/usr/lib/link_audit/$(MACH64)
115ROOTCCSLIBS=		$(CCSLIBS:%=$(ROOTCCSLIB)/%)
116ROOTCCSLIBS64=		$(CCSLIBS:%=$(ROOTCCSLIB64)/%)
117
118ROOTUSRBIN=		$(ROOT)/usr/bin
119ROOTUSRBINS=		$(USRSCRIPTS:%=$(ROOTUSRBIN)/%)
120
121FILEMODE=	0755
122
123.PARALLEL:	$(LIBS) $(PROGS) $(SCRIPTS) $(TRUSSPICS) $(PERFPICS) \
124		$(WHOPICS) $(SYMBINDREPPICS) $(BINDPICS)
125