/* ********************************************************************** *\
 *         Copyright IBM Corporation 1988,1991 - All Rights Reserved      *
 *        For full copyright information see:'andrew/config/COPYRITE'     *
\* ********************************************************************** */

/*
	$Disclaimer: This software is part of version 7.2 of the 
* Andrew User Interface System and is the 
* property of IBM, Carnegie Mellon University, 
* and the other copyright holders.  The source 
* code of this version is for the sole use of 
* members of the Andrew Consortium with 
* memberships extending into calendar year 
* 1994.  This source code is not to be distributed 
* to non-members of the consortium nor beyond 
* a fifty-mile radius from the membership address.  
* Binary object code compiled or derived from 
* these sources is not to be distributed to non-
* members.  Members may have additional 
* distribution rights granted by prior written 
* permission of Carnegie Mellon University.
* 
* IBM, CARNEGIE MELLON UNIVERSITY, 
* AND THE OTHER COPYRIGHT HOLDERS
*  DISCLAIM ALL WARRANTIES WITH 
* REGARD TO THIS SOFTWARE, INCLUDING 
* ALL IMPLIED WARRANTIES OF MERCHANT-
* ABILITY AND FITNESS. IN 
* NO EVENT SHALL  IBM, CARNEGIE 
* MELLON UNIVERSITY, OR ANY OTHER 
* COPYRIGHT HOLDER BE LIABLE FOR 
* ANY SPECIAL, INDIRECT OR CONSE-
* QUENTIAL DAMAGES OR ANY DAMAGES 
* WHATSOEVER RESULTING FROM LOSS OF
* USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR
* OTHER TORTIOUS ACTION, ARISING OUT 
* OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*  $
*/


LOCALINCLUDES	=	-I${BASEDIR}/include/ams

#ifdef RESOLVER_ENV
RESOLVER_LIB = ${RESOLVLIB}
#else
RESOLVER_LIB =
#endif /* RESOLVER_ENV */

#ifdef SNAP_ENV
    PRODUCTS 	=	cuin cuis
#else /* SNAP_ENV */
    PRODUCTS 	=	cuin
#endif /* SNAP_ENV */

ANDVOBJS	=	unixmach.o

PCVOBJS	=	pcmach.o

OBJS		=	cui.o cuifns.o ${ANDVOBJS} morprntf.o

LIBS		=	${BASEDIR}/lib/libmail.a $(BASEDIR)/lib/libcparser.a ${BASEDIR}/lib/liberrors.a \
			${MALLOCLIB} ${UTILLIB} ${RESOLVER_LIB}

NOSNAPLIBS	=	${BASEDIR}/lib/libcui.a ${BASEDIR}/lib/libcuin.a \
			${BASEDIR}/lib/libmssrv.a ${BASEDIR}/lib/libmsshr.a \
			${BASEDIR}/lib/libeli.a ${BASEDIR}/lib/librxp.a \
			${LIBS}	${PRSLIB}


#define parameterized_snap_libs(kind_of_snap) \ @@\
	${BASEDIR}/lib/libcui.a \ @@\
	${BASEDIR}/lib/libcuis.a \ @@\
	${BASEDIR}/lib/kind_of_snap.a \ @@\
	${BASEDIR}/lib/libmsshr.a \ @@\
	${BASEDIR}/lib/librxp.a \ @@\
	${LIBS} \

NormalObjectRule()

#ifdef SNAP_ENV
#if defined(USE_MMDF_ENV) || defined(USE_MLD_ENV)
ProgramTarget(cuis, ${OBJS}, parameterized_snap_libs(libsnap), ${NETLIBS} ${SUPLIBS} ${MMDFLIBS}  ${BSDLIB})
#else
ProgramTarget(cuis, ${OBJS}, parameterized_snap_libs(libsnap), ${SUPLIBS} ${NETLIBS}  ${BSDLIB})
#endif
#endif /* SNAP_ENV */
#if defined(USE_MMDF_ENV) || defined(USE_MLD_ENV)
ProgramTarget(cuin, ${OBJS}, ${NOSNAPLIBS}, ${NETLIBS} ${SUPLIBS} ${MMDFLIBS}  ${BSDLIB})
#else
ProgramTarget(cuin, ${OBJS}, ${NOSNAPLIBS}, ${SUPLIBS} ${NETLIBS} ${BSDLIB})
#endif

InstallMultiple(${PRODUCTS}, $(INSTPROGFLAGS), ${DESTDIR}/bin)
InstallLink(cuin, $(DESTDIR)/bin/cui)
DependTarget()

NormalHelpRule()
InstallDocs(cuiclss.help cuicust.help cuiedit.help cuixprt.help cuifltr.help cuipref.help cuiqr.help cuiwiz.help cui.help cui.tutr, ${DESTDIR}/help)
InstallHelpAlias(cuiclss, cui-classification)
InstallHelpAlias(cuicust, cui-customization)
InstallHelpAlias(cuiedit, cui-edit)
InstallHelpAlias(cuixprt, cui-expert)
InstallHelpAlias(cuifltr, cui-filtering cui-filter)
InstallHelpAlias(cuipref, cui-preferences)
InstallHelpAlias(cuiqr, cui-quickref)
InstallHelpAlias(cuiwiz, cui-wizard)
InstallHelpAlias(cui, cui-novice)
