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