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 2008 Sun Microsystems, Inc. All rights reserved. 24# Use is subject to license terms. 25# 26 27# 28# Copyright (c) 2012 by Delphix. All rights reserved. 29# Copyright (c) 2012, Joyent, Inc. All rights reserved. 30# 31 32include $(SRC)/Makefile.master 33include ../Makefile.com 34 35SNOOPDIR = $(SRC)/cmd/cmd-inet/usr.sbin/snoop 36SNOOPOBJS = nfs4_xdr.o 37SNOOPSRCS = ${SNOOPOBJS:%.o=%.c} 38CLOBBERFILES += nfs/$(SNOOPOBJS) 39 40RPCSVCDIR = $(SRC)/head/rpcsvc 41RPCSVCOBJS = nfs_prot.o 42RPCSVCSRCS = ${RPCSVCOBJS:%o=%c} 43CLOBBERFILES += nfs/$(RPCSVCOBJS) $(RPCSVCDIR)/$(RPCSVCSRCS) 44CLOBBERFILES += usdt/forker.h usdt/lazyprobe.h 45 46fasttrap/tst.fasttrap.exe := LDLIBS += -ldtrace 47fasttrap/tst.stack.exe := LDLIBS += -ldtrace 48 49sysevent/tst.post.exe := LDLIBS += -lsysevent 50sysevent/tst.post_chan.exe := LDLIBS += -lsysevent 51 52ustack/tst.bigstack.exe := COPTFLAG += -xO1 53 54GCC = $(ONBLD_TOOLS)/bin/$(MACH)/cw -_gcc 55 56nfs/%.o: $(SNOOPDIR)/%.c 57 $(COMPILE.c) -o $@ $< -I$(SNOOPDIR) 58 $(POST_PROCESS_O) 59nfs/tst.call.exe: nfs/tst.call.o nfs/$(SNOOPOBJS) 60 $(LINK.c) -o $@ nfs/tst.call.o nfs/$(SNOOPOBJS) $(LDLIBS) -lnsl 61 $(POST_PROCESS) ; $(STRIP_STABS) 62$(RPCSVCDIR)/%.c: $(RPCSVCDIR)/%.x 63 $(RPCGEN) -Cc $< > $@ 64nfs/$(RPCSVCOBJS): $(RPCSVCDIR)/$(RPCSVCSRCS) 65 $(COMPILE.c) -o $@ $(RPCSVCDIR)/$(RPCSVCSRCS) 66 $(POST_PROCESS_O) 67nfs/tst.call3.exe: nfs/tst.call3.o nfs/$(RPCSVCOBJS) 68 $(LINK.c) -o $@ nfs/tst.call3.o nfs/$(RPCSVCOBJS) \ 69 $(LDLIBS) -lnsl -lrpcsvc 70 $(POST_PROCESS) ; $(STRIP_STABS) 71 72pid/tst.gcc.exe: pid/tst.gcc.c 73 $(GCC) -o pid/tst.gcc.exe pid/tst.gcc.c $(LDFLAGS) 74 $(POST_PROCESS) ; $(STRIP_STABS) 75 76json/tst.usdt.o: json/usdt.h 77 78json/usdt.h: json/usdt.d 79 $(DTRACE) -h -s json/usdt.d -o json/usdt.h 80 81json/usdt.o: json/usdt.d json/tst.usdt.o 82 $(COMPILE.d) -o json/usdt.o -s json/usdt.d json/tst.usdt.o 83 84json/tst.usdt.exe: json/tst.usdt.o json/usdt.o 85 $(LINK.c) -o json/tst.usdt.exe json/tst.usdt.o json/usdt.o $(LDLIBS) 86 $(POST_PROCESS) ; $(STRIP_STABS) 87 88usdt/tst.args.exe: usdt/tst.args.o usdt/args.o 89 $(LINK.c) -o usdt/tst.args.exe usdt/tst.args.o usdt/args.o $(LDLIBS) 90 $(POST_PROCESS) ; $(STRIP_STABS) 91 92usdt/args.o: usdt/args.d usdt/tst.args.o 93 $(COMPILE.d) -o usdt/args.o -s usdt/args.d usdt/tst.args.o 94 95usdt/tst.argmap.exe: usdt/tst.argmap.o usdt/argmap.o 96 $(LINK.c) -o usdt/tst.argmap.exe \ 97 usdt/tst.argmap.o usdt/argmap.o $(LDLIBS) 98 $(POST_PROCESS) ; $(STRIP_STABS) 99 100usdt/argmap.o: usdt/argmap.d usdt/tst.argmap.o 101 $(COMPILE.d) -o usdt/argmap.o -s usdt/argmap.d usdt/tst.argmap.o 102 103usdt/tst.forker.exe: usdt/tst.forker.o usdt/forker.o 104 $(LINK.c) -o usdt/tst.forker.exe \ 105 usdt/tst.forker.o usdt/forker.o $(LDLIBS) 106 $(POST_PROCESS) ; $(STRIP_STABS) 107 108usdt/forker.o: usdt/forker.d usdt/tst.forker.o 109 $(COMPILE.d) -o usdt/forker.o -s usdt/forker.d usdt/tst.forker.o 110 111usdt/tst.forker.o: usdt/forker.h 112 113usdt/forker.h: usdt/forker.d 114 $(DTRACE) -h -s usdt/forker.d -o usdt/forker.h 115 116usdt/tst.lazyprobe.exe: usdt/tst.lazyprobe.o usdt/lazyprobe.o 117 $(LINK.c) -o usdt/tst.lazyprobe.exe \ 118 usdt/tst.lazyprobe.o usdt/lazyprobe.o $(LDLIBS) 119 $(POST_PROCESS) ; $(STRIP_STABS) 120 121usdt/lazyprobe.o: usdt/lazyprobe.d usdt/tst.lazyprobe.o 122 $(COMPILE.d) -xlazyload -o usdt/lazyprobe.o \ 123 -s usdt/lazyprobe.d usdt/tst.lazyprobe.o 124 125usdt/tst.lazyprobe.o: usdt/lazyprobe.h 126 127usdt/lazyprobe.h: usdt/lazyprobe.d 128 $(DTRACE) -h -s usdt/lazyprobe.d -o usdt/lazyprobe.h 129 130SUBDIRS = java_api 131include ../../Makefile.subdirs 132