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.
27 include $(SRC)/cmd/Makefile.cmd
31 ROOTOPTPKG = $(ROOT)/opt/SUNWdtrt
32 ROOTTST = $(ROOTOPTPKG)/tst
33 SUBDIR :sh= basename `pwd`
34 TSTDIR = $(ROOTTST)/$(SUBDIR)
35 DSTYLE = $(ROOTOPTPKG)/bin/dstyle
37 EXES += $(CSRCS:%.c=%.exe)
38 EXES += $(SSRCS:%.s=%.exe)
40 ROOT_TSTS = $(TSTS:%=$(TSTDIR)/%)
41 ROOT_EXES = $(EXES:%=$(TSTDIR)/%)
43 $(ROOT_TSTS) := FILEMODE = 0444
44 $(ROOT_EXES) := FILEMODE = 0555
46 # The DTrace tests rely on "normal" behaviour from the compiler which
47 # agressive optimization of small, simple, one compilation-unit programs may
48 # utterly subvert. We force the compiler to not optimize rather than engage
49 # in an arms race with increasingly belligerent optimizers.
52 CERRWARN += -Wno-switch
53 CERRWARN += -Wno-unused-variable
54 CERRWARN += -Wno-implicit-function-declaration
55 CERRWARN += -Wno-unused-function
56 CERRWARN += -Wno-unused-variable
63 -$(RM) $(CSRCS:%.c=%.exe) $(CSRCS:%.c=%.o)
64 -$(RM) $(SSRCS:%.s=%.exe) $(SSRCS:%.s=%.o)
65 -$(RM) $(DSRCS:%.d=%.o)
66 -$(RM) $(CLOBBERFILES)
68 install: $(ROOT_TSTS) $(ROOT_EXES)
70 $(ROOT_TSTS): $(TSTDIR)
72 $(ROOT_EXES): $(TSTDIR)
78 $(INS) -d -m $(DIRMODE) $(@D)
82 $(LINK.c) -o $@ $< $(LDLIBS)
83 $(POST_PROCESS) ; $(STRIP_STABS)
86 $(LINK.c) -o $@ $< $(LDLIBS)
87 $(POST_PROCESS) ; $(STRIP_STABS)
98 @cd ../cmd/scripts; pwd; $(MAKE) install
101 @if [ -n "$(DSRCS)" ]; then $(DSTYLE) $(DSRCS); fi