Makefile revision 24da5b34f49324ed742a340010ed5bd3d4e06625
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# CDDL HEADER START
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# The contents of this file are subject to the terms of the
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# Common Development and Distribution License (the "License").
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# You may not use this file except in compliance with the License.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# or http://www.opensolaris.org/os/licensing.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# See the License for the specific language governing permissions
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# and limitations under the License.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# When distributing Covered Code, include this CDDL HEADER in each
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# If applicable, add the following below this CDDL HEADER, with the
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# fields enclosed by brackets "[]" replaced with your own identifying
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# information: Portions Copyright [yyyy] [name of copyright owner]
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# CDDL HEADER END
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# Use is subject to license terms.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# ident "%Z%%M% %I% %E% SMI"
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar#
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod GunjikarPROG = cw
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod GunjikarMAN1FILES= cw.1
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarinclude ../Makefile.tools
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# Bootstrap problem -- we have to build cw before we can use it
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikari386_CC= $(SPRO_VROOT)/bin/cc
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarsparc_CC= $(SPRO_VROOT)/bin/cc
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar$(__GNUC)i386_CC= $(GNU_ROOT)/bin/gcc
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar$(__GNUC)sparc_CC= $(GNU_ROOT)/bin/gcc
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod GunjikarCFLAGS += $(CCVERBOSE)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# Override CFLAGS when building with gcc. This is needed only for bootstrap
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar# of cw.
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar$(__GNUC)CFLAGS= -O -D__sun -Wall -Wno-unknown-pragmas -Werror \
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar -std=gnu89 -nodefaultlibs
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar$(__GNUC)LDLIBS += -lc
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar$(__GNUC)LDFLAGS= $(MAPFILE.NES:%=-Wl,-M%)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod GunjikarCPPFLAGS += -DDEFAULT_CC_DIR='"$(SPRO_VROOT)/bin"'
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod GunjikarCPPFLAGS += -DDEFAULT_GCC_DIR='"$(GNU_ROOT)/bin"'
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod GunjikarCPPFLAGS += -DDEFAULT_CPLUSPLUS_DIR='"$(SPRO_VROOT)/bin"'
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod GunjikarCPPFLAGS += -DDEFAULT_GPLUSPLUS_DIR='"$(GNU_ROOT)/bin"'
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar$(ROOTONBLDMAN1FILES) := FILEMODE= 644
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar.KEEP_STATE:
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarall: $(PROG) $(MAN1FILES)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarinstall: all .WAIT $(ROOTONBLDMACHPROG) $(ROOTONBLDMAN1FILES)
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarlint: lint_PROG
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarclean:
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikarinclude ../Makefile.targ
c39526b769298791ff5b0b6c5e761f49aabaeb4ePramod Gunjikar