xref: /titanic_41/usr/src/cmd/sgs/link_audit/Makefile.com (revision 40cb5e5daa7b80bb70fcf8dadfb20f9281566331)
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 2006 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27
28include		../../../../lib/Makefile.lib
29include		../../Makefile.com
30
31NO_ASM_WARN=	-erroff=E_ASM_DISABLES_OPTIMIZATION
32
33ZIGNORE=
34
35SGSPROTO=	../../proto/$(MACH)
36
37TRUSSLIB=	truss.so.1
38TRUSSSRC=	truss.c
39
40SYMBINDREP=	symbindrep.so.1
41SYMBINDREPSRC=	symbindrep.c
42
43PERFLIB=	perfcnt.so.1
44PERFSRC=	perfcnt.c hash.c
45
46WHOLIB=		who.so.1
47WHOSRC=		who.c
48
49BINDLIB=	bindings.so.1
50BINDSRC=	bindings.c
51
52ONSCRIPTS=	perfcnt symbindrep
53ONPROGS=	dumpbind
54ONLIBS=		$(SYMBINDREP) $(PERFLIB) $(BINDLIB)
55
56USRSCRIPTS=	sotruss whocalls
57CCSLIBS=	$(TRUSSLIB) $(WHOLIB)
58
59PICDIR=		pics
60OBJDIR=		objs
61
62TRUSSPICS=	$(TRUSSSRC:%.c=$(PICDIR)/%.o) $(PICDIR)/env.o
63PERFPICS=	$(PERFSRC:%.c=$(PICDIR)/%.o) $(PICDIR)/env.o
64WHOPICS=	$(WHOSRC:%.c=$(PICDIR)/%.o) $(PICDIR)/env.o
65SYMBINDREPPICS=	$(SYMBINDREPSRC:%.c=$(PICDIR)/%.o) $(PICDIR)/env.o
66BINDPICS=	$(BINDSRC:%.c=$(PICDIR)/%.o) $(PICDIR)/env.o
67
68$(WHOPICS):=	SEMANTICCHK=
69
70LDLIBS +=	$(CONVLIBDIR) $(CONV_LIB)
71
72# Building SUNWonld results in a call to the `package' target.  Requirements
73# needed to run this application on older releases are established:
74#   dlopen/dlclose requires libdl.so.1 prior to 5.10
75#
76DLLIB = $(VAR_DL_LIB)
77package	:=  DLLIB = $(VAR_PKG_DL_LIB)
78
79$(TRUSSLIB):=	PICS = $(TRUSSPICS)
80$(PERFLIB):=	PICS = $(PERFPICS)
81$(WHOLIB):=	PICS = $(WHOPICS)
82$(SYMBINDREP):=	PICS = $(SYMBINDREPPICS)
83$(BINDLIB):=	PICS = $(BINDPICS)
84
85$(TRUSSLIB):=	LDLIBS += -lmapmalloc -lc
86$(PERFLIB):=	LDLIBS += -lmapmalloc -lc
87$(WHOLIB):=	LDLIBS += $(ELFLIBDIR) -lelf -lmapmalloc $(DLLIB) -lc
88$(SYMBINDREP):=	LDLIBS += -lmapmalloc -lc
89$(BINDLIB):=	LDLIBS += -lmapmalloc -lc
90
91$(TRUSSLIB):=	SONAME = $(TRUSSLIB)
92$(PERFLIB):=	SONAME = $(PERFLIB)
93$(WHOLIB):=	SONAME = $(WHOLIB)
94$(SYMBINDREP):=	SONAME = $(SYMBINDREP)
95$(BINDLIB):=	SONAME = $(BINDLIB)
96
97$(TRUSSLIB):=	MAPFILES = mapfile-vers-truss
98$(PERFLIB):=	MAPFILES = mapfile-vers-perfcnt
99$(WHOLIB):=	MAPFILES = mapfile-vers-who
100$(SYMBINDREP):=	MAPFILES = mapfile-vers-symbindrep
101$(BINDLIB):=	MAPFILES = mapfile-vers-bindings
102
103$(ROOTCCSLIB) :=	OWNER =		root
104$(ROOTCCSLIB) :=	GROUP =		bin
105$(ROOTCCSLIB) :=	DIRMODE =	755
106
107CPPFLAGS +=	-D_REENTRANT
108LDFLAGS +=	$(USE_PROTO)
109DYNFLAGS +=	$(VERSREF)
110
111LINTFLAGS +=	-uaxs $(LDLIBS)
112LINTFLAGS64 +=	-uaxs $(LDLIBS)
113
114CLEANFILES +=	$(LINTOUT) $(OBJDIR)/* $(PICDIR)/*
115CLOBBERFILES +=	$(ONSCRIPTS) $(ONPROGS) $(ONLIBS) $(CCSLIBS) $(USRSCRIPTS)
116
117ROOTONLDLIB=		$(ROOT)/opt/SUNWonld/lib
118ROOTONLDLIBS=		$(ONLIBS:%=$(ROOTONLDLIB)/%)
119ROOTONLDLIB64=		$(ROOTONLDLIB)/$(MACH64)
120ROOTONLDLIBS64=		$(ONLIBS:%=$(ROOTONLDLIB64)/%)
121
122ROOTONLDBIN=		$(ROOT)/opt/SUNWonld/bin
123ROOTONLDBINPROG=	$(ONSCRIPTS:%=$(ROOTONLDBIN)/%) \
124			$(ONPROGS:%=$(ROOTONLDBIN)/%)
125
126ROOTCCSLIB=		$(ROOT)/usr/lib/link_audit
127ROOTCCSLIB64=		$(ROOT)/usr/lib/link_audit/$(MACH64)
128ROOTCCSLIBS=		$(CCSLIBS:%=$(ROOTCCSLIB)/%)
129ROOTCCSLIBS64=		$(CCSLIBS:%=$(ROOTCCSLIB64)/%)
130
131ROOTUSRBIN=		$(ROOT)/usr/bin
132ROOTUSRBINS=		$(USRSCRIPTS:%=$(ROOTUSRBIN)/%)
133
134FILEMODE=	0755
135
136.PARALLEL:	$(LIBS) $(PROGS) $(SCRIPTS) $(TRUSSPICS) $(PERFPICS) \
137		$(WHOPICS) $(SYMBINDREPPICS) $(BINDPICS)
138