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

/*
	$Disclaimer: 
*Permission to use, copy, modify, and distribute this software and its 
*documentation for any purpose is hereby granted without fee, 
*provided that the above copyright notice appear in all copies and that 
*both that copyright notice, this permission notice, and the following 
*disclaimer appear in supporting documentation, and that the names of 
*IBM, Carnegie Mellon University, and other copyright holders, not be 
*used in advertising or publicity pertaining to distribution of the software 
*without specific, written prior permission.
*
*IBM, CARNEGIE MELLON UNIVERSITY, AND THE OTHER COPYRIGHT HOLDERS 
*DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 
*ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO EVENT 
*SHALL IBM, CARNEGIE MELLON UNIVERSITY, OR ANY OTHER COPYRIGHT HOLDER 
*BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL 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.
* $
*/


#define IHaveSubdirs 

SUBDIRS = samples

#ifdef WHITEPAGES_ENV
WHITEPAGESFILES =  btcreate.o btr.o btr1.o btr2.o btr3.o btr4.o btstat.o btw.o btwp.o \
	getcpw.o gtvpwent.o gtvpwkey.o gtvpwnam.o gtvpwuid.o getvuid.o  \
	wpbase.o wpcbase.o wpcgen.o wpcname.o wpfuzz.o wpgen.o wpname.o wpstat.o
#else /* WHITEPAGES_ENV */
WHITEPAGESFILES =
#endif /* WHITEPAGES_ENV */

XCOMM this section commented out while I figure out how to get at the config dir from here.
XCOMM CONFIGDIR =/afs/cs.cmu.edu/project/itc/pmax_ul4/obj/projects/andrew/config/
XCOMM SYSPREFIX=SYS_
XCOMM OPSYSPREFIX=OPSYS
XCOMM systypes.c:
XCOMM	(grep $(OPSYSPREFIX)NAME $(CONFIGDIR)*/system.h;grep $(SYSPREFIX)NAME #$(CONFIGDIR)*/system.h)|sort -u -d +2|awk -f systypes.awk>systypes.c

#ifdef SCOunix
OBJS = abbrpath.o alquery.o andrwdir.o \
	andydir.o cellauth.o cawp.o config.o \
	desym.o errhdlr.o \
	fdplumb.o fdplumb2.o fdplumb3.o \
	fdplumb4.o fdplumb5.o fdplumb6.o \
	foldedeq.o fpacheck.o gtime.o fselect.o \
	fwrtallc.o getaddr.o gethome.o getla.o \
	getmyhom.o getpty.o hname.o lcappend.o lineprom.o \
	localdir.o newstr.o nicetime.o pause.o\
	procstuf.o profile.o readlink.o svcconf.o \
	setprof.o t2open.o tfail.o thiscell.o times.o \
	titles.o tokpak.o tokunpak.o topen.o \
	uerror.o ulsindex.o ulstlmat.o ulstrcmp.o \
	usignal.o vclose.o venusop.o /* verbose.o: obsolete since it cannot be ported to ANSI C */  \
	writeall.o osasm.o unscribe.o \
	encode.o system.o xbasedir.o
XCOMM systypes.o
#else
OBJS = abbrpath.o alquery.o andrwdir.o \
	andydir.o cellauth.o cawp.o config.o \
	desym.o errhdlr.o \
	fdplumb.o fdplumb2.o fdplumb3.o \
	fdplumb4.o fdplumb5.o fdplumb6.o \
	foldedeq.o fpacheck.o gtime.o fselect.o\
	fwrtallc.o getaddr.o gethome.o getla.o \
	getmyhom.o getpty.o hname.o lcappend.o lineprom.o \
	localdir.o newstr.o nicetime.o pause.o\
	procstuf.o profile.o readlink.o svcconf.o \
	setprof.o t2open.o tfail.o thiscell.o times.o \
	titles.o tokpak.o tokunpak.o topen.o \
	uerror.o ulsindex.o ulstlmat.o ulstrcmp.o \
	usignal.o vclose.o venusop.o /* verbose.o: obsolete since it cannot be ported to ANSI C */ \
	writeall.o unscribe.o encode.o system.o xbasedir.o
XCOMM systypes.o
#endif /* SCOunix */

AFS_OBJS =  lcstring.o ucstring.o

DependTarget()

NormalObjectRule()
LibraryTarget(libutil.a, $(OBJS) ${WHITEPAGESFILES})
InstallLibrary(libutil.a, $(DESTDIR)/lib)

LibraryTarget(libafs.a, $(AFS_OBJS))
InstallLibrary(libafs.a, $(DESTDIR)/lib)

    TESTLIBS = ${UTILLIB} ${MALLOCLIB} ${PRSLIB}
TestingOnlyTestingRule(${TESTLIBS}, ${BSDLIB})

NormalHelpRule()
InstallFile(global.prf, $(INSTINCFLAGS), ${DESTDIR}/lib)
InstallDocs(setup.help prefs.help prefs.tutr, ${DESTDIR}/help)
InstallFileToFile(setup.help, $(INSTINCFLAGS), ${DESTDIR}/doc/SetUp.ref)
#ifdef WHITEPAGES_ENV
InstallDocs(wp.help, ${DESTDIR}/help)
InstallDocs(WP.ins WP.ovr WP.pgr WP.adm, ${DESTDIR}/doc/ams)
InstallHelpAlias(wp, whitepages white_pages white-pages)
#endif
InstallHelpAlias(setup, andrewsetup andrew.setup andrew-setup)
InstallHelpAlias(prefs, preferences ams-preferences messages-preferences ms-preferences preference customize customizing customization default borderstyle)
