Makefile.com revision c7158ae983f5a04c4a998f468ecefba6d23ba721
9512fe850e98fdd448c638ca63fdd92a8a510255ahl#
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# CDDL HEADER START
9512fe850e98fdd448c638ca63fdd92a8a510255ahl#
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# The contents of this file are subject to the terms of the
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# Common Development and Distribution License (the "License").
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# You may not use this file except in compliance with the License.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl#
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# or http://www.opensolaris.org/os/licensing.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# See the License for the specific language governing permissions
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# and limitations under the License.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl#
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# When distributing Covered Code, include this CDDL HEADER in each
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# If applicable, add the following below this CDDL HEADER, with the
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# fields enclosed by brackets "[]" replaced with your own identifying
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# information: Portions Copyright [yyyy] [name of copyright owner]
9512fe850e98fdd448c638ca63fdd92a8a510255ahl#
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# CDDL HEADER END
9512fe850e98fdd448c638ca63fdd92a8a510255ahl#
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahl#
c7158ae983f5a04c4a998f468ecefba6d23ba721tariq# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# Use is subject to license terms.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl#
73427c57f824c3ec3b396181b163f37d50c5b3b1ahl# ident "%Z%%M% %I% %E% SMI"
73427c57f824c3ec3b396181b163f37d50c5b3b1ahl#
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
73427c57f824c3ec3b396181b163f37d50c5b3b1ahlinclude $(SRC)/cmd/Makefile.cmd
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahl.KEEP_STATE:
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahlROOTOPTPKG = $(ROOT)/opt/SUNWdtrt
9512fe850e98fdd448c638ca63fdd92a8a510255ahlROOTTST = $(ROOTOPTPKG)/tst
9512fe850e98fdd448c638ca63fdd92a8a510255ahlSUBDIR :sh= basename `pwd`
9512fe850e98fdd448c638ca63fdd92a8a510255ahlTSTDIR = $(ROOTTST)/$(SUBDIR)
9512fe850e98fdd448c638ca63fdd92a8a510255ahlDSTYLE = $(ROOTOPTPKG)/bin/dstyle
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahlCSRCS :sh= find . -name SCCS -prune -o -name *.c -print | cut -b3-
9512fe850e98fdd448c638ca63fdd92a8a510255ahlSSRCS :sh= find . -name SCCS -prune -o -name *.s -print | cut -b3-
9512fe850e98fdd448c638ca63fdd92a8a510255ahlDSRCS :sh= find . -name SCCS -prune -o -name *.d -print | cut -b3-
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahlTSTS :sh= find . -name tst.*.d -o -name err.*.d -o \
9512fe850e98fdd448c638ca63fdd92a8a510255ahl -name tst.*.d.out -o -name err.*.d.out -o -name tst.*.ksh \
9512fe850e98fdd448c638ca63fdd92a8a510255ahl -o -name err.*.ksh -o -name tst.*.ksh.out -o -name drp.*.d
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahlEXES :sh= find . -name SCCS -prune -o -name *.exe -print | cut -b3-
9512fe850e98fdd448c638ca63fdd92a8a510255ahlEXES += $(CSRCS:%.c=%.exe)
9512fe850e98fdd448c638ca63fdd92a8a510255ahlEXES += $(SSRCS:%.s=%.exe)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahlROOT_TSTS = $(TSTS:%=$(TSTDIR)/%)
9512fe850e98fdd448c638ca63fdd92a8a510255ahlROOT_EXES = $(EXES:%=$(TSTDIR)/%)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahl$(ROOT_TSTS) := FILEMODE = 0444
9512fe850e98fdd448c638ca63fdd92a8a510255ahl$(ROOT_EXES) := FILEMODE = 0555
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahlall: $(EXES)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahlclean lint:
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahlclobber: FRC
73427c57f824c3ec3b396181b163f37d50c5b3b1ahl -$(RM) $(CSRCS:%.c=%.exe) $(CSRCS:%.c=%.o)
73427c57f824c3ec3b396181b163f37d50c5b3b1ahl -$(RM) $(SSRCS:%.s=%.exe) $(SSRCS:%.s=%.o)
73427c57f824c3ec3b396181b163f37d50c5b3b1ahl -$(RM) $(DSRCS:%.d=%.o)
f3b585ce799a83688c5532c430f6133f098431c2samf -$(RM) $(CLOBBERFILES)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahlinstall: $(ROOT_TSTS) $(ROOT_EXES)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahl$(ROOT_TSTS): $(TSTDIR)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahl$(ROOT_EXES): $(TSTDIR)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahl$(TSTDIR):
9512fe850e98fdd448c638ca63fdd92a8a510255ahl $(INS.dir)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahl$(TSTDIR)/%: %
9512fe850e98fdd448c638ca63fdd92a8a510255ahl $(INS) -s -d -m $(DIRMODE) $(@D)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl $(INS.file)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahl%.exe: %.c
73427c57f824c3ec3b396181b163f37d50c5b3b1ahl $(LINK.c) -o $@ $< $(LDLIBS)
73427c57f824c3ec3b396181b163f37d50c5b3b1ahl $(POST_PROCESS) ; $(STRIP_STABS)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahl%.exe: %.o
73427c57f824c3ec3b396181b163f37d50c5b3b1ahl $(LINK.c) -o $@ $< $(LDLIBS)
73427c57f824c3ec3b396181b163f37d50c5b3b1ahl $(POST_PROCESS) ; $(STRIP_STABS)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahl%.o: %.c
73427c57f824c3ec3b396181b163f37d50c5b3b1ahl $(COMPILE.c) -o $@ $<
73427c57f824c3ec3b396181b163f37d50c5b3b1ahl $(POST_PROCESS_O)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahl%.o: %.s
73427c57f824c3ec3b396181b163f37d50c5b3b1ahl $(COMPILE.s) -o $@ $<
73427c57f824c3ec3b396181b163f37d50c5b3b1ahl $(POST_PROCESS_O)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahlscripts: FRC
9512fe850e98fdd448c638ca63fdd92a8a510255ahl @cd ../cmd/scripts; pwd; $(MAKE) install
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahldstyle: FRC
c7158ae983f5a04c4a998f468ecefba6d23ba721tariq @if [ -n "$(DSRCS)" ]; then $(DSTYLE) $(DSRCS); fi
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahlFRC: