19512fe85Sahl# 29512fe85Sahl# CDDL HEADER START 39512fe85Sahl# 49512fe85Sahl# The contents of this file are subject to the terms of the 59512fe85Sahl# Common Development and Distribution License (the "License"). 69512fe85Sahl# You may not use this file except in compliance with the License. 79512fe85Sahl# 89512fe85Sahl# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 99512fe85Sahl# or http://www.opensolaris.org/os/licensing. 109512fe85Sahl# See the License for the specific language governing permissions 119512fe85Sahl# and limitations under the License. 129512fe85Sahl# 139512fe85Sahl# When distributing Covered Code, include this CDDL HEADER in each 149512fe85Sahl# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 159512fe85Sahl# If applicable, add the following below this CDDL HEADER, with the 169512fe85Sahl# fields enclosed by brackets "[]" replaced with your own identifying 179512fe85Sahl# information: Portions Copyright [yyyy] [name of copyright owner] 189512fe85Sahl# 199512fe85Sahl# CDDL HEADER END 209512fe85Sahl# 219512fe85Sahl 229512fe85Sahl# 23e1adf50cSahl# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 249512fe85Sahl# Use is subject to license terms. 259512fe85Sahl# 26edb34883SAdam H. Leventhal 27edb34883SAdam H. Leventhal# 28edb34883SAdam H. Leventhal# Copyright (c) 2012 by Delphix. All rights reserved. 296ab39862SRobert Mustacchi# Copyright (c) 2013, Joyent, Inc. All rights reserved. 306ab39862SRobert Mustacchi# 316ab39862SRobert Mustacchi 326ab39862SRobert Mustacchi# 336ab39862SRobert Mustacchi# WARNING: Do not include Makefile.ctf here. That will cause tests to 346ab39862SRobert Mustacchi# break. 3573427c57Sahl# 369512fe85Sahl 3723b5c241Stomeeinclude $(SRC)/Makefile.master 389512fe85Sahlinclude ../Makefile.com 399512fe85Sahl 40f3b585ceSsamfSNOOPDIR = $(SRC)/cmd/cmd-inet/usr.sbin/snoop 41f3b585ceSsamfSNOOPOBJS = nfs4_xdr.o 42f3b585ceSsamfSNOOPSRCS = ${SNOOPOBJS:%.o=%.c} 43f3b585ceSsamfCLOBBERFILES += nfs/$(SNOOPOBJS) 44f3b585ceSsamf 45e1adf50cSahlRPCSVCDIR = $(SRC)/head/rpcsvc 46e1adf50cSahlRPCSVCOBJS = nfs_prot.o 47e1adf50cSahlRPCSVCSRCS = ${RPCSVCOBJS:%o=%c} 48e1adf50cSahlCLOBBERFILES += nfs/$(RPCSVCOBJS) $(RPCSVCDIR)/$(RPCSVCSRCS) 49b6805bf7SGordon RossCLOBBERFILES += usdt/forker.h usdt/lazyprobe.h 50e1adf50cSahl 5173427c57Sahlfasttrap/tst.fasttrap.exe := LDLIBS += -ldtrace 5273427c57Sahlfasttrap/tst.stack.exe := LDLIBS += -ldtrace 539512fe85Sahl 5473427c57Sahlsysevent/tst.post.exe := LDLIBS += -lsysevent 5573427c57Sahlsysevent/tst.post_chan.exe := LDLIBS += -lsysevent 56e04145d0Seschrock 57b8fac8e1Sjhaslamustack/tst.bigstack.exe := COPTFLAG += -xO1 58b8fac8e1Sjhaslam 5973427c57SahlGCC = $(ONBLD_TOOLS)/bin/$(MACH)/cw -_gcc 609512fe85Sahl 61f3b585ceSsamfnfs/%.o: $(SNOOPDIR)/%.c 62f3b585ceSsamf $(COMPILE.c) -o $@ $< -I$(SNOOPDIR) 63f3b585ceSsamf $(POST_PROCESS_O) 64f3b585ceSsamfnfs/tst.call.exe: nfs/tst.call.o nfs/$(SNOOPOBJS) 65f3b585ceSsamf $(LINK.c) -o $@ nfs/tst.call.o nfs/$(SNOOPOBJS) $(LDLIBS) -lnsl 66f3b585ceSsamf $(POST_PROCESS) ; $(STRIP_STABS) 67e1adf50cSahl$(RPCSVCDIR)/%.c: $(RPCSVCDIR)/%.x 68e1adf50cSahl $(RPCGEN) -Cc $< > $@ 69e1adf50cSahlnfs/$(RPCSVCOBJS): $(RPCSVCDIR)/$(RPCSVCSRCS) 70e1adf50cSahl $(COMPILE.c) -o $@ $(RPCSVCDIR)/$(RPCSVCSRCS) 71e1adf50cSahl $(POST_PROCESS_O) 72e1adf50cSahlnfs/tst.call3.exe: nfs/tst.call3.o nfs/$(RPCSVCOBJS) 73e1adf50cSahl $(LINK.c) -o $@ nfs/tst.call3.o nfs/$(RPCSVCOBJS) \ 74e1adf50cSahl $(LDLIBS) -lnsl -lrpcsvc 75e1adf50cSahl $(POST_PROCESS) ; $(STRIP_STABS) 76f3b585ceSsamf 779512fe85Sahlpid/tst.gcc.exe: pid/tst.gcc.c 7873427c57Sahl $(GCC) -o pid/tst.gcc.exe pid/tst.gcc.c $(LDFLAGS) 7973427c57Sahl $(POST_PROCESS) ; $(STRIP_STABS) 809512fe85Sahl 81c8fb8b3cSJoshua M. Clulowjson/tst.usdt.o: json/usdt.h 82c8fb8b3cSJoshua M. Clulow 83c8fb8b3cSJoshua M. Clulowjson/usdt.h: json/usdt.d 84c8fb8b3cSJoshua M. Clulow $(DTRACE) -h -s json/usdt.d -o json/usdt.h 85c8fb8b3cSJoshua M. Clulow 86*1f04db57SRichard PALOCLOBBERFILES += json/usdt.h 87*1f04db57SRichard PALO 88c8fb8b3cSJoshua M. Clulowjson/usdt.o: json/usdt.d json/tst.usdt.o 89c8fb8b3cSJoshua M. Clulow $(COMPILE.d) -o json/usdt.o -s json/usdt.d json/tst.usdt.o 90c8fb8b3cSJoshua M. Clulow 91c8fb8b3cSJoshua M. Clulowjson/tst.usdt.exe: json/tst.usdt.o json/usdt.o 92c8fb8b3cSJoshua M. Clulow $(LINK.c) -o json/tst.usdt.exe json/tst.usdt.o json/usdt.o $(LDLIBS) 93c8fb8b3cSJoshua M. Clulow $(POST_PROCESS) ; $(STRIP_STABS) 94c8fb8b3cSJoshua M. Clulow 956ab39862SRobert Mustacchi# 966ab39862SRobert Mustacchi# Tests that use the next three programs rely on the binaries having 976ab39862SRobert Mustacchi# valid CTF data. 986ab39862SRobert Mustacchi# 996ab39862SRobert Mustacchiuctf/tst.aouttype.exe: uctf/tst.aouttype.c 1006ab39862SRobert Mustacchi $(COMPILE.c) $(CTF_FLAGS) -o uctf/tst.aouttype.o uctf/tst.aouttype.c 1016ab39862SRobert Mustacchi $(CTFCONVERT) -i -L VERSION uctf/tst.aouttype.o 1026ab39862SRobert Mustacchi $(LINK.c) -o uctf/tst.aouttype.exe uctf/tst.aouttype.o $(LDLIBS) 1036ab39862SRobert Mustacchi $(CTFMERGE) -L VERSION -o $@ uctf/tst.aouttype.o 1046ab39862SRobert Mustacchi $(POST_PROCESS) ; $(STRIP_STABS) 1056ab39862SRobert Mustacchi 1066ab39862SRobert Mustacchiuctf/tst.chasestrings.exe: uctf/tst.chasestrings.c 1076ab39862SRobert Mustacchi $(COMPILE.c) $(CTF_FLAGS) -o uctf/tst.chasestrings.o uctf/tst.chasestrings.c 1086ab39862SRobert Mustacchi $(CTFCONVERT) -i -L VERSION uctf/tst.chasestrings.o 1096ab39862SRobert Mustacchi $(LINK.c) -o uctf/tst.chasestrings.exe uctf/tst.chasestrings.o $(LDLIBS) 1106ab39862SRobert Mustacchi $(CTFMERGE) -L VERSION -o $@ uctf/tst.chasestrings.o 1116ab39862SRobert Mustacchi $(POST_PROCESS) ; $(STRIP_STABS) 1126ab39862SRobert Mustacchi 1136ab39862SRobert Mustacchiuctf/tst.printtype.exe: uctf/tst.printtype.c 1146ab39862SRobert Mustacchi $(COMPILE.c) $(CTF_FLAGS) -o uctf/tst.printtype.o uctf/tst.printtype.c 1156ab39862SRobert Mustacchi $(CTFCONVERT) -i -L VERSION uctf/tst.printtype.o 1166ab39862SRobert Mustacchi $(LINK.c) -o uctf/tst.printtype.exe uctf/tst.printtype.o $(LDLIBS) 1176ab39862SRobert Mustacchi $(CTFMERGE) -L VERSION -o $@ uctf/tst.printtype.o 1186ab39862SRobert Mustacchi $(POST_PROCESS) ; $(STRIP_STABS) 1196ab39862SRobert Mustacchi 1206ab39862SRobert Mustacchi# 1216ab39862SRobert Mustacchi# This program should never have any ctf data in it. 1226ab39862SRobert Mustacchi# 1236ab39862SRobert Mustacchiuctf/tst.libtype.exe: 1246ab39862SRobert Mustacchi $(LINK.c) -o uctf/tst.libtype.exe uctf/tst.libtype.c $(LDLIBS) 1256ab39862SRobert Mustacchi $(POST_PROCESS) ; $(STRIP_STABS) 1266ab39862SRobert Mustacchi 1279512fe85Sahlusdt/tst.args.exe: usdt/tst.args.o usdt/args.o 12873427c57Sahl $(LINK.c) -o usdt/tst.args.exe usdt/tst.args.o usdt/args.o $(LDLIBS) 12973427c57Sahl $(POST_PROCESS) ; $(STRIP_STABS) 1309512fe85Sahl 1319512fe85Sahlusdt/args.o: usdt/args.d usdt/tst.args.o 13273427c57Sahl $(COMPILE.d) -o usdt/args.o -s usdt/args.d usdt/tst.args.o 1339512fe85Sahl 1349512fe85Sahlusdt/tst.argmap.exe: usdt/tst.argmap.o usdt/argmap.o 135edb34883SAdam H. Leventhal $(LINK.c) -o usdt/tst.argmap.exe \ 136edb34883SAdam H. Leventhal usdt/tst.argmap.o usdt/argmap.o $(LDLIBS) 13773427c57Sahl $(POST_PROCESS) ; $(STRIP_STABS) 1389512fe85Sahl 1399512fe85Sahlusdt/argmap.o: usdt/argmap.d usdt/tst.argmap.o 14073427c57Sahl $(COMPILE.d) -o usdt/argmap.o -s usdt/argmap.d usdt/tst.argmap.o 14123b5c241Stomee 142dcafa303Sahlusdt/tst.forker.exe: usdt/tst.forker.o usdt/forker.o 143edb34883SAdam H. Leventhal $(LINK.c) -o usdt/tst.forker.exe \ 144edb34883SAdam H. Leventhal usdt/tst.forker.o usdt/forker.o $(LDLIBS) 145dcafa303Sahl $(POST_PROCESS) ; $(STRIP_STABS) 146dcafa303Sahl 147dcafa303Sahlusdt/forker.o: usdt/forker.d usdt/tst.forker.o 148dcafa303Sahl $(COMPILE.d) -o usdt/forker.o -s usdt/forker.d usdt/tst.forker.o 149dcafa303Sahl 150dcafa303Sahlusdt/tst.forker.o: usdt/forker.h 151dcafa303Sahl 152dcafa303Sahlusdt/forker.h: usdt/forker.d 153dcafa303Sahl $(DTRACE) -h -s usdt/forker.d -o usdt/forker.h 154dcafa303Sahl 155edb34883SAdam H. Leventhalusdt/tst.lazyprobe.exe: usdt/tst.lazyprobe.o usdt/lazyprobe.o 156edb34883SAdam H. Leventhal $(LINK.c) -o usdt/tst.lazyprobe.exe \ 157edb34883SAdam H. Leventhal usdt/tst.lazyprobe.o usdt/lazyprobe.o $(LDLIBS) 158edb34883SAdam H. Leventhal $(POST_PROCESS) ; $(STRIP_STABS) 159edb34883SAdam H. Leventhal 160edb34883SAdam H. Leventhalusdt/lazyprobe.o: usdt/lazyprobe.d usdt/tst.lazyprobe.o 161edb34883SAdam H. Leventhal $(COMPILE.d) -xlazyload -o usdt/lazyprobe.o \ 162edb34883SAdam H. Leventhal -s usdt/lazyprobe.d usdt/tst.lazyprobe.o 163edb34883SAdam H. Leventhal 164edb34883SAdam H. Leventhalusdt/tst.lazyprobe.o: usdt/lazyprobe.h 165edb34883SAdam H. Leventhal 166edb34883SAdam H. Leventhalusdt/lazyprobe.h: usdt/lazyprobe.d 167edb34883SAdam H. Leventhal $(DTRACE) -h -s usdt/lazyprobe.d -o usdt/lazyprobe.h 168edb34883SAdam H. Leventhal 16923b5c241StomeeSUBDIRS = java_api 17023b5c241Stomeeinclude ../../Makefile.subdirs 171