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