Makefile.com revision 9512fe850e98fdd448c638ca63fdd92a8a510255
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#
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl# Use is subject to license terms.
9512fe850e98fdd448c638ca63fdd92a8a510255ahl#
9512fe850e98fdd448c638ca63fdd92a8a510255ahl#ident "%Z%%M% %I% %E% SMI"
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahlinclude $(SRC)/Makefile.master
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
9512fe850e98fdd448c638ca63fdd92a8a510255ahl rm -f $(CSRCS:%.c=%.exe) $(CSRCS:%.c=%.o)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl rm -f $(SSRCS:%.s=%.exe) $(SSRCS:%.s=%.o)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl rm -f $(DSRC:%.d=%.o)
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
9512fe850e98fdd448c638ca63fdd92a8a510255ahl $(LINK.c) -o $@ $< $(LIBS)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahl%.exe: %.o
9512fe850e98fdd448c638ca63fdd92a8a510255ahl $(CC) -o $@ $< $(LIBS)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahl%.o: %.c
9512fe850e98fdd448c638ca63fdd92a8a510255ahl $(COMPILE.c) -o $@ $< $(LIBS)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahl%.o: %.s
9512fe850e98fdd448c638ca63fdd92a8a510255ahl $(AS) $(ASFLAGS) -o $@ $< $(LIBS)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahlscripts: FRC
9512fe850e98fdd448c638ca63fdd92a8a510255ahl @cd ../cmd/scripts; pwd; $(MAKE) install
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahldstyle: FRC
9512fe850e98fdd448c638ca63fdd92a8a510255ahl @$(DSTYLE) $(DSRCS)
9512fe850e98fdd448c638ca63fdd92a8a510255ahl
9512fe850e98fdd448c638ca63fdd92a8a510255ahlFRC: