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 2008 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
28 # Copyright (c) 2012 by Delphix. All rights reserved.
29 # Copyright (c) 2013, Joyent, Inc. All rights reserved.
33 # WARNING: Do not include Makefile.ctf here. That will cause tests to
37 include $(SRC
)/Makefile.master
38 include ..
/Makefile.com
40 SNOOPDIR
= $(SRC
)/cmd
/cmd-inet
/usr.sbin
/snoop
41 SNOOPOBJS
= nfs4_xdr.o
42 SNOOPSRCS
= ${SNOOPOBJS
:%.o
=%.c
}
43 CLOBBERFILES
+= nfs
/$(SNOOPOBJS
)
45 RPCSVCDIR
= $(SRC
)/head
/rpcsvc
46 RPCSVCOBJS
= nfs_prot.o
47 RPCSVCSRCS
= ${RPCSVCOBJS
:%o
=%c
}
48 CLOBBERFILES
+= nfs
/$(RPCSVCOBJS
) $(RPCSVCDIR
)/$(RPCSVCSRCS
)
49 CLOBBERFILES
+= usdt
/forker.h usdt
/lazyprobe.h
51 fasttrap
/tst.fasttrap.exe
:= LDLIBS
+= -ldtrace
52 fasttrap
/tst.stack.exe
:= LDLIBS
+= -ldtrace
54 sysevent
/tst.post.exe
:= LDLIBS
+= -lsysevent
55 sysevent
/tst.post_chan.exe
:= LDLIBS
+= -lsysevent
57 ustack
/tst.bigstack.exe
:= COPTFLAG
+= -xO1
59 GCC
= $(ONBLD_TOOLS
)/bin
/$(MACH
)/cw
-_gcc
61 nfs
/%.o
: $(SNOOPDIR
)/%.c
62 $(COMPILE.c
) -o
$@
$< -I
$(SNOOPDIR
)
64 nfs
/tst.call.exe
: nfs
/tst.call.o nfs
/$(SNOOPOBJS
)
65 $(LINK.c
) -o
$@ nfs
/tst.call.o nfs
/$(SNOOPOBJS
) $(LDLIBS
) -lnsl
66 $(POST_PROCESS
) ; $(STRIP_STABS
)
67 $(RPCSVCDIR
)/%.c
: $(RPCSVCDIR
)/%.x
69 nfs
/$(RPCSVCOBJS
): $(RPCSVCDIR
)/$(RPCSVCSRCS
)
70 $(COMPILE.c
) -o
$@
$(RPCSVCDIR
)/$(RPCSVCSRCS
)
72 nfs
/tst.call3.exe
: nfs
/tst.call3.o nfs
/$(RPCSVCOBJS
)
73 $(LINK.c
) -o
$@ nfs
/tst.call3.o nfs
/$(RPCSVCOBJS
) \
74 $(LDLIBS
) -lnsl
-lrpcsvc
75 $(POST_PROCESS
) ; $(STRIP_STABS
)
77 pid
/tst.gcc.exe
: pid
/tst.gcc.c
78 $(GCC
) -o pid
/tst.gcc.exe pid
/tst.gcc.c
$(LDFLAGS
)
79 $(POST_PROCESS
) ; $(STRIP_STABS
)
81 json
/tst.usdt.o
: json
/usdt.h
83 json
/usdt.h
: json
/usdt.d
84 $(DTRACE
) -h
-s json
/usdt.d
-o json
/usdt.h
86 CLOBBERFILES
+= json
/usdt.h
88 json
/usdt.o
: json
/usdt.d json
/tst.usdt.o
89 $(COMPILE.d
) -o json
/usdt.o
-s json
/usdt.d json
/tst.usdt.o
91 json
/tst.usdt.exe
: json
/tst.usdt.o json
/usdt.o
92 $(LINK.c
) -o json
/tst.usdt.exe json
/tst.usdt.o json
/usdt.o
$(LDLIBS
)
93 $(POST_PROCESS
) ; $(STRIP_STABS
)
96 # Tests that use the next three programs rely on the binaries having
99 uctf
/tst.aouttype.exe
: uctf
/tst.aouttype.c
100 $(COMPILE.c
) $(CTF_FLAGS
) -o uctf
/tst.aouttype.o uctf
/tst.aouttype.c
101 $(CTFCONVERT
) -i
-L VERSION uctf
/tst.aouttype.o
102 $(LINK.c
) -o uctf
/tst.aouttype.exe uctf
/tst.aouttype.o
$(LDLIBS
)
103 $(CTFMERGE
) -L VERSION
-o
$@ uctf
/tst.aouttype.o
104 $(POST_PROCESS
) ; $(STRIP_STABS
)
106 uctf
/tst.chasestrings.exe
: uctf
/tst.chasestrings.c
107 $(COMPILE.c
) $(CTF_FLAGS
) -o uctf
/tst.chasestrings.o uctf
/tst.chasestrings.c
108 $(CTFCONVERT
) -i
-L VERSION uctf
/tst.chasestrings.o
109 $(LINK.c
) -o uctf
/tst.chasestrings.exe uctf
/tst.chasestrings.o
$(LDLIBS
)
110 $(CTFMERGE
) -L VERSION
-o
$@ uctf
/tst.chasestrings.o
111 $(POST_PROCESS
) ; $(STRIP_STABS
)
113 uctf
/tst.printtype.exe
: uctf
/tst.printtype.c
114 $(COMPILE.c
) $(CTF_FLAGS
) -o uctf
/tst.printtype.o uctf
/tst.printtype.c
115 $(CTFCONVERT
) -i
-L VERSION uctf
/tst.printtype.o
116 $(LINK.c
) -o uctf
/tst.printtype.exe uctf
/tst.printtype.o
$(LDLIBS
)
117 $(CTFMERGE
) -L VERSION
-o
$@ uctf
/tst.printtype.o
118 $(POST_PROCESS
) ; $(STRIP_STABS
)
121 # This program should never have any ctf data in it.
123 uctf
/tst.libtype.exe
:
124 $(LINK.c
) -o uctf
/tst.libtype.exe uctf
/tst.libtype.c
$(LDLIBS
)
125 $(POST_PROCESS
) ; $(STRIP_STABS
)
127 usdt
/tst.args.exe
: usdt
/tst.args.o usdt
/args.o
128 $(LINK.c
) -o usdt
/tst.args.exe usdt
/tst.args.o usdt
/args.o
$(LDLIBS
)
129 $(POST_PROCESS
) ; $(STRIP_STABS
)
131 usdt
/args.o
: usdt
/args.d usdt
/tst.args.o
132 $(COMPILE.d
) -o usdt
/args.o
-s usdt
/args.d usdt
/tst.args.o
134 usdt
/tst.argmap.exe
: usdt
/tst.argmap.o usdt
/argmap.o
135 $(LINK.c
) -o usdt
/tst.argmap.exe \
136 usdt
/tst.argmap.o usdt
/argmap.o
$(LDLIBS
)
137 $(POST_PROCESS
) ; $(STRIP_STABS
)
139 usdt
/argmap.o
: usdt
/argmap.d usdt
/tst.argmap.o
140 $(COMPILE.d
) -o usdt
/argmap.o
-s usdt
/argmap.d usdt
/tst.argmap.o
142 usdt
/tst.forker.exe
: usdt
/tst.forker.o usdt
/forker.o
143 $(LINK.c
) -o usdt
/tst.forker.exe \
144 usdt
/tst.forker.o usdt
/forker.o
$(LDLIBS
)
145 $(POST_PROCESS
) ; $(STRIP_STABS
)
147 usdt
/forker.o
: usdt
/forker.d usdt
/tst.forker.o
148 $(COMPILE.d
) -o usdt
/forker.o
-s usdt
/forker.d usdt
/tst.forker.o
150 usdt
/tst.forker.o
: usdt
/forker.h
152 usdt
/forker.h
: usdt
/forker.d
153 $(DTRACE
) -h
-s usdt
/forker.d
-o usdt
/forker.h
155 usdt
/tst.lazyprobe.exe
: usdt
/tst.lazyprobe.o usdt
/lazyprobe.o
156 $(LINK.c
) -o usdt
/tst.lazyprobe.exe \
157 usdt
/tst.lazyprobe.o usdt
/lazyprobe.o
$(LDLIBS
)
158 $(POST_PROCESS
) ; $(STRIP_STABS
)
160 usdt
/lazyprobe.o
: usdt
/lazyprobe.d usdt
/tst.lazyprobe.o
161 $(COMPILE.d
) -xlazyload
-o usdt
/lazyprobe.o \
162 -s usdt
/lazyprobe.d usdt
/tst.lazyprobe.o
164 usdt
/tst.lazyprobe.o
: usdt
/lazyprobe.h
166 usdt
/lazyprobe.h
: usdt
/lazyprobe.d
167 $(DTRACE
) -h
-s usdt
/lazyprobe.d
-o usdt
/lazyprobe.h
170 include ..
/..
/Makefile.subdirs