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