#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
# Copyright 2001 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# @(#)Makefile 1.28 06/12/12
#

TOP	= ../../..

SUBDIRS	= lib cmd help.d
install	:= SUBDIRS =

include $(TOP)/recurse.Makefile

OWN	= bin
GRP	= bin
LDLIBS	=
LINT	= lint
LINTFLAGS =
CMDBASE	= ../..
INS	= $(CMDBASE)/install/install.sh
CCSBIN	= $(DESTDIR)/usr/ccs/bin
XPG4BIN	= $(DESTDIR)/usr/xpg4/bin
INSDIR	= $(CCSBIN)
INSXPG4 = $(XPG4BIN)
CCSLIB	= $(DESTDIR)/usr/lib
HELPLIB	= $(CCSLIB)/help
LINK_MODE =
AR	= ar
LORDER	= lorder
TSORT	= tsort

ARCHCFLAGS:sh=if [ `uname -p` = 'ppc' ]; then echo '-xchar=s'; else echo ; fi
CFLAGS	+= $(ARCHCFLAGS)

ENVPARMS = OWN="$(OWN)" GRP="$(GRP)" CC="$(CC)" \
	CFLAGS="$(CFLAGS)" LDLIBS="$(LDLIBS)" LINT="$(LINT)" INS="$(INS)" \
	LINTFLAGS="$(LINTFLAGS)" INSDIR="$(INSDIR)" INSXPG4="$(INSXPG4)" \
	STRIPFLAG="$(STRIPFLAG)" CCSBIN="$(CCSBIN)" CCSLIB="$(CCSLIB)" \
	HELPLIB="$(HELPLIB)" LINK_MODE="$(LINK_MODE)" XPG4BIN="$(XPG4BIN)" \
	MAKE="$(MAKE)" AR="$(AR)" LORDER="$(LORDER)" TSORT="$(TSORT)" \
	CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)"

install_codemgr: lib
	cd cmd; $(MAKE) DESTDIR=$(DESTDIR) $(ENVPARMS) install_codemgr

get_only: lib
	cd cmd; $(MAKE) DESTDIR=$(DESTDIR) $(ENVPARMS) get_only

