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