11.61Slukem#	$NetBSD: Makefile,v 1.61 2023/06/03 21:30:24 lukem Exp $
21.1Scgd#
31.1Scgd# Copyright (c) 1990 The Regents of the University of California.
41.1Scgd# All rights reserved.
51.1Scgd#
61.1Scgd# Redistribution and use in source and binary forms, with or without
71.1Scgd# modification, are permitted provided that the following conditions
81.1Scgd# are met:
91.1Scgd# 1. Redistributions of source code must retain the above copyright
101.1Scgd#    notice, this list of conditions and the following disclaimer.
111.1Scgd# 2. Redistributions in binary form must reproduce the above copyright
121.1Scgd#    notice, this list of conditions and the following disclaimer in the
131.1Scgd#    documentation and/or other materials provided with the distribution.
141.55Smaya# 3. Neither the name of the University nor the names of its contributors
151.1Scgd#    may be used to endorse or promote products derived from this software
161.1Scgd#    without specific prior written permission.
171.1Scgd#
181.1Scgd# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
191.1Scgd# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
201.1Scgd# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
211.1Scgd# ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
221.1Scgd# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
231.1Scgd# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
241.1Scgd# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
251.1Scgd# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
261.1Scgd# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
271.1Scgd# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
281.1Scgd# SUCH DAMAGE.
291.1Scgd#
301.3Scgd#	from: @(#)Makefile	8.1 (Berkeley) 6/6/93
311.1Scgd#
321.1Scgd
331.56SmayaWARNS?=	5
341.43Slukem
351.22Sthorpej.include <bsd.own.mk>
361.22Sthorpej
371.41StlsUSE_FORT?= yes	# network client
381.41Stls
391.1ScgdPROG=	telnet
401.1Scgd
411.48SroyCPPFLAGS+=-DKLUDGELINEMODE -DUSE_TERMIO -DENV_HACK
421.18SthorpejCPPFLAGS+=-I${.CURDIR}
431.18Sthorpej
441.44SroyLDADD+= -lterminfo ${LIBTELNETDIR}/libtelnet.a
451.44SroyDPADD+=	${LIBTERMINFO} ${LIBTELNETDIR}/libtelnet.a
461.1Scgd
471.1ScgdSRCS=	authenc.c commands.c main.c network.c ring.c sys_bsd.c telnet.c \
481.54Smaya	terminal.c utilities.c
491.1Scgd
501.27SlukemCPPFLAGS+=-I${NETBSDSRCDIR}/lib
511.17SitojunCPPFLAGS+=-DIPSEC
521.17SitojunLDADD+=	-lipsec
531.17SitojunDPADD+=	${LIBIPSEC}
541.33Schs
551.35Slukem.if (${USE_INET6} != "no")
561.17SitojunCPPFLAGS+=-DINET6
571.35Slukem.endif
581.29Sitojun
591.29SitojunLIBTELNETDIR!=	cd ${.CURDIR}/../../lib/libtelnet; ${PRINTOBJDIR}
601.3Scgd
611.32Sdyoung.if (${USE_KERBEROS} != "no")
621.49SchristosCPPFLAGS+=-DKRB5 -DFORWARD
631.53SmrgLDADD+= ${LIBKRB5_LDADD}
641.53SmrgDPADD+= ${LIBKRB5_DPADD}
651.49Schristos.endif
661.49Schristos
671.49SchristosCPPFLAGS+=-DAUTHENTICATION -DENCRYPTION
681.49SchristosLDADD+= -ldes -lcrypto -lcrypt
691.49SchristosDPADD+=	${LIBDES} ${LIBCRYPTO} ${LIBCRYPT}
701.30Sitojun
711.36Schristos.if (${USE_PAM} != "no")
721.37SheLDADD+= -lpam ${PAM_STATIC_LDADD}
731.37SheDPADD+=	${LIBPAM} ${PAM_STATIC_DPADD}
741.36Schristos.endif
751.36Schristos
761.40Smrg.for f in commands telnet terminal utilities
771.40SmrgCOPTS.${f}.c+=  -Wno-pointer-sign
781.40Smrg.endfor
791.40Smrg
801.57Smrg# Has fallthru comment that is missed
811.61SlukemCOPTS.telnet.c+=	${CC_WNO_IMPLICIT_FALLTHROUGH}
821.57Smrg
831.60SlukemCOPTS.sys_bsd.c+=	${CC_WNO_CAST_FUNCTION_TYPE}
841.59Smrg
851.18Sthorpej.include <bsd.prog.mk>
86