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. 29d50bcaaeSAndrew Stormont# Copyright 2015 Nexenta Systems, Inc. All rights reserved. 30ab618543SJohn Levon# Copyright 2018 Joyent, Inc. 316eeafb34SRobert Mustacchi# Copyright 2022 Oxide Computer Company 32a386cc11SRobert Mustacchi# 33a386cc11SRobert Mustacchi 34a386cc11SRobert Mustacchi# 35a386cc11SRobert Mustacchi# WARNING: Do not include Makefile.ctf here. That will cause tests to 36a386cc11SRobert Mustacchi# break. 3773427c57Sahl# 389512fe85Sahl 3923b5c241Stomeeinclude $(SRC)/Makefile.master 409512fe85Sahlinclude ../Makefile.com 419512fe85Sahl 42f3b585ceSsamfSNOOPDIR = $(SRC)/cmd/cmd-inet/usr.sbin/snoop 43f3b585ceSsamfSNOOPOBJS = nfs4_xdr.o 44f3b585ceSsamfSNOOPSRCS = ${SNOOPOBJS:%.o=%.c} 45f3b585ceSsamfCLOBBERFILES += nfs/$(SNOOPOBJS) 46f3b585ceSsamf 47e1adf50cSahlRPCSVCDIR = $(SRC)/head/rpcsvc 48e1adf50cSahlRPCSVCOBJS = nfs_prot.o 49e1adf50cSahlRPCSVCSRCS = ${RPCSVCOBJS:%o=%c} 50e1adf50cSahlCLOBBERFILES += nfs/$(RPCSVCOBJS) $(RPCSVCDIR)/$(RPCSVCSRCS) 51b6805bf7SGordon RossCLOBBERFILES += usdt/forker.h usdt/lazyprobe.h 52e1adf50cSahl 5373427c57Sahlfasttrap/tst.fasttrap.exe := LDLIBS += -ldtrace 5473427c57Sahlfasttrap/tst.stack.exe := LDLIBS += -ldtrace 559512fe85Sahl 5602ed7401SRobert Mustacchiip/msnc.exe := LDLIBS += -lsocket 5702ed7401SRobert Mustacchi 5873427c57Sahlsysevent/tst.post.exe := LDLIBS += -lsysevent 5973427c57Sahlsysevent/tst.post_chan.exe := LDLIBS += -lsysevent 60e04145d0Seschrock 61b8fac8e1Sjhaslamustack/tst.bigstack.exe := COPTFLAG += -xO1 62b8fac8e1Sjhaslam 63ab618543SJohn LevonCSTD = $(CSTD_GNU99) 64ab618543SJohn Levon 65f3b585ceSsamfnfs/%.o: $(SNOOPDIR)/%.c 66f3b585ceSsamf $(COMPILE.c) -o $@ $< -I$(SNOOPDIR) 67f3b585ceSsamf $(POST_PROCESS_O) 68f3b585ceSsamfnfs/tst.call.exe: nfs/tst.call.o nfs/$(SNOOPOBJS) 69f3b585ceSsamf $(LINK.c) -o $@ nfs/tst.call.o nfs/$(SNOOPOBJS) $(LDLIBS) -lnsl 70f3b585ceSsamf $(POST_PROCESS) ; $(STRIP_STABS) 71e1adf50cSahl$(RPCSVCDIR)/%.c: $(RPCSVCDIR)/%.x 72e1adf50cSahl $(RPCGEN) -Cc $< > $@ 73e1adf50cSahlnfs/$(RPCSVCOBJS): $(RPCSVCDIR)/$(RPCSVCSRCS) 74e1adf50cSahl $(COMPILE.c) -o $@ $(RPCSVCDIR)/$(RPCSVCSRCS) 75e1adf50cSahl $(POST_PROCESS_O) 76e1adf50cSahlnfs/tst.call3.exe: nfs/tst.call3.o nfs/$(RPCSVCOBJS) 77e1adf50cSahl $(LINK.c) -o $@ nfs/tst.call3.o nfs/$(RPCSVCOBJS) \ 78e1adf50cSahl $(LDLIBS) -lnsl -lrpcsvc 79e1adf50cSahl $(POST_PROCESS) ; $(STRIP_STABS) 80f3b585ceSsamf 81f497f9feSJoshua M. Clulowjson/tst.usdt.o: json/usdt.h 82f497f9feSJoshua M. Clulow 83f497f9feSJoshua M. Clulowjson/usdt.h: json/usdt.d 84f497f9feSJoshua M. Clulow $(DTRACE) -h -s json/usdt.d -o json/usdt.h 85f497f9feSJoshua M. Clulow 86b52c8fbeSRichard PALOCLOBBERFILES += json/usdt.h 87b52c8fbeSRichard PALO 88f497f9feSJoshua M. Clulowjson/usdt.o: json/usdt.d json/tst.usdt.o 89f497f9feSJoshua M. Clulow $(COMPILE.d) -o json/usdt.o -s json/usdt.d json/tst.usdt.o 90f497f9feSJoshua M. Clulow 91f497f9feSJoshua M. Clulowjson/tst.usdt.exe: json/tst.usdt.o json/usdt.o 92f497f9feSJoshua M. Clulow $(LINK.c) -o json/tst.usdt.exe json/tst.usdt.o json/usdt.o $(LDLIBS) 93f497f9feSJoshua M. Clulow $(POST_PROCESS) ; $(STRIP_STABS) 94f497f9feSJoshua M. Clulow 95a386cc11SRobert Mustacchi# 96*8b184c19SRobert Mustacchi# Tests that use the next programs rely on the binaries having valid CTF 97*8b184c19SRobert Mustacchi# data. 98a386cc11SRobert Mustacchi# 996eeafb34SRobert Mustacchibitfields/tst.bitfields.exe: bitfields/tst.bitfields.c 1006eeafb34SRobert Mustacchi $(COMPILE.c) $(CTF_FLAGS) -o bitfields/tst.bitfields.o bitfields/tst.bitfields.c 1016eeafb34SRobert Mustacchi $(CTFCONVERT) -i -L VERSION bitfields/tst.bitfields.o 1026eeafb34SRobert Mustacchi $(LINK.c) -o bitfields/tst.bitfields.exe bitfields/tst.bitfields.o $(LDLIBS) 1036eeafb34SRobert Mustacchi $(CTFMERGE) -L VERSION -o $@ bitfields/tst.bitfields.o 1046eeafb34SRobert Mustacchi $(POST_PROCESS) ; $(STRIP_STABS) 1056eeafb34SRobert Mustacchi 106*8b184c19SRobert Mustacchioffsetof/tst.anon.exe: offsetof/tst.anon.c 107*8b184c19SRobert Mustacchi $(COMPILE.c) $(CTF_FLAGS) -o offsetof/tst.anon.o offsetof/tst.anon.c 108*8b184c19SRobert Mustacchi $(CTFCONVERT) -i -L VERSION offsetof/tst.anon.o 109*8b184c19SRobert Mustacchi $(LINK.c) -o offsetof/tst.anon.exe offsetof/tst.anon.o $(LDLIBS) 110*8b184c19SRobert Mustacchi $(CTFMERGE) -L VERSION -o $@ offsetof/tst.anon.o 111*8b184c19SRobert Mustacchi $(POST_PROCESS) ; $(STRIP_STABS) 112*8b184c19SRobert Mustacchi 113*8b184c19SRobert Mustacchiprint/tst.anon.exe: print/tst.anon.c 114*8b184c19SRobert Mustacchi $(COMPILE.c) $(CTF_FLAGS) -o print/tst.anon.o print/tst.anon.c 115*8b184c19SRobert Mustacchi $(CTFCONVERT) -i -L VERSION print/tst.anon.o 116*8b184c19SRobert Mustacchi $(LINK.c) -o print/tst.anon.exe print/tst.anon.o $(LDLIBS) 117*8b184c19SRobert Mustacchi $(CTFMERGE) -L VERSION -o $@ print/tst.anon.o 118*8b184c19SRobert Mustacchi $(POST_PROCESS) ; $(STRIP_STABS) 119*8b184c19SRobert Mustacchi 120a386cc11SRobert Mustacchiuctf/tst.aouttype.exe: uctf/tst.aouttype.c 121a386cc11SRobert Mustacchi $(COMPILE.c) $(CTF_FLAGS) -o uctf/tst.aouttype.o uctf/tst.aouttype.c 122a386cc11SRobert Mustacchi $(CTFCONVERT) -i -L VERSION uctf/tst.aouttype.o 123a386cc11SRobert Mustacchi $(LINK.c) -o uctf/tst.aouttype.exe uctf/tst.aouttype.o $(LDLIBS) 124a386cc11SRobert Mustacchi $(CTFMERGE) -L VERSION -o $@ uctf/tst.aouttype.o 125a386cc11SRobert Mustacchi $(POST_PROCESS) ; $(STRIP_STABS) 126a386cc11SRobert Mustacchi 127a386cc11SRobert Mustacchiuctf/tst.chasestrings.exe: uctf/tst.chasestrings.c 128a386cc11SRobert Mustacchi $(COMPILE.c) $(CTF_FLAGS) -o uctf/tst.chasestrings.o uctf/tst.chasestrings.c 129a386cc11SRobert Mustacchi $(CTFCONVERT) -i -L VERSION uctf/tst.chasestrings.o 130a386cc11SRobert Mustacchi $(LINK.c) -o uctf/tst.chasestrings.exe uctf/tst.chasestrings.o $(LDLIBS) 131a386cc11SRobert Mustacchi $(CTFMERGE) -L VERSION -o $@ uctf/tst.chasestrings.o 132a386cc11SRobert Mustacchi $(POST_PROCESS) ; $(STRIP_STABS) 133a386cc11SRobert Mustacchi 134a386cc11SRobert Mustacchiuctf/tst.printtype.exe: uctf/tst.printtype.c 135a386cc11SRobert Mustacchi $(COMPILE.c) $(CTF_FLAGS) -o uctf/tst.printtype.o uctf/tst.printtype.c 136a386cc11SRobert Mustacchi $(CTFCONVERT) -i -L VERSION uctf/tst.printtype.o 137a386cc11SRobert Mustacchi $(LINK.c) -o uctf/tst.printtype.exe uctf/tst.printtype.o $(LDLIBS) 138a386cc11SRobert Mustacchi $(CTFMERGE) -L VERSION -o $@ uctf/tst.printtype.o 139a386cc11SRobert Mustacchi $(POST_PROCESS) ; $(STRIP_STABS) 140a386cc11SRobert Mustacchi 141a386cc11SRobert Mustacchi# 142a386cc11SRobert Mustacchi# This program should never have any ctf data in it. 143a386cc11SRobert Mustacchi# 144a386cc11SRobert Mustacchiuctf/tst.libtype.exe: 145a386cc11SRobert Mustacchi $(LINK.c) -o uctf/tst.libtype.exe uctf/tst.libtype.c $(LDLIBS) 146a386cc11SRobert Mustacchi $(POST_PROCESS) ; $(STRIP_STABS) 147a386cc11SRobert Mustacchi 1489512fe85Sahlusdt/tst.args.exe: usdt/tst.args.o usdt/args.o 14973427c57Sahl $(LINK.c) -o usdt/tst.args.exe usdt/tst.args.o usdt/args.o $(LDLIBS) 15073427c57Sahl $(POST_PROCESS) ; $(STRIP_STABS) 1519512fe85Sahl 1529512fe85Sahlusdt/args.o: usdt/args.d usdt/tst.args.o 15373427c57Sahl $(COMPILE.d) -o usdt/args.o -s usdt/args.d usdt/tst.args.o 1549512fe85Sahl 1559512fe85Sahlusdt/tst.argmap.exe: usdt/tst.argmap.o usdt/argmap.o 156edb34883SAdam H. Leventhal $(LINK.c) -o usdt/tst.argmap.exe \ 157edb34883SAdam H. Leventhal usdt/tst.argmap.o usdt/argmap.o $(LDLIBS) 15873427c57Sahl $(POST_PROCESS) ; $(STRIP_STABS) 1599512fe85Sahl 1609512fe85Sahlusdt/argmap.o: usdt/argmap.d usdt/tst.argmap.o 16173427c57Sahl $(COMPILE.d) -o usdt/argmap.o -s usdt/argmap.d usdt/tst.argmap.o 16223b5c241Stomee 163dcafa303Sahlusdt/tst.forker.exe: usdt/tst.forker.o usdt/forker.o 164edb34883SAdam H. Leventhal $(LINK.c) -o usdt/tst.forker.exe \ 165edb34883SAdam H. Leventhal usdt/tst.forker.o usdt/forker.o $(LDLIBS) 166dcafa303Sahl $(POST_PROCESS) ; $(STRIP_STABS) 167dcafa303Sahl 168dcafa303Sahlusdt/forker.o: usdt/forker.d usdt/tst.forker.o 169dcafa303Sahl $(COMPILE.d) -o usdt/forker.o -s usdt/forker.d usdt/tst.forker.o 170dcafa303Sahl 171dcafa303Sahlusdt/tst.forker.o: usdt/forker.h 172dcafa303Sahl 173dcafa303Sahlusdt/forker.h: usdt/forker.d 174dcafa303Sahl $(DTRACE) -h -s usdt/forker.d -o usdt/forker.h 175dcafa303Sahl 176edb34883SAdam H. Leventhalusdt/tst.lazyprobe.exe: usdt/tst.lazyprobe.o usdt/lazyprobe.o 177edb34883SAdam H. Leventhal $(LINK.c) -o usdt/tst.lazyprobe.exe \ 178edb34883SAdam H. Leventhal usdt/tst.lazyprobe.o usdt/lazyprobe.o $(LDLIBS) 179edb34883SAdam H. Leventhal $(POST_PROCESS) ; $(STRIP_STABS) 180edb34883SAdam H. Leventhal 181edb34883SAdam H. Leventhalusdt/lazyprobe.o: usdt/lazyprobe.d usdt/tst.lazyprobe.o 182edb34883SAdam H. Leventhal $(COMPILE.d) -xlazyload -o usdt/lazyprobe.o \ 183edb34883SAdam H. Leventhal -s usdt/lazyprobe.d usdt/tst.lazyprobe.o 184edb34883SAdam H. Leventhal 185edb34883SAdam H. Leventhalusdt/tst.lazyprobe.o: usdt/lazyprobe.h 186edb34883SAdam H. Leventhal 187edb34883SAdam H. Leventhalusdt/lazyprobe.h: usdt/lazyprobe.d 188edb34883SAdam H. Leventhal $(DTRACE) -h -s usdt/lazyprobe.d -o usdt/lazyprobe.h 189edb34883SAdam H. Leventhal 19023b5c241StomeeSUBDIRS = java_api 19123b5c241Stomeeinclude ../../Makefile.subdirs 192