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.
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.
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]
23 # Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
24 # Copyright 2015 RackTop Systems.
37 LIBS= truss.so.1 symbindrep.so.1 perfcnt.so.1 who.so.1 bindings.so.1
38 KSHSRC= sotruss.ksh symbindrep.ksh perfcnt.ksh whocalls.ksh
39 SCRIPTS= $(KSHSRC:%.ksh=%)
41 DIRS= obj32 obj64 lib32 lib64
43 sparc_LIBS32= $(LIBS:%=lib32/%)
44 sparc_LIBS64= $(LIBS:%=lib64/%)
45 i386_LIBS32= $(LIBS:%=lib32/%)
46 i386_LIBS64= $(LIBS:%=lib64/%)
48 LIBS64= $($(MACH)_LIBS64)
49 LIBS32= $($(MACH)_LIBS32)
51 ALLIBS= $(LIBS32) $(LIBS64)
53 $(LIBS32):= CFLAGS += $($(MACH)_XARCH) $(C_PICFLAGS)
54 $(LIBS32):= LDLIBS += -lmapmalloc -ldl -lc
55 $(LIBS64):= CFLAGS += $($(MACH)64_XARCH) $(C_PICFLAGS64)
56 $(LIBS64):= LDLIBS += -lmapmalloc -ldl -lc
58 CPPFLAGS += -Isrc -D__EXTENSIONS__
59 LDFLAGS = $(ZDEFS) $(ZTEXT) $(ZIGNORE)
64 all: $(DIRS) .WAIT $(ALLIBS) $(SCRIPTS) $(PROGS)
68 cat $< | sed -e s,/opt/SUNWonld/lib/,`pwd`/lib, | \
69 sed -e s,/usr/lib/link_audit/,`pwd`/lib, > $@
78 $(LINK.c) obj32/dumpbind.o -o $@ $(LDLIBS)
80 lib32/bindings.so.1: \
81 obj32/bindings.o obj32/env.o
82 $(LINK.c) -G obj32/bindings.o obj32/env.o -o $@ $(LDLIBS)
84 lib64/bindings.so.1: \
85 obj64/bindings.o obj64/env.o
86 $(LINK.c) -G obj64/bindings.o obj64/env.o -o $@ $(LDLIBS)
89 obj32/perfcnt.o obj32/hash.o obj32/env.o
90 $(LINK.c) -G obj32/perfcnt.o obj32/hash.o obj32/env.o -o $@ $(LDLIBS)
93 obj64/perfcnt.o obj64/hash.o obj64/env.o
94 $(LINK.c) -G obj64/perfcnt.o obj64/hash.o obj64/env.o -o $@ $(LDLIBS)
96 lib32/symbindrep.so.1: \
97 obj32/symbindrep.o obj32/env.o
98 $(LINK.c) -G obj32/symbindrep.o obj32/env.o -o $@ $(LDLIBS)
100 lib64/symbindrep.so.1: \
101 obj64/symbindrep.o obj64/env.o
102 $(LINK.c) -G obj64/symbindrep.o obj64/env.o -o $@ $(LDLIBS)
105 obj32/truss.o obj32/env.o
106 $(LINK.c) -G obj32/truss.o obj32/env.o -o $@ $(LDLIBS)
109 obj64/truss.o obj64/env.o
110 $(LINK.c) -G obj64/truss.o obj64/env.o -o $@ $(LDLIBS)
113 obj32/who.o obj32/env.o
114 $(LINK.c) -G obj32/who.o obj32/env.o -o $@ -lelf $(LDLIBS)
117 obj64/who.o obj64/env.o
118 $(LINK.c) -G obj64/who.o obj64/env.o -o $@ -lelf $(LDLIBS)
128 $(RM) -r $(DIRS) $(SCRIPTS) $(PROGS) core .make.state