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. 29a386cc11SRobert Mustacchi# Copyright (c) 2013, Joyent, Inc. All rights reserved. 30*d50bcaaeSAndrew Stormont# Copyright 2015 Nexenta Systems, Inc. All rights reserved. 31a386cc11SRobert Mustacchi# 32a386cc11SRobert Mustacchi 33a386cc11SRobert Mustacchi# 34a386cc11SRobert Mustacchi# WARNING: Do not include Makefile.ctf here. That will cause tests to 35a386cc11SRobert Mustacchi# break. 3673427c57Sahl# 379512fe85Sahl 3823b5c241Stomeeinclude $(SRC)/Makefile.master 399512fe85Sahlinclude ../Makefile.com 409512fe85Sahl 41f3b585ceSsamfSNOOPDIR = $(SRC)/cmd/cmd-inet/usr.sbin/snoop 42f3b585ceSsamfSNOOPOBJS = nfs4_xdr.o 43f3b585ceSsamfSNOOPSRCS = ${SNOOPOBJS:%.o=%.c} 44f3b585ceSsamfCLOBBERFILES += nfs/$(SNOOPOBJS) 45f3b585ceSsamf 46e1adf50cSahlRPCSVCDIR = $(SRC)/head/rpcsvc 47e1adf50cSahlRPCSVCOBJS = nfs_prot.o 48e1adf50cSahlRPCSVCSRCS = ${RPCSVCOBJS:%o=%c} 49e1adf50cSahlCLOBBERFILES += nfs/$(RPCSVCOBJS) $(RPCSVCDIR)/$(RPCSVCSRCS) 50b6805bf7SGordon RossCLOBBERFILES += usdt/forker.h usdt/lazyprobe.h 51e1adf50cSahl 5273427c57Sahlfasttrap/tst.fasttrap.exe := LDLIBS += -ldtrace 5373427c57Sahlfasttrap/tst.stack.exe := LDLIBS += -ldtrace 549512fe85Sahl 5573427c57Sahlsysevent/tst.post.exe := LDLIBS += -lsysevent 5673427c57Sahlsysevent/tst.post_chan.exe := LDLIBS += -lsysevent 57e04145d0Seschrock 58b8fac8e1Sjhaslamustack/tst.bigstack.exe := COPTFLAG += -xO1 59b8fac8e1Sjhaslam 6073427c57SahlGCC = $(ONBLD_TOOLS)/bin/$(MACH)/cw -_gcc 619512fe85Sahl 62f3b585ceSsamfnfs/%.o: $(SNOOPDIR)/%.c 63f3b585ceSsamf $(COMPILE.c) -o $@ $< -I$(SNOOPDIR) 64f3b585ceSsamf $(POST_PROCESS_O) 65f3b585ceSsamfnfs/tst.call.exe: nfs/tst.call.o nfs/$(SNOOPOBJS) 66f3b585ceSsamf $(LINK.c) -o $@ nfs/tst.call.o nfs/$(SNOOPOBJS) $(LDLIBS) -lnsl 67f3b585ceSsamf $(POST_PROCESS) ; $(STRIP_STABS) 68e1adf50cSahl$(RPCSVCDIR)/%.c: $(RPCSVCDIR)/%.x 69e1adf50cSahl $(RPCGEN) -Cc $< > $@ 70e1adf50cSahlnfs/$(RPCSVCOBJS): $(RPCSVCDIR)/$(RPCSVCSRCS) 71e1adf50cSahl $(COMPILE.c) -o $@ $(RPCSVCDIR)/$(RPCSVCSRCS) 72e1adf50cSahl $(POST_PROCESS_O) 73e1adf50cSahlnfs/tst.call3.exe: nfs/tst.call3.o nfs/$(RPCSVCOBJS) 74e1adf50cSahl $(LINK.c) -o $@ nfs/tst.call3.o nfs/$(RPCSVCOBJS) \ 75e1adf50cSahl $(LDLIBS) -lnsl -lrpcsvc 76e1adf50cSahl $(POST_PROCESS) ; $(STRIP_STABS) 77f3b585ceSsamf 789512fe85Sahlpid/tst.gcc.exe: pid/tst.gcc.c 79*d50bcaaeSAndrew Stormont $(GCC) -o pid/tst.gcc.exe pid/tst.gcc.c $(LDFLAGS) $(LDLIBS) 8073427c57Sahl $(POST_PROCESS) ; $(STRIP_STABS) 819512fe85Sahl 82f497f9feSJoshua M. Clulowjson/tst.usdt.o: json/usdt.h 83f497f9feSJoshua M. Clulow 84f497f9feSJoshua M. Clulowjson/usdt.h: json/usdt.d 85f497f9feSJoshua M. Clulow $(DTRACE) -h -s json/usdt.d -o json/usdt.h 86f497f9feSJoshua M. Clulow 87b52c8fbeSRichard PALOCLOBBERFILES += json/usdt.h 88b52c8fbeSRichard PALO 89f497f9feSJoshua M. Clulowjson/usdt.o: json/usdt.d json/tst.usdt.o 90f497f9feSJoshua M. Clulow $(COMPILE.d) -o json/usdt.o -s json/usdt.d json/tst.usdt.o 91f497f9feSJoshua M. Clulow 92f497f9feSJoshua M. Clulowjson/tst.usdt.exe: json/tst.usdt.o json/usdt.o 93f497f9feSJoshua M. Clulow $(LINK.c) -o json/tst.usdt.exe json/tst.usdt.o json/usdt.o $(LDLIBS) 94f497f9feSJoshua M. Clulow $(POST_PROCESS) ; $(STRIP_STABS) 95f497f9feSJoshua M. Clulow 96a386cc11SRobert Mustacchi# 97a386cc11SRobert Mustacchi# Tests that use the next three programs rely on the binaries having 98a386cc11SRobert Mustacchi# valid CTF data. 99a386cc11SRobert Mustacchi# 100a386cc11SRobert Mustacchiuctf/tst.aouttype.exe: uctf/tst.aouttype.c 101a386cc11SRobert Mustacchi $(COMPILE.c) $(CTF_FLAGS) -o uctf/tst.aouttype.o uctf/tst.aouttype.c 102a386cc11SRobert Mustacchi $(CTFCONVERT) -i -L VERSION uctf/tst.aouttype.o 103a386cc11SRobert Mustacchi $(LINK.c) -o uctf/tst.aouttype.exe uctf/tst.aouttype.o $(LDLIBS) 104a386cc11SRobert Mustacchi $(CTFMERGE) -L VERSION -o $@ uctf/tst.aouttype.o 105a386cc11SRobert Mustacchi $(POST_PROCESS) ; $(STRIP_STABS) 106a386cc11SRobert Mustacchi 107a386cc11SRobert Mustacchiuctf/tst.chasestrings.exe: uctf/tst.chasestrings.c 108a386cc11SRobert Mustacchi $(COMPILE.c) $(CTF_FLAGS) -o uctf/tst.chasestrings.o uctf/tst.chasestrings.c 109a386cc11SRobert Mustacchi $(CTFCONVERT) -i -L VERSION uctf/tst.chasestrings.o 110a386cc11SRobert Mustacchi $(LINK.c) -o uctf/tst.chasestrings.exe uctf/tst.chasestrings.o $(LDLIBS) 111a386cc11SRobert Mustacchi $(CTFMERGE) -L VERSION -o $@ uctf/tst.chasestrings.o 112a386cc11SRobert Mustacchi $(POST_PROCESS) ; $(STRIP_STABS) 113a386cc11SRobert Mustacchi 114a386cc11SRobert Mustacchiuctf/tst.printtype.exe: uctf/tst.printtype.c 115a386cc11SRobert Mustacchi $(COMPILE.c) $(CTF_FLAGS) -o uctf/tst.printtype.o uctf/tst.printtype.c 116a386cc11SRobert Mustacchi $(CTFCONVERT) -i -L VERSION uctf/tst.printtype.o 117a386cc11SRobert Mustacchi $(LINK.c) -o uctf/tst.printtype.exe uctf/tst.printtype.o $(LDLIBS) 118a386cc11SRobert Mustacchi $(CTFMERGE) -L VERSION -o $@ uctf/tst.printtype.o 119a386cc11SRobert Mustacchi $(POST_PROCESS) ; $(STRIP_STABS) 120a386cc11SRobert Mustacchi 121a386cc11SRobert Mustacchi# 122a386cc11SRobert Mustacchi# This program should never have any ctf data in it. 123a386cc11SRobert Mustacchi# 124a386cc11SRobert Mustacchiuctf/tst.libtype.exe: 125a386cc11SRobert Mustacchi $(LINK.c) -o uctf/tst.libtype.exe uctf/tst.libtype.c $(LDLIBS) 126a386cc11SRobert Mustacchi $(POST_PROCESS) ; $(STRIP_STABS) 127a386cc11SRobert Mustacchi 1289512fe85Sahlusdt/tst.args.exe: usdt/tst.args.o usdt/args.o 12973427c57Sahl $(LINK.c) -o usdt/tst.args.exe usdt/tst.args.o usdt/args.o $(LDLIBS) 13073427c57Sahl $(POST_PROCESS) ; $(STRIP_STABS) 1319512fe85Sahl 1329512fe85Sahlusdt/args.o: usdt/args.d usdt/tst.args.o 13373427c57Sahl $(COMPILE.d) -o usdt/args.o -s usdt/args.d usdt/tst.args.o 1349512fe85Sahl 1359512fe85Sahlusdt/tst.argmap.exe: usdt/tst.argmap.o usdt/argmap.o 136edb34883SAdam H. Leventhal $(LINK.c) -o usdt/tst.argmap.exe \ 137edb34883SAdam H. Leventhal usdt/tst.argmap.o usdt/argmap.o $(LDLIBS) 13873427c57Sahl $(POST_PROCESS) ; $(STRIP_STABS) 1399512fe85Sahl 1409512fe85Sahlusdt/argmap.o: usdt/argmap.d usdt/tst.argmap.o 14173427c57Sahl $(COMPILE.d) -o usdt/argmap.o -s usdt/argmap.d usdt/tst.argmap.o 14223b5c241Stomee 143dcafa303Sahlusdt/tst.forker.exe: usdt/tst.forker.o usdt/forker.o 144edb34883SAdam H. Leventhal $(LINK.c) -o usdt/tst.forker.exe \ 145edb34883SAdam H. Leventhal usdt/tst.forker.o usdt/forker.o $(LDLIBS) 146dcafa303Sahl $(POST_PROCESS) ; $(STRIP_STABS) 147dcafa303Sahl 148dcafa303Sahlusdt/forker.o: usdt/forker.d usdt/tst.forker.o 149dcafa303Sahl $(COMPILE.d) -o usdt/forker.o -s usdt/forker.d usdt/tst.forker.o 150dcafa303Sahl 151dcafa303Sahlusdt/tst.forker.o: usdt/forker.h 152dcafa303Sahl 153dcafa303Sahlusdt/forker.h: usdt/forker.d 154dcafa303Sahl $(DTRACE) -h -s usdt/forker.d -o usdt/forker.h 155dcafa303Sahl 156edb34883SAdam H. Leventhalusdt/tst.lazyprobe.exe: usdt/tst.lazyprobe.o usdt/lazyprobe.o 157edb34883SAdam H. Leventhal $(LINK.c) -o usdt/tst.lazyprobe.exe \ 158edb34883SAdam H. Leventhal usdt/tst.lazyprobe.o usdt/lazyprobe.o $(LDLIBS) 159edb34883SAdam H. Leventhal $(POST_PROCESS) ; $(STRIP_STABS) 160edb34883SAdam H. Leventhal 161edb34883SAdam H. Leventhalusdt/lazyprobe.o: usdt/lazyprobe.d usdt/tst.lazyprobe.o 162edb34883SAdam H. Leventhal $(COMPILE.d) -xlazyload -o usdt/lazyprobe.o \ 163edb34883SAdam H. Leventhal -s usdt/lazyprobe.d usdt/tst.lazyprobe.o 164edb34883SAdam H. Leventhal 165edb34883SAdam H. Leventhalusdt/tst.lazyprobe.o: usdt/lazyprobe.h 166edb34883SAdam H. Leventhal 167edb34883SAdam H. Leventhalusdt/lazyprobe.h: usdt/lazyprobe.d 168edb34883SAdam H. Leventhal $(DTRACE) -h -s usdt/lazyprobe.d -o usdt/lazyprobe.h 169edb34883SAdam H. Leventhal 17023b5c241StomeeSUBDIRS = java_api 17123b5c241Stomeeinclude ../../Makefile.subdirs 172