#
# Copyright (c) 1991 The Regents of the University of California.
# All rights reserved.
#
# Redistribution and use in source and binary forms are permitted provided
# that: (1) source distributions retain this entire copyright notice and
# comment, and (2) distributions including binaries display the following
# acknowledgement:  ``This product includes software developed by the
# University of California, Berkeley and its contributors'' in the
# documentation or other materials provided with the distribution and in
# all advertising materials mentioning features or use of this software.
# Neither the name of the University nor the names of its contributors may
# be used to endorse or promote products derived from this software without
# specific prior written permission.
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
#	@(#)Config.generic	5.5 (Berkeley) 3/1/91
#

# This is the configuration file for building all of
# telnet/telnetd/libtelnet.  If you want to add your
# own local configuration for a specific machine that
# is already listed here, it is best to create a new
# file called "Config.local", and put the definitions
# there.  If you are adding definitions for a new system
# type, you can add them here.  In this case, please send
# the new definition, and any changes you have to make to
# the code, back to "dab@cray.com" so that your changes
# can be put into the next release.
#
# Each definition must have the form:
#
#	<target>:
#		make -f Makefile.generic ${WHAT} \
#			<definitions>

# DEFINES=
#
#    Variables to be defined when actually compiling the source.  Defined
#    as: DEFINES="-D<var> -D<var2> ... -D<varn>"
#
#    TELNET/TELNETD CONFIGURATION
#
# 	LINEMODE	Turns on support in telnetd for the linemode option.
#			(Linemode is always on in the client).
#
#	KLUDGELINEMODE	Define this to get the kludged up version of linemode
#			that was in 4.3BSD.  This is a good thing to have
#			around for talking to older systems.  This has no
#			effect on telnetd if LINEMODE has not been defined.
#
#	DIAGNOSTICS	Turns on diagnostic code in telnetd; adds extra
#			logic and checks, and debuging output if started
#			with the -D option.
#
#	NO_URGENT	Define this if you don't want telnetd to send
#			IAC DM in urgent mode when the pty output queue
#			is flushed.
#
#	GENERATE_GA	Turns on code to allow the generation of Go Ahead(GA)
#			if the server is WONT SGA.  This code is imprecise,
#			it generates the GA when two seconds have elapsed
#			and no input or output has occurred.
#
#	AUTHENTICATION	Enable the AUTHENTICATION option.
#
#	ENCRYPTION	Enable the ENCRYPT option.
#
#	SRP		Enable SRP authentication code in
#			libtelnet/libtelnet.a
#
#	KRB4		Enable Kerberos Version 4 Authentication code
#			in libtelnet/libtelnet.a
#
#	KRB5		Enable Kerberos Version 5 Authentication code
#			in libtelnet/libtelnet.a
#
#	SPX		Enable SPX authentication code in.
#			libtelnet/libtelnet.a
#
#	RSA_ENCPWD
#
#	KRB4_ENCPWD
#
#
#	DES_ENCRYPTION	Enable DES encryption/decryption, requires
#			getting a the initial key from Kerberos.  This
#			works with both Kerberos Version 4 and 5.
#
#	ENV_HACK	Turn on code to recognize and allow
#			interoperability with systems that have their
#			definitions for ENV_VALUE and ENV_VAR reversed.
#
#    LOCAL SYSTEM PARAMATERS
#
#	TERMCAP		Define this if your system is termcap based,
#			otherwise a terminfo based system is assumed.
#
#	SYSV_TERMIO	Use the System V termio structure. (implies USE_TERMIO)
#
#	NO_CC_T		Define this if your termio.h file does not have
#			a typedef for cc_t.
#
#	USE_TERMIO	Define this if you have the POSIX termios structures.
#			This code works under the BSD 4.4 terminal driver.
#
#	HAS_GETTOS	Define this if you have the setsockopt() option for
#			setting the IP Type Of Service bits, (IP_TOS) and
#			you have the gettosbyname() function.
#
#	NEWINIT		Turns on the new init code for UNICOS systems.
#
#	STREAMS		This system needs <sys/stream.h> for <sys/tty.h>
#			(Sun 4.0.3)
#
#	FILIO_H		This system should use <sys/fileo.h> instead
#			of <sys/ioctl.h> (Sun 4.0.3)
#
#	HAVE_fd_set	This system has a typedef for fd_set, but does
#			not have FDSET() defined.
#
#	NO_STRING_H	If you don't have <string.h>, but have <strings.h>
#
#	NO_LOGIN_P	If /bin/login doesn't understand the "-p"
#			(preserve environment) option.
#
#	LOGIN_ARGS	if /bin/login understands environment variables
#			after the login name.  Only used if NO_LOGIN_P
#			is defined.
#
#	NO_LOGIN_F	If /bin/login doesn't understand the "-f" option.
#			Only used if AUTHENTICATION is defined.
#
#	LOGIN_R		This says that /bin/login understands the "-r host"
#			option.  Only used if NO_LOGIN_F is defined (and
#			the system supports the TIOCSTI ioctl).
#
#	LOGIN_HOST	Only applies if LOGIN_R is defined.  This
#			specifies the hostname to be passed to "login -r"
#			for successfully authenticated logins.  This
#			defaults to "localhost" (don't forget to include
#			the quotes, e.g. -DLOGIN_HOST=\"localhost\").
#
#			It can also be set to host (-DLOGIN_HOST=host)
#			to have the real hostname passed to "/bin/login -r".
#			  NOTE: If you do this, then anyone that wants to
#				allow authenticated login access will have
#				to add those remote hosts to their .rhosts,
#				which sort of defeats the whole purpose of
#				authenticated login... 
#
#	NO_BSD_SETJMP	For UNICOS releases prior to 7.0.  Turns off
#			the inclusion of <bsdsetjmp.h>.
#
#	STREAMS		If the system has streams; causes <sys/stream.h>
#			to be included instead of <sys/tty.h>
#
#	MUST_ALIGN	If !KRB & !HAVE_KRB4_DES_LIB and your words
#			must be word aligned.
#
#	STREAMSPTY	Use /dev/ptmx to get a clean pty.  Uses
#			streams packet mode rather than Berkeley.
#			Appropriate for SVr4 derivatives.
#
#	UTMPX		System has /etc/utmpx as well as /etc/utmp.
#			Use makeutx and modutx to update utmp/x and wtmp/x.
#			Appropriate for SVr4 derivatives.
#
#	HAS_CGETENT	If your system has the cgetent() and cgetstr()
#			routines.  This is a 4.4BSD feature, that
#			eliminates grabbing the getty gettytab.c source.
#			You need to include getent.o on the LIB_OBJ
#			line if this is defined.
#
#	OLD_ENVIRON	Support for the old environment option.
#
#	NO_MKTIME	If you don't have mktime().
#
#	BIG_ENDIAN	Specifies machine byte-ordering; BIG_ENDIAN
#	LITTLE_ENDIAN	means MSB first, LITTLE_ENDIAN means LSB first.

# LIB_OBJ=
#    This is a list of object files that are needed but are not in
#    the standard C library.
#
# 	    strcasecmp.o	If you don't have strncasecmp(3)
#	    strdup.o		If you don't have strdup(3)
#	    setenv.o		If you don't have setenv(3) and unsetenv(3)
#	    setsid.o		If you don't have the POSIX setsid() call
#	    strerror.o		If you don't have strerror(3)
#	    strftime.o		If you don't have strftime(3)
#	    getopt.o		If you don't have getopt(3)
#	    herror.o		If you don't have herror(3)
#	    gettytab.o		If you can get gettytab.c from getty source.
#	    getent.o		If you can't get gettytab.c (or have
#				HAS_CGETENT defined...)
#	    mem.o		If you don't have mem*(3) routines.
#				(including memmove())

# LIB_SRC=
#    This is a list of source modules for specificed in LIB_OBJ.
#    This information is used by make for checking dependencies.


# LIBS=
#    This is a list of libraries to be included.  This will always
#    include the telnet library, and will also include either -lcurses
#    or -ltermcap, -lutil for 4.4bsd, and -lnet for UNICOS5.0 and earlier.
#    Also -lkrb & -ldes if Kerberos.

# LIBPATH=
#    This is a list of the paths to all the libraries listed in LIBS.
#    This information is used by make for checking dependencies.
#    Don't forget libc.a

# VPATH=
#    Directory where gettytab.c can be found, if you have it.

# LIBEXEC=
#    Directory where the telnetd executable should be installed.

# LCCFLAGS=
#    Local flags for ${CC} (like -O)

# AR=
#    Name of "ar" program, usually just "ar".

# ARFLAGS
#    Flags to pass to ${AR}

# RANLIB
#    Name of "ranlib" program, set it to "NONE" if you don't
#    have a "ranlib".

all:
	@echo "You must specify what type of system you are on,"
	@echo "or setup a Config.local file for your system."
	@echo "Known system types are:"
	@echo
	@echo " 4.4bsd 4.3reno 4.4bsd.auth 4.3reno.auth 4.3tahoe 4.3bsd"
	@echo " bsdi1.0 bsdi1.0.auth bsdi2.0 bsdi2.0.srp bsdi2.0.srp.enc"
	@echo " unicos9.0 unicos8.3 unicos8.0 unicos7.C unicos7.0 unicos6.1"
	@echo " unicos9.0.auth unicos8.3.auth unicos8.0.auth unicos7.0.auth"
	@echo " unicos7.C.auth unicos7.0.des.auth"
	@echo " sun3.5 sun4.0.3c sun4.0 sun4.1 sun4.1.auth sun4.1.srp.enc"
	@echo " solaris2.2 solaris2.2.auth"
	@echo " solaris2.5 solaris2.5.srp solaris2.5.srp.enc"
	@echo " solarisx86 solarisx86.srp.enc"
	@echo " dynix3.0.12 dynix3.0.17"
	@echo " ultrix3.1 ultrix4.0 ultrix4.1 ultrix4.3 ultrix4.3.auth"
	@echo " irix4.0.1 irix5.4 irix5.4.srp irix5.4.srp.enc"
	@echo " osf2.0 osf2.0.srp osf2.0.srp.enc"
	@echo " linux2 linux2.srp.enc"
	@echo " hpux8.0"
	@echo " next1.0"
	@echo " convex"

4.4bsd:
	make -f Makefile.generic ${WHAT} \
		LIBS="-lutil -ltermcap ../libtelnet/libtelnet.a ${AUTH_LIB}" \
		LIBPATH="/usr/lib/libc.a /usr/lib/libtermcap.a \
				../libtelnet/libtelnet.a ${AUTH_LIBPATH}" \
		DEST=${DESTDIR}/usr/bin \
		DEFINES=${ODEFS}"-DLINEMODE -DTERMCAP -DKLUDGELINEMODE \
		    -DDEFAULT_IM='\"\r\n4.4 BSD UNIX (%h) (%t)\r\n\r\r\n\r\"' \
			-DUSE_TERMIO -DDIAGNOSTICS -DENV_HACK -DOLD_ENVIRON \
			-DHAS_CGETENT ${AUTH_DEF}" \
		INCLUDES="-I.. ${AUTH_INC}" \
		LIB_OBJ="getent.o" \
		LIB_SRC="getent.c" \
		AR=ar ARFLAGS=cq RANLIB=ranlib \
		LIBEXEC=${DESTDIR}/usr/libexec \
		CC="${CC}" LCCFLAGS="-O"

4.3reno:
	make -f Makefile.generic ${WHAT} \
		LIBS="-lutil -ltermcap ../libtelnet/libtelnet.a ${AUTH_LIB}" \
		LIBPATH="/lib/libc.a /usr/lib/libtermcap.a \
				../libtelnet/libtelnet.a ${AUTH_LIBPATH}" \
		DEST=${DESTDIR}/usr/bin \
		DEFINES=${ODEFS}"-DLINEMODE -DTERMCAP -DKLUDGELINEMODE \
	-DDEFAULT_IM='\"\r\n4.3BSD-Reno UNIX (%h) (%t)\r\n\r\r\n\r\"' \
			-DUSE_TERMIO -DDIAGNOSTICS -DENV_HACK \
			-DOLD_ENVIRON ${AUTH_DEF}" \
		INCLUDES="-I.. ${AUTH_INC}" \
		LIB_OBJ="gettytab.o" \
		LIB_SRC="gettytab.c" \
		AR=ar ARFLAGS=cq RANLIB=ranlib \
		VPATH=/usr/src/libexec/getty \
		LIBEXEC=${DESTDIR}/usr/libexec \
		CC="${CC}" LCCFLAGS="-O"


4.4bsd.auth 4.3reno.auth:
	make -f ../Config.generic `basename $@ .auth` WHAT=${WHAT} \
		AUTH_LIB="-lkrb -ldes" \
		AUTH_LIBPATH="/usr/lib/libkrb.a /usr/lib/libdes.a" \
		AUTH_DEF="-DAUTHENTICATION -DENCRYPTION \
			-DKRB4 -DDES_ENCRYPTION" \
		AUTH_INC=-I/usr/include/kerberosIV

4.3tahoe:
	@echo $@ is untested... it may or may not work..."
	make -f Makefile.generic ${WHAT} \
		LIBS="-ltermcap ../libtelnet/libtelnet.a" \
		LIBPATH="/lib/libc.a /usr/lib/libtermcap.a \
				../libtelnet/libtelnet.a" \
		DEST=${DESTDIR}/usr/bin \
		DEFINES=${ODEFS}"-DTERMCAP -DKLUDGELINEMODE \
		 -DDEFAULT_IM='\"\r\n4.3BSD-Tahoe UNIX (%h) (%t)\r\n\r\r\n\r\"'\
			-DDIAGNOSTICS -DENV_HACK -DOLD_ENVIRON" \
		INCLUDES="-I.." \
		LIB_OBJ="strdup.o setsid.o strftime.o gettytab.o" \
		LIB_SRC="strdup.c setsid.c strftime.c gettytab.c" \
		AR=ar ARFLAGS=cq RANLIB=ranlib \
		VPATH=/usr/src/etc/getty \
		LIBEXEC=${DESTDIR}/etc \
		CC="${CC}" LCCFLAGS="-O"

4.3bsd:
	@echo $@ is untested... it may or may not work..."
	make -f Makefile.generic ${WHAT} \
		LIBS="-ltermcap ../libtelnet/libtelnet.a" \
		LIBPATH="/lib/libc.a /usr/lib/libtermcap.a \
				../libtelnet/libtelnet.a" \
		DEST=${DESTDIR}/usr/bin \
		DEFINES=${ODEFS}"-DTERMCAP -DKLUDGELINEMODE \
		    -DDEFAULT_IM='\"\r\n4.3BSD UNIX (%h) (%t)\r\n\r\r\n\r\"' \
			-DDIAGNOSTICS -DENV_HACK -DOLD_ENVIRON" \
		INCLUDES="-I.." \
		LIB_OBJ="strdup.o setsid.o strftime.o \
			gettytab.o getopt.o herror.o" \
		LIB_SRC="strdup.c setsid.c strftime.c \
			gettytab.c getopt.c herror.c" \
		AR=ar ARFLAGS=cq RANLIB=ranlib \
		VPATH=/usr/src/etc/getty \
		LIBEXEC=${DESTDIR}/etc \
		CC="${CC}" LCCFLAGS="-O"

bsdi2.0:
	make -f Makefile.generic ${WHAT} \
		LIBS="-lutil -ltermcap ../libtelnet/libtelnet.a ${AUTH_LIB}" \
		LIBPATH="/lib/libc.a /usr/lib/libtermcap.a \
			../libtelnet/libtelnet.a ${AUTH_LIBPATH}" \
		DEST=${DESTDIR}/usr/bin \
		DEFINES=${ODEFS}"-DLINEMODE -DTERMCAP -DKLUDGELINEMODE \
	-DDEFAULT_IM='\"\r\nBSDI BSD/OS 2.0 (%h) (%t)\r\n\r\r\n\r\"' \
			-DUSE_TERMIO -DDIAGNOSTICS -DENV_HACK \
			-DOLD_ENVIRON ${AUTH_DEF} -DHAS_CGETENT" \
		INCLUDES="-I.. ${AUTH_INC}" \
		LIB_OBJ="getent.o" \
		LIB_SRC="getent.c" \
		AR=ar ARFLAGS=cq RANLIB=ranlib \
		LIBEXEC=${DESTDIR}/usr/libexec \
		CC="${CC}" LCCFLAGS="-O"

bsdi2.0.auth:                   
	make -f ../Config.generic `basename $@ .auth` WHAT=${WHAT} \
		AUTH_LIB="-lkrb -ldes" \
		AUTH_LIBPATH="/usr/lib/libkrb.a /usr/lib/libdes.a" \
		AUTH_DEF="-DAUTHENTICATION -DENCRYPTION \
			-DKRB4 -DDES_ENCRYPTION" \
		AUTH_INC=-I/usr/include/kerberosIV

bsdi2.0.srp:
	make -f ../Config.generic `basename $@ .srp` WHAT=${WHAT} \
		AUTH_LIB="-L../../lib -lsrp -lgmp" \
		AUTH_LIBPATH=""\
		AUTH_INC="-I../../include"\
		AUTH_DEF="-DAUTHENTICATION -DSRP -DTJW"

bsdi2.0.srp.enc:
	make -f ../Config.generic `basename $@ .srp.enc` WHAT=${WHAT} \
		AUTH_LIB="-L../../lib -lsrp -lgmp -ldes" \
		AUTH_LIBPATH=""\
		AUTH_INC="-I../../include"\
		AUTH_DEF="-DAUTHENTICATION -DSRP -DENCRYPTION -DDES_ENCRYPTION \
				-DCAST_ENCRYPTION -DLITTLE_ENDIAN -DTJW"

bsdi1.1:
	make -f Makefile.generic ${WHAT} \
		LIBS="-lutil -ltermcap ../libtelnet/libtelnet.a ${AUTH_LIB}" \
		LIBPATH="/lib/libc.a /usr/lib/libtermcap.a \
			../libtelnet/libtelnet.a ${AUTH_LIBPATH}" \
		DEST=${DESTDIR}/usr/bin \
		DEFINES=${ODEFS}"-DLINEMODE -DTERMCAP -DKLUDGELINEMODE \
	-DDEFAULT_IM='\"\r\nBSDI BSD/386 1.1 (%h) (%t)\r\n\r\r\n\r\"' \
			-DUSE_TERMIO -DDIAGNOSTICS -DENV_HACK \
			-DOLD_ENVIRON ${AUTH_DEF}" \
		INCLUDES="-I.. ${AUTH_INC}" \
		LIB_OBJ="gettytab.o" \
		LIB_SRC="gettytab.c" \
		AR=ar ARFLAGS=cq RANLIB=ranlib \
		VPATH=/usr/src/libexec/getty \
		LIBEXEC=${DESTDIR}/usr/libexec \
		CC="${CC}" LCCFLAGS="-O"

bsdi1.1.auth:                   
	make -f ../Config.generic `basename $@ .auth` WHAT=${WHAT} \
		AUTH_LIB="-lkrb -ldes" \
		AUTH_LIBPATH="/usr/lib/libkrb.a /usr/lib/libdes.a" \
		AUTH_DEF="-DAUTHENTICATION -DENCRYPTION \
			-DKRB4 -DDES_ENCRYPTION" \
		AUTH_INC=-I/usr/include/kerberosIV

bsdi1.0:
	make -f Makefile.generic ${WHAT} \
		LIBS="-lutil -ltermcap ../libtelnet/libtelnet.a ${AUTH_LIB}" \
		LIBPATH="/lib/libc.a /usr/lib/libtermcap.a \
			../libtelnet/libtelnet.a ${AUTH_LIBPATH}" \
		DEST=${DESTDIR}/usr/bin \
		DEFINES=${ODEFS}"-DLINEMODE -DTERMCAP -DKLUDGELINEMODE \
	-DDEFAULT_IM='\"\r\nBSDI BSD/386 1.0 (%h) (%t)\r\n\r\r\n\r\"' \
			-DUSE_TERMIO -DDIAGNOSTICS -DENV_HACK \
			-DOLD_ENVIRON ${AUTH_DEF}" \
		INCLUDES="-I.. ${AUTH_INC}" \
		LIB_OBJ="gettytab.o" \
		LIB_SRC="gettytab.c" \
		AR=ar ARFLAGS=cq RANLIB=ranlib \
		VPATH=/usr/src/libexec/getty \
		LIBEXEC=${DESTDIR}/usr/libexec \
		CC="${CC}" LCCFLAGS="-O"

bsdi1.0.auth:
	make -f ../Config.generic `basename $@ .auth` WHAT=${WHAT} \
		AUTH_LIB="-lkrb -ldes" \
		AUTH_LIBPATH="/usr/lib/libkrb.a /usr/lib/libdes.a" \
		AUTH_DEF="-DAUTHENTICATION -DENCRYPTION \
			-DKRB4 -DDES_ENCRYPTION"
		AUTH_INC=-I/usr/include/kerberosIV

unicos9.1:
	make -f Makefile.generic ${WHAT} \
		LIBS="-lcurses -L../libtelnet -ltelnet ${AUTH_LIB}" \
		LIBPATH="/lib/libc.a /usr/lib/libcurses.a \
				../libtelnet/libtelnet.a ${AUTH_LIBPATH}" \
		DEST=${DESTDIR}/usr/ucb \
		DEFINES=${ODEFS}"-Dvfork=fork -Dsignal=bsdsignal \
			-DLINEMODE -DKLUDGELINEMODE \
			-DSYSV_TERMIO -DHAS_GETTOS ${AUTH_DEF} \
		  -DDEFAULT_IM='\"\r\nCray UNICOS 9.1 (%h) (%t)\r\n\r\r\n\r\"' \
			-DDIAGNOSTICS -DENV_HACK -DOLD_ENVIRON" \
		AR=bld ARFLAGS=cq RANLIB=NONE \
		LIBEXEC=${DESTDIR}/etc \
		INCLUDES="-I.. ${AUTH_INC}" \
		LIB_OBJ="getent.o" \
		LIB_SRC="getent.c" \
		CC="${CC}" LCCFLAGS="-O"

unicos9.0:
	make -f Makefile.generic ${WHAT} \
		LIBS="-lcurses -L../libtelnet -ltelnet ${AUTH_LIB}" \
		LIBPATH="/lib/libc.a /usr/lib/libcurses.a \
				../libtelnet/libtelnet.a ${AUTH_LIBPATH}" \
		DEST=${DESTDIR}/usr/ucb \
		DEFINES=${ODEFS}"-Dvfork=fork -Dsignal=bsdsignal \
			-DLINEMODE -DKLUDGELINEMODE \
			-DSYSV_TERMIO -DHAS_GETTOS ${AUTH_DEF} \
		  -DDEFAULT_IM='\"\r\nCray UNICOS 9.0 (%h) (%t)\r\n\r\r\n\r\"' \
			-DDIAGNOSTICS -DENV_HACK -DOLD_ENVIRON" \
		AR=bld ARFLAGS=cq RANLIB=NONE \
		LIBEXEC=${DESTDIR}/etc \
		INCLUDES="-I.. ${AUTH_INC}" \
		LIB_OBJ="getent.o" \
		LIB_SRC="getent.c" \
		CC="${CC}" LCCFLAGS="-O"

unicos8.3:
	make -f Makefile.generic ${WHAT} \
		LIBS="-lcurses -L../libtelnet -ltelnet ${AUTH_LIB}" \
		LIBPATH="/lib/libc.a /usr/lib/libcurses.a \
				../libtelnet/libtelnet.a ${AUTH_LIBPATH}" \
		DEST=${DESTDIR}/usr/ucb \
		DEFINES=${ODEFS}"-Dvfork=fork -Dsignal=bsdsignal \
			-DLINEMODE -DKLUDGELINEMODE \
			-DSYSV_TERMIO -DHAS_GETTOS ${AUTH_DEF} \
		  -DDEFAULT_IM='\"\r\nCray UNICOS 8.3 (%h) (%t)\r\n\r\r\n\r\"' \
			-DDIAGNOSTICS -DENV_HACK -DOLD_ENVIRON" \
		AR=bld ARFLAGS=cq RANLIB=NONE \
		LIBEXEC=${DESTDIR}/etc \
		INCLUDES="-I.. ${AUTH_INC}" \
		LIB_OBJ="getent.o" \
		LIB_SRC="getent.c" \
		CC="${CC}" LCCFLAGS="-O"

unicos8.0:
	make -f Makefile.generic ${WHAT} \
		LIBS="-lcurses -L../libtelnet -ltelnet ${AUTH_LIB}" \
		LIBPATH="/lib/libc.a /usr/lib/libcurses.a \
				../libtelnet/libtelnet.a ${AUTH_LIBPATH}" \
		DEST=${DESTDIR}/usr/ucb \
		DEFINES=${ODEFS}"-Dvfork=fork -Dsignal=bsdsignal \
			-DLINEMODE -DKLUDGELINEMODE \
			-DSYSV_TERMIO -DHAS_GETTOS ${AUTH_DEF} \
		  -DDEFAULT_IM='\"\r\nCray UNICOS 8.0 (%h) (%t)\r\n\r\r\n\r\"' \
			-DDIAGNOSTICS -DENV_HACK -DOLD_ENVIRON" \
		AR=bld ARFLAGS=cq RANLIB=NONE \
		LIBEXEC=${DESTDIR}/etc \
		INCLUDES="-I.. ${AUTH_INC}" \
		LIB_OBJ="getent.o" \
		LIB_SRC="getent.c" \
		CC="${CC}" LCCFLAGS="-O"

unicos7.C:
	make -f Makefile.generic ${WHAT} \
		LIBS="-lcurses -L../libtelnet -ltelnet ${AUTH_LIB}" \
		LIBPATH="/lib/libc.a /usr/lib/libcurses.a \
				../libtelnet/libtelnet.a ${AUTH_LIBPATH}"\
		DEST=${DESTDIR}/usr/ucb \
		DEFINES=${ODEFS}"-Dvfork=fork -Dsignal=bsdsignal \
			-DLINEMODE -DKLUDGELINEMODE \
			-DSYSV_TERMIO -DHAS_GETTOS ${AUTH_DEF} \
		  -DDEFAULT_IM='\"\r\nCray UNICOS 7.C (%h) (%t)\r\n\r\r\n\r\"' \
			-DDIAGNOSTICS -DENV_HACK -DOLD_ENVIRON" \
		AR=bld ARFLAGS=cq RANLIB=NONE \
		LIBEXEC=${DESTDIR}/etc \
		INCLUDES="-I.. ${AUTH_INC}" \
		LIB_OBJ="getent.o" \
		LIB_SRC="getent.c" \
		CC="${CC}" LCCFLAGS="-O"


unicos7.0:
	make -f Makefile.generic ${WHAT} \
		LIBS="-lcurses -L../libtelnet -ltelnet -lkrb" \
		LIBPATH="/lib/libc.a /usr/lib/libcurses.a \
				../libtelnet/libtelnet.a /usr/lib/libkrb.a" \
		DEST=${DESTDIR}/usr/ucb \
		DEFINES=${ODEFS}"-Dvfork=fork -Dsignal=bsdsignal \
			-DLINEMODE -DKLUDGELINEMODE \
			-DSYSV_TERMIO -DHAS_GETTOS \
		  -DDEFAULT_IM='\"\r\nCray UNICOS 7.0 (%h) (%t)\r\n\r\r\n\r\"' \
			-DDIAGNOSTICS -DENV_HACK -DOLD_ENVIRON" \
		AR=bld ARFLAGS=cq RANLIB=NONE \
		LIBEXEC=${DESTDIR}/etc \
		INCLUDES="-I.." \
		LIB_OBJ="getent.o" \
		LIB_SRC="getent.c" \
		CC="${CC}" LCCFLAGS="-O"

# As of UNICOS 7.0.5.2, there is no longer a /usr/lib/libdes.a
# If you still have a /usr/lib/libdes.a, use the "unicos7.0.des.auth"
# target instead of "unicos7.0.auth".

unicos9.1.auth unicos9.0.auth unicos8.3.auth unicos8.0.auth unicos7.0.auth:
	make -f ../Config.generic `basename $@ .auth` WHAT=${WHAT} \
		AUTH_LIB=-lkrb AUTH_LIBPATH=/usr/lib/libkrb.a \
		AUTH_INC=-I/usr/include/krb \
		AUTH_DEF="-DAUTHENTICATION -DENCRYPTION -DKRB4 -DDES_ENCRYPTION"

unicos7.C.auth unicos7.0.des.auth:
	make -f ../Config.generic `basename $@ .des.auth` WHAT=${WHAT} \
		AUTH_LIB="-lkrb -ldes" \
		AUTH_LIBPATH="/usr/lib/libkrb.a /usr/lib/libdes.a" \
		AUTH_INC=-I/usr/include/krb \
		AUTH_DEF="-DAUTHENTICATION -DENCRYPTION -DKRB4 -DDES_ENCRYPTION"

unicos6.1:
	make -f Makefile.generic ${WHAT} \
		LIBS="-lcurses -L../libtelnet -ltelnet" \
		LIBPATH="/lib/libc.a /usr/lib/libcurses.a \
				../libtelnet/libtelnet.a" \
		DEST=${DESTDIR}/usr/ucb \
		DEFINES=${ODEFS}"-Dvfork=fork -Dsignal=bsdsignal \
			-DKLUDGELINEMODE -DUSE_TERMIO -DHAS_GETTOS \
			-DLINEMODE -DSYSV_TERMIO -DNEWINIT \
			-DNO_LOGIN_F -DNO_LOGIN_P -DNO_BSD_SETJMP \
			-DLOGIN_ARGS \
		  -DDEFAULT_IM='\"\r\nCray UNICOS 6.1 (%h) (%t)\r\n\r\r\n\r\"' \
			-DDIAGNOSTICS -DENV_HACK -DOLD_ENVIRON" \
		AR=bld ARFLAGS=cq RANLIB=NONE \
		LIBEXEC=${DESTDIR}/etc \
		INCLUDES="-I.." \
		LIB_OBJ="getent.o parsetos.o" \
		LIB_SRC="getent.c parsetos.c" \
		CC="${CC}" LCCFLAGS="-O"

sun3.5:
	@echo $@ is untested... it may or may not work..."
	make -f Makefile.generic ${WHAT} \
		LIBS="-ltermcap ../libtelnet/libtelnet.a" \
		LIBPATH="/lib/libc.a /usr/lib/libtermcap.a \
				../libtelnet/libtelnet.a" \
		DEST=${DESTDIR}/usr/ucb \
		DEFINES=${ODEFS}"-DTERMCAP -DKLUDGELINEMODE \
			-DHAVE_fd_set -DNO_MKTIME \
			-DDIAGNOSTICS  -DENV_HACK -DOLD_ENVIRON \
		   -DDEFAULT_IM='\"\r\nSunOS UNIX 3.5 (%h) (%t)\r\n\r\r\n\r\"' \
			-DNO_LOGIN_P" \
		INCLUDES="-I.." \
		LIB_OBJ="getent.o strdup.o strerror.o setsid.o \
			setenv.o strftime.o strcasecmp.o herror.o mem.o" \
		LIB_SRC="getent.c strdup.c strerror.c setsid.c \
			setenv.c strftime.c strcasecmp.c herror.c mem.c" \
		AR=ar ARFLAGS=cq RANLIB=ranlib \
		LIBEXEC=${DESTDIR}/usr/etc/in.telnetd \
		CC="${CC}" LCCFLAGS="-O"

sun3.5.auth:
	make -f ../Config.generic `basename $@ .auth` WHAT=${WHAT} \
		AUTH_LIB="-lkrb -ldes" \
		AUTH_LIBPATH="/usr/lib/libkrb.a /usr/lib/libdes.a" \
		AUTH_DEF="-DAUTHENTICATION -DENCRYPTION -DKRB4 -DDES_ENCRYPTION"

sun4.0.3c sun4.0:
	@echo $@ is untested... it may or may not work..."
	make -f Makefile.generic ${WHAT} \
		LIBS="-ltermcap ../libtelnet/libtelnet.a" \
		LIBPATH="/lib/libc.a /usr/lib/libtermcap.a \
				../libtelnet/libtelnet.a" \
		DEST=${DESTDIR}/usr/ucb \
		DEFINES=${ODEFS}"-DFILIO_H -DTERMCAP -DUSE_TERMIO -DNO_CC_T \
			-DKLUDGELINEMODE \
		   -DDEFAULT_IM='\"\r\nSunOS UNIX 4.0 (%h) (%t)\r\n\r\r\n\r\"' \
			-DSTREAMS -DDIAGNOSTICS -DENV_HACK -DOLD_ENVIRON \
			" \
		INCLUDES="-I.." \
		LIB_OBJ="getent.o strerror.o setsid.o setenv.o \
				strcasecmp.o strftime.o herror.o mem.o" \
		LIB_SRC="getent.c strerror.c setsid.c setenv.c \
				strcasecmp.c strftime.c herror.c mem.c" \
		AR=ar ARFLAGS=cq RANLIB=ranlib \
		LIBEXEC=${DESTDIR}/usr/etc/in.telnetd \
		CC="${CC}" LCCFLAGS="-O"

sun4.1:
	make -f Makefile.generic ${WHAT} \
		LIBS="-ltermcap ../libtelnet/libtelnet.a ${AUTH_LIB}" \
		LIBPATH="/lib/libc.a /usr/lib/libtermcap.a \
			../libtelnet/libtelnet.a ${AUTH_LIBPATH}" \
		DEST=${DESTDIR}/usr/ucb \
		DEFINES=${ODEFS}"-DFILIO_H -DTERMCAP -DUSE_TERMIO \
			-DKLUDGELINEMODE -DSTREAMS \
		   -DDEFAULT_IM='\"\r\nSunOS UNIX 4.1 (%h) (%t)\r\n\r\r\n\r\"' \
			-DDIAGNOSTICS -DENV_HACK -DOLD_ENVIRON ${AUTH_DEF}" \
		INCLUDES="-I.. ${AUTH_INC}" \
		LIB_OBJ="getent.o strerror.o setenv.o herror.o mem.o" \
		LIB_SRC="getent.c strerror.c setenv.c herror.c mem.c" \
		AR=ar ARFLAGS=cq RANLIB=ranlib \
		LIBEXEC=${DESTDIR}/usr/etc/in.telnetd \
		CC="${CC}" LCCFLAGS="-O"

sun4.1.auth:
	make -f ../Config.generic `basename $@ .auth` WHAT=${WHAT} \
		AUTH_LIB="-lkrb -ldes" \
		AUTH_LIBPATH="/usr/lib/libkrb.a /usr/lib/libdes.a" \
		AUTH_DEF="-DAUTHENTICATION -DENCRYPTION -DNO_LOGIN_F \
			-DLOGIN_R -DKRB4 -DDES_ENCRYPTION"

sun4.1.srp:
	make -f ../Config.generic `basename $@ .srp` WHAT=${WHAT} \
		AUTH_LIB="-L../../lib -lsrp -lgmp" \
		AUTH_LIBPATH="" \
		AUTH_INC="-I../../include"\
		AUTH_DEF="-DAUTHENTICATION -DSRP -DNO_LOGIN_F -DLOGIN_R -DTJW"

sun4.1.srp.enc:
	make -f ../Config.generic `basename $@ .srp.enc` WHAT=${WHAT} \
		AUTH_LIB="-L../../lib -lsrp -lgmp -ldes" \
		AUTH_LIBPATH="" \
		AUTH_INC="-I../../include"\
		AUTH_DEF="-DAUTHENTICATION -DENCRYPTION -DSRP -DNO_LOGIN_F \
				-DLOGIN_R -DDES_ENCRYPTION -DCAST_ENCRYPTION \
				-DBIG_ENDIAN -DTJW"

sol2.2 solaris2.2:
	make -f Makefile.generic ${WHAT} \
		LIBS="-ltermlib ../libtelnet/libtelnet.a ${AUTH_LIB}" \
		LIBPATH="/usr/ccs/lib/libtermlib.a ../libtelnet/libtelnet.a \
			/usr/lib/libc.a /usr/ucblib/libucb.a \
			/usr/lib/libsocket.a /usr/lib/libnsl.a" \
		DEST=${DESTDIR}/usr/ucb \
		DEFINES="-DFILIO_H -DUSE_TERMIO -DKLUDGELINEMODE \
			-DSTREAMS -DSTREAMSPTY -DDIAGNOSTICS -DSOLARIS \
			-DENV_HACK -DOLD_ENVIRON -DNO_LOGIN_P -DUTMPX \
	-DDEFAULT_IM='\"\r\n\r\nUNIX(r) System V Release 4.0 (%h)\r\n\r\n\"' \
			-DLOGIN_ARGS ${AUTH_DEF}" \
		INCLUDES="-I.. -I/usr/ucbinclude ${AUTH_INC}" \
		LIB_OBJ="getent.o strerror.o setenv.o herror.o" \
		LIB_SRC="getent.c strerror.c setenv.c herror.c" \
		AR=ar ARFLAGS=cq RANLIB=NONE \
		LIBEXEC=${DESTDIR}/usr/etc/in.telnetd \
		CC="${CC}" LCCFLAGS="-O"

sol2.2.auth solaris2.2.auth:
	make -f ../Config.generic `basename $@ .auth` WHAT=${WHAT} \
		AUTH_LIB="-lkrb" AUTH_LIBPATH="/usr/lib/libkrb.a" \
		AUTH_INC=-I/usr/include/kerberos \
		AUTH_DEF="-DAUTHENTICATION -DKRB4"

sol2.3 solaris2.3:
	make -f Makefile.generic ${WHAT} \
		LIBS="-ltermlib ../libtelnet/libtelnet.a ${AUTH_LIB}" \
		LIBPATH="/usr/ccs/lib/libtermlib.a ../libtelnet/libtelnet.a \
			/usr/lib/libc.a /usr/ucblib/libucb.a \
			/usr/lib/libsocket.a /usr/lib/libnsl.a" \
		DEST=${DESTDIR}/usr/ucb \
		DEFINES="-DFILIO_H -DUSE_TERMIO -DKLUDGELINEMODE \
			-DSTREAMS -DSTREAMSPTY -DDIAGNOSTICS -DSOLARIS \
			-DENV_HACK -DOLD_ENVIRON -DNO_LOGIN_P -DUTMPX \
	-DDEFAULT_IM='\"\r\n\r\nUNIX(r) System V Release 4.0 (%h)\r\n\r\n\"' \
			-DLOGIN_ARGS ${AUTH_DEF}" \
		INCLUDES="-I.. -I/usr/ucbinclude ${AUTH_INC}" \
		LIB_OBJ="getent.o strerror.o setenv.o herror.o" \
		LIB_SRC="getent.c strerror.c setenv.c herror.c" \
		AR=ar ARFLAGS=cq RANLIB=NONE \
		LIBEXEC=${DESTDIR}/usr/etc/in.telnetd \
		CC="${CC}" LCCFLAGS="-O"

sol2.3.auth solaris2.3.auth:
	make -f ../Config.generic `basename $@ .auth` WHAT=${WHAT} \
		AUTH_LIB="-lkrb /home/poplar36/gw/lib/libdes.a" \
		AUTH_LIBPATH="/usr/lib/libkrb.a /home/poplar36/gw/lib/libdes.a"\
		AUTH_INC=-I/usr/include/kerberos \
		AUTH_DEF="-DAUTHENTICATION -DKRB4 -DENCRYPTION -DDES_ENCRYPTION"

sol2.4 solaris2.4:
	make -f Makefile.generic ${WHAT} \
		LIBS="-ltermlib ../libtelnet/libtelnet.a -lsocket -lnsl \
			${AUTH_LIB}" \
		LIBPATH="/usr/ccs/lib/libtermlib.a ../libtelnet/libtelnet.a \
			/usr/lib/libc.a /usr/lib/libsocket.a \
			/usr/lib/libnsl.a" \
		DEST=${DESTDIR}/usr/ucb \
		DEFINES="-DFILIO_H -DUSE_TERMIO -DKLUDGELINEMODE \
			-DSTREAMS -DSTREAMSPTY -DDIAGNOSTICS -DSOLARIS \
			-DENV_HACK -DOLD_ENVIRON -DNO_LOGIN_P -DUTMPX \
	-DDEFAULT_IM='\"\r\n\r\nUNIX(r) System V Release 4.0 (%h)\r\n\r\n\"' \
			-Dsignal=sigset -DLOGIN_ARGS ${AUTH_DEF}" \
		INCLUDES="-I.. ${AUTH_INC}" \
		LIB_OBJ="getent.o strerror.o setenv.o herror.o" \
		LIB_SRC="getent.c strerror.c setenv.c herror.c" \
		AR=ar ARFLAGS=cq RANLIB=NONE \
		LIBEXEC=${DESTDIR}/usr/etc/in.telnetd \
		CC="${CC}" LCCFLAGS="-O"

sol2.4.auth solaris2.4.auth:
	make -f ../Config.generic `basename $@ .auth` WHAT=${WHAT} \
		AUTH_LIB="-lkrb " \
		AUTH_LIBPATH="/usr/lib/libkrb.a"\
		AUTH_INC=-I/usr/include/kerberos \
		AUTH_DEF="-DAUTHENTICATION -DKRB4 -DNO_LOGIN_F -DLOGIN_R"

sol2.4.auth.enc solaris2.4.auth.enc:
	make -f ../Config.generic `basename $@ .auth.enc` WHAT=${WHAT} \
		AUTH_LIB="-lkrb -ldes" \
		AUTH_LIBPATH="/usr/lib/libkrb.a /usr/lib/libdes.a"\
		AUTH_INC=-I/usr/include/kerberos \
		AUTH_DEF="-DAUTHENTICATION -DKRB4 -DNO_LOGIN_F -DLOGIN_R \
				-DENCRYPTION -DDES_ENCRYPTION"

sol2.4.srp solaris2.4.srp:
	make -f ../Config.generic `basename $@ .srp` WHAT=${WHAT} \
		AUTH_LIB="-L../../lib -lsrp -lgmp" \
		AUTH_LIBPATH=""\
		AUTH_INC="-I../../include"\
		AUTH_DEF="-DAUTHENTICATION -DSRP -DTJW -DNO_LOGIN_F -DLOGIN_R"

sol2.4.srp.enc solaris2.4.srp.enc:
	make -f ../Config.generic `basename $@ .srp.enc` WHAT=${WHAT} \
		AUTH_LIB="-L../../lib -lsrp -lgmp -lkrb -ldes" \
		AUTH_LIBPATH=""\
		AUTH_INC="-I/usr/include/kerberos -I../../include"\
		AUTH_DEF="-DAUTHENTICATION -DKRB4 -DSRP -DBIG_ENDIAN \
				-DENCRYPTION -DDES_ENCRYPTION \
				-DCAST_ENCRYPTION -DTJW -DNO_LOGIN_F -DLOGIN_R"

sol2.5 solaris2.5:
	make -f Makefile.generic ${WHAT} \
		LIBS="-ltermlib ../libtelnet/libtelnet.a -lsocket -lnsl \
			${AUTH_LIB}" \
		LIBPATH="/usr/ccs/lib/libtermlib.a ../libtelnet/libtelnet.a \
			/usr/lib/libc.a /usr/lib/libsocket.a \
			/usr/lib/libnsl.a" \
		DEST=${DESTDIR}/usr/ucb \
		DEFINES="-DFILIO_H -DUSE_TERMIO -DKLUDGELINEMODE \
			-DSTREAMS -DSTREAMSPTY -DDIAGNOSTICS -DSOLARIS \
			-DENV_HACK -DOLD_ENVIRON -DUTMPX \
	-DDEFAULT_IM='\"\r\n\r\nUNIX(r) System V Release 4.0 (%h)\r\n\r\n\"' \
			-Dsignal=sigset ${AUTH_DEF}" \
		INCLUDES="-I.. ${AUTH_INC}" \
		LIB_OBJ="getent.o strerror.o setenv.o herror.o" \
		LIB_SRC="getent.c strerror.c setenv.c herror.c" \
		AR=ar ARFLAGS=cq RANLIB=NONE \
		LIBEXEC=${DESTDIR}/usr/etc/in.telnetd \
		CC="${CC}" LCCFLAGS="-O"

sol2.5.auth solaris2.5.auth:
	make -f ../Config.generic `basename $@ .auth` WHAT=${WHAT} \
		AUTH_LIB="-lkrb " \
		AUTH_LIBPATH="/usr/lib/libkrb.a"\
		AUTH_INC=-I/usr/include/kerberos \
		AUTH_DEF="-DAUTHENTICATION -DKRB4 -DNO_LOGIN_F -DLOGIN_R"

sol2.5.auth.enc solaris2.5.auth.enc:
	make -f ../Config.generic `basename $@ .auth.enc` WHAT=${WHAT} \
		AUTH_LIB="-lkrb -ldes" \
		AUTH_LIBPATH="/usr/lib/libkrb.a /usr/lib/libdes.a"\
		AUTH_INC=-I/usr/include/kerberos \
		AUTH_DEF="-DAUTHENTICATION -DKRB4 -DNO_LOGIN_F -DLOGIN_R \
				-DENCRYPTION -DDES_ENCRYPTION"

sol2.5.srp solaris2.5.srp:
	make -f ../Config.generic `basename $@ .srp` WHAT=${WHAT} \
		AUTH_LIB="-L../../lib -lsrp -lgmp" \
		AUTH_LIBPATH=""\
		AUTH_INC="-I../../include"\
		AUTH_DEF="-DAUTHENTICATION -DSRP -DTJW"

sol2.5.srp.nologinf solaris2.5.srp.nologinf:
	make -f ../Config.generic `basename $@ .srp.nologinf` WHAT=${WHAT} \
		AUTH_LIB="-L../../lib -lsrp -lgmp" \
		AUTH_LIBPATH=""\
		AUTH_INC="-I../../include"\
		AUTH_DEF="-DAUTHENTICATION -DSRP -DTJW -DNO_LOGIN_F -DLOGIN_R"

sol2.5.srp.enc solaris2.5.srp.enc:
	make -f ../Config.generic `basename $@ .srp.enc` WHAT=${WHAT} \
		AUTH_LIB="-L../../lib -lsrp -lgmp -lkrb -ldes" \
		AUTH_LIBPATH=""\
		AUTH_INC="-I/usr/include/kerberos -I../../include"\
		AUTH_DEF="-DAUTHENTICATION -DKRB4 -DSRP -DBIG_ENDIAN \
				-DENCRYPTION -DDES_ENCRYPTION \
				-DCAST_ENCRYPTION -DTJW"

sol2.5.srp.enc.nologinf solaris2.5.srp.enc.nologinf:
	make -f ../Config.generic `basename $@ .srp.enc.nologinf` WHAT=${WHAT} \
		AUTH_LIB="-L../../lib -lsrp -lgmp -lkrb -ldes" \
		AUTH_LIBPATH=""\
		AUTH_INC="-I/usr/include/kerberos -I../../include"\
		AUTH_DEF="-DAUTHENTICATION -DKRB4 -DSRP -DBIG_ENDIAN \
				-DENCRYPTION -DDES_ENCRYPTION \
				-DCAST_ENCRYPTION -DTJW -DNO_LOGIN_F -DLOGIN_R"
sol2.5.srp.exp solaris2.5.srp.exp:
	make -f ../Config.generic `basename $@ .srp.exp` WHAT=${WHAT} \
		AUTH_LIB="-L../../lib -lsrp -lgmp" \
		AUTH_LIBPATH=""\
		AUTH_INC="-I../../include"\
		AUTH_DEF="-DAUTHENTICATION -DSRP -DBIG_ENDIAN \
				-DENCRYPTION -DCAST_EXPORT_ENCRYPTION -DTJW"

solx86 solarisx86:
	make -f Makefile.generic ${WHAT} \
		LIBS="-ltermlib ../libtelnet/libtelnet.a -lsocket -lnsl \
			${AUTH_LIB}" \
		LIBPATH="/usr/ccs/lib/libtermlib.a ../libtelnet/libtelnet.a \
			/usr/lib/libc.a /usr/lib/libsocket.a \
			/usr/lib/libnsl.a" \
		DEST=${DESTDIR}/usr/ucb \
		DEFINES="-DFILIO_H -DUSE_TERMIO -DKLUDGELINEMODE \
			-DSTREAMS -DSTREAMSPTY -DDIAGNOSTICS -DSOLARIS \
			-DENV_HACK -DOLD_ENVIRON -DUTMPX \
	-DDEFAULT_IM='\"\r\n\r\nUNIX(r) System V Release 4.0 (%h)\r\n\r\n\"' \
			-Dsignal=sigset ${AUTH_DEF}" \
		INCLUDES="-I.. ${AUTH_INC}" \
		LIB_OBJ="getent.o strerror.o setenv.o herror.o" \
		LIB_SRC="getent.c strerror.c setenv.c herror.c" \
		AR=ar ARFLAGS=cq RANLIB=NONE \
		LIBEXEC=${DESTDIR}/usr/etc/in.telnetd \
		CC="${CC}" LCCFLAGS="-O"

solx86.srp solarisx86.srp:
	make -f ../Config.generic `basename $@ .srp` WHAT=${WHAT} \
		AUTH_LIB="-L../../lib -lsrp -lgmp" \
		AUTH_LIBPATH=""\
		AUTH_INC="-I../../include"\
		AUTH_DEF="-DAUTHENTICATION -DSRP -DLITTLE_ENDIAN -DTJW"

solx86.srp.enc solarisx86.srp.enc:
	make -f ../Config.generic `basename $@ .srp.enc` WHAT=${WHAT} \
		AUTH_LIB="-L../../lib -lsrp -lgmp -lkrb -ldes" \
		AUTH_LIBPATH=""\
		AUTH_INC="-I/usr/include/kerberos -I../../include"\
		AUTH_DEF="-DAUTHENTICATION -DKRB4 -DSRP -DLITTLE_ENDIAN \
				-DENCRYPTION -DDES_ENCRYPTION \
				-DCAST_ENCRYPTION -DTJW"

solx86.srp.exp solarisx86.srp.exp:
	make -f ../Config.generic `basename $@ .srp.exp` WHAT=${WHAT} \
		AUTH_LIB="-L../../lib -lsrp -lgmp" \
		AUTH_LIBPATH=""\
		AUTH_INC="-I../../include"\
		AUTH_DEF="-DAUTHENTICATION -DSRP -DLITTLE_ENDIAN \
				-DENCRYPTION -DCAST_EXPORT_ENCRYPTION -DTJW"

linux2:
	make -f Makefile.generic ${WHAT} \
		LIBS="-ltermcap ../libtelnet/libtelnet.a \
			${AUTH_LIB}" \
		LIBPATH="/usr/lib/libtermcap.a ../libtelnet/libtelnet.a \
			/usr/lib/libc.a" \
		DEST=${DESTDIR}/usr/bin \
		DEFINES="-DTERMCAP -DUSE_TERMIO -DKLUDGELINEMODE \
			-DDIAGNOSTICS -DLINUX \
			-DENV_HACK -DOLD_ENVIRON \
	-DDEFAULT_IM='\"\r\n\r\nLinux(r) Release 2.0 (%h)\r\n\r\n\"' \
			${AUTH_DEF}" \
		INCLUDES="-I.. ${AUTH_INC}" \
		LIB_OBJ="getent.o" \
		LIB_SRC="getent.c" \
		AR=ar ARFLAGS=cq RANLIB=NONE \
		LIBEXEC=${DESTDIR}/usr/etc/in.telnetd \
		CC="${CC}" LCCFLAGS="-O"

linux2.srp:
	make -f ../Config.generic `basename $@ .srp` WHAT=${WHAT} \
		AUTH_LIB="-L../../lib -lsrp -lgmp" \
		AUTH_LIBPATH="../../lib/libsrp.a"\
		AUTH_INC="-I../../include"\
		AUTH_DEF="-DAUTHENTICATION -DSRP -DLITTLE_ENDIAN -DTJW"

linux2.srp.enc:
	make -f ../Config.generic `basename $@ .srp.enc` WHAT=${WHAT} \
		AUTH_LIB="-L../../lib -lsrp -lgmp -ldes" \
		AUTH_LIBPATH="../../lib/libsrp.a"\
		AUTH_INC="-I../../include"\
		AUTH_DEF="-DAUTHENTICATION -DSRP -DLITTLE_ENDIAN \
				-DENCRYPTION -DDES_ENCRYPTION \
				-DCAST_ENCRYPTION -DTJW"

linux2.srp.exp:
	make -f ../Config.generic `basename $@ .srp.exp` WHAT=${WHAT} \
		AUTH_LIB="-L../../lib -lsrp -lgmp" \
		AUTH_LIBPATH="../../lib/libsrp.a"\
		AUTH_INC="-I../../include"\
		AUTH_DEF="-DAUTHENTICATION -DSRP -DLITTLE_ENDIAN \
				-DENCRYPTION -DCAST_EXPORT_ENCRYPTION -DTJW"

dynix3.0.12:
	@echo $@ is untested... it may or may not work..."
	make -f Makefile.generic ${WHAT} \
		LIBS="-ltermcap ../libtelnet/libtelnet.a" \
		LIBPATH="/lib/libc.a /usr/lib/libtermcap.a \
				../libtelnet/libtelnet.a" \
		DEST=${DESTDIR}/usr/ucb \
		DEFINES=${ODEFS}"-DTERMCAP -DKLUDGELINEMODE \
		 -DDEFAULT_IM='\"\r\nDYNIX(R) V3.0.12 (%h) (%t)\r\n\r\r\n\r\"' \
			-DDIAGNOSTICS -DENV_HACK -DOLD_ENVIRON -DNO_STRING_H " \
		INCLUDES="-I.." \
		LIB_OBJ="getent.o strchr.o strrchr.o strdup.o strerror.o \
			setsid.o setenv.o strcasecmp.o strftime.o getopt.o \
			mem.o" \
		LIB_SRC="getent.c strchr.c strrchr.c strdup.c strerror.c \
			setsid.c setenv.c strcasecmp.c strftime.c getopt.c \
			mem.o" \
		AR=ar ARFLAGS=cq RANLIB=ranlib \
		LIBEXEC=${DESTDIR}/usr/etc \
		CC="${CC}" LCCFLAGS="-O"

dynix3.0.17:
	make -f Makefile.generic ${WHAT} \
		LIBS="-ltermcap ../libtelnet/libtelnet.a -lseq" \
		LIBPATH="/lib/libc.a /usr/lib/libtermcap.a \
			../libtelnet/libtelnet.a /usr/lib/libseq.a" \
		DEST=${DESTDIR}/usr/ucb \
		DEFINES=${ODEFS}"-DTERMCAP -DKLUDGELINEMODE \
			-DDIAGNOSTICS -DENV_HACK -DOLD_ENVIRON -DNO_STRING_H \
		 -DDEFAULT_IM='\"\r\nDYNIX(R) V3.0.17 (%h) (%t)\r\n\r\r\n\r\"' \
			" \
		INCLUDES="-I.." \
		LIB_OBJ="getent.o strchr.o strrchr.o strdup.o strerror.o \
			setsid.o strftime.o mem.o" \
		LIB_SRC="getent.c strchr.c strrchr.c strdup.c strerror.c \
			setsid.c strftime.c mem.c" \
		AR=ar ARFLAGS=cq RANLIB=ranlib \
		LIBEXEC=${DESTDIR}/usr/etc \
		CC="${CC}" LCCFLAGS="-O"

ultrix3.1:
	@echo $@ is untested... it may or may not work..."
	make -f Makefile.generic ${WHAT} \
		LIBS="-ltermcap ../libtelnet/libtelnet.a" \
		LIBPATH="/lib/libc.a /usr/lib/libtermcap.a \
				../libtelnet/libtelnet.a" \
		DEST=${DESTDIR}/usr/ucb \
		DEFINES=${ODEFS}"-DTERMCAP -DKLUDGELINEMODE \
			-DNO_LOGIN_F -DNO_LOGIN_P -DNO_LOGIN_H \
			-DDIAGNOSTICS -DENV_HACK -DOLD_ENVIRON -DUSE_TERMIO \
		    -DDEFAULT_IM='\"\r\nULTRIX V3.1 (%h) (%t)\r\n\r\r\n\r\"' \
			-YPOSIX" \
		INCLUDES="-I.." \
		LIB_OBJ="getent.o strdup.o strerror.o setenv.o \
			strftime.o herror.o" \
		LIB_SRC="getent.c strdup.c strerror.c setenv.c \
			strftime.c herror.c" \
		AR=ar ARFLAGS=cq RANLIB=ranlib \
		LIBEXEC=${DESTDIR}/usr/etc \
		CC="${CC}" LCCFLAGS="-O"

ultrix4.0:
	@echo $@ is untested... it may or may not work..."
	make -f Makefile.generic ${WHAT} \
		LIBS="-ltermcap ../libtelnet/libtelnet.a" \
		LIBPATH="/lib/libc.a /usr/lib/libtermcap.a \
				../libtelnet/libtelnet.a" \
		DEST=${DESTDIR}/usr/ucb \
		DEFINES=${ODEFS}"-DUSE_TERMIO -DTERMCAP \
		    -DDEFAULT_IM='\"\r\nULTRIX V4.0 (%h) (%t)\r\n\r\r\n\r\"' \
			-DKLUDGELINEMODE -DDIAGNOSTICS \
			-DNO_LOGIN_F -DNO_LOGIN_P -DNO_LOGIN_H \
			-DENV_HACK -DOLD_ENVIRON" \
		INCLUDES="-I.." \
		LIB_OBJ="getent.o strdup.o strerror.o setsid.o \
			setenv.o strftime.o" \
		LIB_SRC="getent.c strdup.c strerror.c setsid.c \
			setenv.c strftime.c" \
		AR=ar ARFLAGS=cq RANLIB=ranlib \
		LIBEXEC=${DESTDIR}/usr/etc \
		CC="${CC}" LCCFLAGS="-O"

ultrix4.1:
	make -f Makefile.generic ${WHAT} \
		LIBS="-ltermcap ../libtelnet/libtelnet.a ${AUTH_LIB}" \
		LIBPATH="/lib/libc.a /usr/lib/libtermcap.a \
				../libtelnet/libtelnet.a ${AUTH_LIBPATH}" \
		DEST=${DESTDIR}/usr/ucb \
		DEFINES=${ODEFS}"-DUSE_TERMIO -DTERMCAP \
		    -DDEFAULT_IM='\"\r\nULTRIX V4.1 (%h) (%t)\r\n\r\r\n\r\"' \
			-DKLUDGELINEMODE -DDIAGNOSTICS \
			-DNO_LOGIN_F -DNO_LOGIN_P -DNO_LOGIN_H \
			-DENV_HACK -DOLD_ENVIRON ${AUTH_DEF}" \
		INCLUDES="-I.. ${AUTH_INC}" \
		LIB_OBJ="getent.o strdup.o" \
		LIB_SRC="getent.c strdup.c" \
		AR=ar ARFLAGS=cq RANLIB=ranlib \
		LIBEXEC=${DESTDIR}/usr/etc \
		CC="${CC}" LCCFLAGS="-O"
ultrix4.1.auth:
	make -f ../Config.generic `basename $@ .auth` WHAT=${WHAT} \
		AUTH_LIB="-lkrb -ldes" \
		AUTH_LIBPATH="/usr/lib/libkrb.a /usr/lib/libdes.a" \
		AUTH_DEF="-DAUTHENTICATION -DKRB4"

ultrix4.3:
	make -f Makefile.generic ${WHAT} \
		LIBS="-ltermcap ../libtelnet/libtelnet.a ${AUTH_LIB}" \
		LIBPATH="/lib/libc.a /usr/lib/libtermcap.a \
				../libtelnet/libtelnet.a ${AUTH_LIBPATH}" \
		DEST=${DESTDIR}/usr/ucb \
		DEFINES=${ODEFS}"-DUSE_TERMIO -DTERMCAP \
		    -DDEFAULT_IM='\"\r\nULTRIX V4.3 (%h) (%t)\r\n\r\r\n\r\"' \
			-DKLUDGELINEMODE -DDIAGNOSTICS \
			-DNO_LOGIN_F -DNO_LOGIN_H -DNO_LOGIN_P -DLOGIN_R \
			-DENV_HACK -DOLD_ENVIRON ${AUTH_DEF}" \
		INCLUDES="-I.. ${AUTH_INC}" \
		LIB_OBJ="getent.o strdup.o" \
		LIB_SRC="getent.c strdup.c" \
		AR=ar ARFLAGS=cq RANLIB=ranlib \
		LIBEXEC=${DESTDIR}/usr/etc \
		CC="${CC}" LCCFLAGS="-O"

ultrix4.3.auth:
	make -f ../Config.generic `basename $@ .auth` WHAT=${WHAT} \
		AUTH_LIB="-lkrb -ldes" \
		AUTH_LIBPATH="/usr/lib/libkrb.a /usr/lib/libdes.a" \
		AUTH_DEF="-DAUTHENTICATION -DKRB4"

ultrix4.3.srp:
	make -f ../Config.generic `basename $@ .srp` WHAT=${WHAT} \
		AUTH_LIB="-L../../lib -lsrp -lgmp" \
		AUTH_LIBPATH="" \
		AUTH_INC="-I../../include" \
		AUTH_DEF="-DAUTHENTICATION -DSRP -DLITTLE_ENDIAN -DTJW"

ultrix4.3.srp.enc:
	make -f ../Config.generic `basename $@ .srp.enc` WHAT=${WHAT} \
		AUTH_LIB="-L../../lib -lsrp -lgmp" \
		AUTH_LIBPATH="" \
		AUTH_INC="-I../../include" \
		AUTH_DEF="-DAUTHENTICATION -DSRP -DLITTLE_ENDIAN \
			-DENCRYPTION -DCAST_ENCRYPTION -DTJW"

irix4.0.1:
	@echo $@ is untested... it may or may not work..."
	make -f Makefile.generic ${WHAT} \
		LIBS="-ltermlib ../libtelnet/libtelnet.a" \
		LIBPATH="/usr/lib/libc.a /usr/lib/libtermlib.a \
				../libtelnet/libtelnet.a" \
		DEST=${DESTDIR}/usr/bin \
		DEFINES=${ODEFS}"-Dvfork=fork -DUSE_TERMIO \
		    -DDEFAULT_IM='\"\r\n\r\nIRIX System V.3 (%h) (%t)\r\n\r\r\n\r\"' \
			-DNO_LOGIN_F -DNO_LOGIN_P \
			-DDIAGNOSTICS " \
		INCLUDES="-I.." \
		LIB_OBJ="getent.o setenv.o" \
		LIB_SRC="getent.c setenv.c" \
		AR=ar ARFLAGS=cq RANLIB=NONE \
		LIBEXEC=${DESTDIR}/etc \
		CC="${CC}" LCCFLAGS="-O"

irix5.4:
	make -f Makefile.generic ${WHAT} \
		LIBS="-ltermlib ../libtelnet/libtelnet.a ${AUTH_LIB}" \
		LIBPATH="/usr/lib/libtermlib.a \
				../libtelnet/libtelnet.a" \
		DEST=${DESTDIR}/usr/bin \
		DEFINES=${ODEFS}"-Dvfork=fork -DUSE_TERMIO \
		    -DDEFAULT_IM='\"\r\n\r\nIRIX System V.4 (%h) (%t)\r\n\r\r\n\r\"' \
			-DNO_LOGIN_F -DNO_LOGIN_P -DLOGIN_R -DIRIX -DUTMPX \
			-DSTREAMS -DSTREAMSPTY -DDIAGNOSTICS ${AUTH_DEF}" \
		INCLUDES="-I.. ${AUTH_INC}" \
		LIB_OBJ="getent.o setenv.o" \
		LIB_SRC="getent.c setenv.c" \
		AR=ar ARFLAGS=cq RANLIB=NONE \
		LIBEXEC=${DESTDIR}/etc \
		CC="${CC}" LCCFLAGS="-O"

irix5.4.srp:
	make -f ../Config.generic `basename $@ .srp` WHAT=${WHAT} \
		AUTH_LIB="-L../../lib -lsrp -lgmp" \
		AUTH_LIBPATH=""\
		AUTH_INC="-I../../include"\
		AUTH_DEF="-DAUTHENTICATION -DSRP -DTJW"

irix5.4.srp.enc:
	make -f ../Config.generic `basename $@ .srp.enc` WHAT=${WHAT} \
		AUTH_LIB="-L../../lib -lsrp -lgmp -ldes" \
		AUTH_LIBPATH=""\
		AUTH_INC="-I../../include"\
		AUTH_DEF="-DAUTHENTICATION -DSRP -DBIG_ENDIAN \
				-DENCRYPTION -DDES_ENCRYPTION \
				-DCAST_ENCRYPTION -DTJW"

irix5.4.srp.exp:
	make -f ../Config.generic `basename $@ .srp.exp` WHAT=${WHAT} \
		AUTH_LIB="-L../../lib -lsrp -lgmp" \
		AUTH_LIBPATH=""\
		AUTH_INC="-I../../include"\
		AUTH_DEF="-DAUTHENTICATION -DSRP -DBIG_ENDIAN \
				-DENCRYPTION -DCAST_EXPORT_ENCRYPTION -DTJW"

osf2.0:
	make -f Makefile.generic ${WHAT} \
		LIBS="-lutil -lcurses ../libtelnet/libtelnet.a ${AUTH_LIB}" \
		LIBPATH="../libtelnet/libtelnet.a" \
		DEST=${DESTDIR}/usr/bin \
		DEFINES=${ODEFS}"-DUSE_TERMIO \
		    -DDEFAULT_IM='\"\r\n\r\nOSF/1 (%h) (%t)\r\n\r\r\n\r\"' \
			-DSTREAMS -DDIAGNOSTICS -DOSF ${AUTH_DEF}" \
		INCLUDES="-I.. ${AUTH_INC}" \
		LIB_OBJ="getent.o setenv.o" \
		LIB_SRC="getent.c setenv.c" \
		AR=ar ARFLAGS=cq RANLIB=NONE \
		LIBEXEC=${DESTDIR}/etc \
		CC="${CC}" LCCFLAGS="-O"

osf2.0.srp:
	make -f ../Config.generic `basename $@ .srp` WHAT=${WHAT} \
		AUTH_LIB="-L../../lib -lsrp -lgmp" \
		AUTH_LIBPATH=""\
		AUTH_INC="-I../../include"\
		AUTH_DEF="-DAUTHENTICATION -DSRP -DTJW"

osf2.0.srp.enc:
	make -f ../Config.generic `basename $@ .srp.enc` WHAT=${WHAT} \
		AUTH_LIB="-L../../lib -lsrp -lgmp -ldes" \
		AUTH_LIBPATH=""\
		AUTH_INC="-I../../include"\
		AUTH_DEF="-DAUTHENTICATION -DSRP -DLITTLE_ENDIAN \
				-DENCRYPTION -DDES_ENCRYPTION \
				-DCAST_ENCRYPTION -DTJW"

osf2.0.srp.exp:
	make -f ../Config.generic `basename $@ .srp.exp` WHAT=${WHAT} \
		AUTH_LIB="-L../../lib -lsrp -lgmp" \
		AUTH_LIBPATH=""\
		AUTH_INC="-I../../include"\
		AUTH_DEF="-DAUTHENTICATION -DSRP -DLITTLE_ENDIAN \
				-DENCRYPTION -DCAST_EXPORT_ENCRYPTION -DTJW"

hpux8.0:
	@echo $@ is untested... it may or may not work..."
	make -f Makefile.generic ${WHAT} \
		LIBS="-ltermcap ../libtelnet/libtelnet.a" \
		LIBPATH="/lib/libc.a /usr/lib/libtermcap.a \
				../libtelnet/libtelnet.a" \
		DEST=${DESTDIR}/usr/bin \
		DEFINES=${ODEFS}"-Dvfork=fork -DUSE_TERMIO \
		    -DDEFAULT_IM='\"\r\n\r\nHP-UX 8.0 (%h) (%t)\r\n\r\r\n\r\"' \
			-DNO_LOGIN_F -DNO_LOGIN_P -DNO_LOGIN_H \
			-DDIAGNOSTICS -DLOGIN_ARGS" \
		INCLUDES="-I.." \
		LIB_OBJ="getent.o setenv.o" \
		LIB_SRC="getent.c setenv.c" \
		AR=ar ARFLAGS=cq RANLIB=NONE \
		LIBEXEC=${DESTDIR}/etc \
		CC="${CC}" LCCFLAGS="-O"

hpux9.0:
	make -f Makefile.generic ${WHAT} \
		LIBS="-ltermcap ../libtelnet/libtelnet.a ${AUTH_LIB}" \
		LIBPATH="/lib/libc.a /usr/lib/libtermcap.a \
				../libtelnet/libtelnet.a ${AUTH_LIBPATH}" \
		DEST=${DESTDIR}/usr/bin \
		DEFINES=${ODEFS}"-Dunix -D_INCLUDE_HPUX_SOURCE \
		    -D_INCLUDE_XOPEN_SOURCE -D_INCLUDE_XOPEN_SOURCE_EXTENDED \
		    -D_INCLUDE_POSIX_SOURCE -DUSE_TERMIO \
		    -DDEFAULT_IM='\"\r\n\r\nHP-UX 9.0 (%h) (%t)\r\n\r\r\n\r\"' \
			-DDIAGNOSTICS -DLOGIN_ARGS -DENV_HACK ${AUTH_DEF}" \
		INCLUDES="-I.. ${AUTH_INC}" \
		LIB_OBJ="getent.o setenv.o" \
		LIB_SRC="getent.c setenv.c" \
		AR=ar ARFLAGS=cq RANLIB=NONE \
		LIBEXEC=${DESTDIR}/etc \
		CC="${CC}" LCCFLAGS="-O -Aa"

hpux9.0.srp:
	make -f ../Config.generic `basename $@ .srp` WHAT=${WHAT} \
		AUTH_LIB="-L../../lib -lsrp -lgmp" \
		AUTH_LIBPATH="" \
		AUTH_INC="-I../../include" \
		AUTH_DEF="-DAUTHENTICATION -DSRP -DTJW"

hpux9.0.srp.enc:
	make -f ../Config.generic `basename $@ .srp.enc` WHAT=${WHAT} \
		AUTH_LIB="-L../../lib -lsrp -lgmp" \
		AUTH_LIBPATH="" \
		AUTH_INC="-I../../include" \
		AUTH_DEF="-DAUTHENTICATION -DSRP -DTJW -DENCRYPTION \
			-DCAST_ENCRYPTION"

next1.0:
	@echo $@ is untested... it may or may not work..."
	make -f Makefile.generic ${WHAT} \
		LIBS="../libtelnet/libtelnet.a -ltermcap -lsys_s" \
		LIBPATH="/lib/libc.a /lib/libsys_s.a /usr/lib/libtermcap.a \
				../libtelnet/libtelnet.a" \
		DEST=${DESTDIR}/usr/ucb \
		DEFINES=${ODEFS}"-bsd -DTERMCAP -DKLUDGELINEMODE \
			-DDEFAULT_IM='\"\r\nNeXT 1.0 (%h) (%t)\r\n\r\r\n\r\"' \
			-DDIAGNOSTICS -DENV_HACK -DOLD_ENVIRON \
			-DNO_STRING_H -Dgetenv=getenv_" \
		INCLUDES="-I.." \
		LIB_OBJ="strdup.o setenv.o setsid.o strftime.o \
			strcasecmp.o gettytab.o" \
		LIB_SRC=s"trdup.c setenv.c setsid.c strftime.c \
			strcasecmp.c gettytab.c" \
		CC="${CC}" LCCFLAGS="-O" \
		VPATH=../../getty \
		AR=ar ARFLAGS=cq RANLIB=ranlib \
		LIBEXEC=${DESTDIR}/usr/etc

#
# For the convex, make symbolic links to the tc[sg]getattr.c routines,
# because we are using posix stuff, but not the posix library...
# Pass the stuff to Makefile.generic by passing the object/source names
# in through LIB_OBJ and LIB_SRC
#
convex:
	@echo $@ is untested... it may or may not work..."
	ln -s ../../rel_usr/src/lib/libc/posix/tcsetattr.c tcsetattr.c
	ln -s ../../rel_usr/src/lib/libc/posix/tcgetattr.c tcgetattr.c
	make -f Makefile.generic ${WHAT} \
		LIBS="-ltermcap ../libtelnet/libtelnet.a" \
		LIBPATH="../libtelnet/libtelnet.a" \
		AR=ar ARFLAGS=cq RANLIB=ranlib \
		LIBEXEC=${DESTDIR}/usr/etc/in.telnetd \
		CC="${CC}" LCCFLAGS="-g ${OPTLEV} -Dconvex" \
		DEFINES=${ODEFS}"-DUSE_TERMIO -DLINEMODE \
			-DDEFAULT_IM='\"\r\nConvex (%h) (%t)\r\n\r\r\n\r\"' \
			-DDIAGNOSTICS -DENV_HACK -DOLD_ENVIRON" \
		INCLUDES="-I.." \
		LIB_OBJ="getent.o setsid.o strftime.o \
			tcsetattr.o tcgetattr.o" \
		LIB_SRC="getent.c setsid.c strftime.c \
			tcsetattr.c tcgetattr.c"

clean cleandir:
	make -f Makefile.generic $@
