Add MK... variables to enable/disable various aspects of building

crypto support into the system.  See share/mk/bsd.README for more
a full description.
This commit is contained in:
thorpej 2000-06-23 06:01:10 +00:00
parent b23df5be68
commit df83a2a3cd
15 changed files with 131 additions and 42 deletions

View File

@ -1,8 +1,14 @@
# $NetBSD: Makefile,v 1.31 2000/06/16 16:33:06 thorpej Exp $
# $NetBSD: Makefile,v 1.32 2000/06/23 06:01:10 thorpej Exp $
.include <bsd.own.mk>
PROG= ed
CPPFLAGS+=-DBACKWARDS
.if (${MKCRYPTO} != "no")
CPPFLAGS+=-DDES
.endif
SRCS= buf.c cbc.c glbl.c io.c main.c re.c sub.c undo.c
LDADD+= -lcrypt

View File

@ -1,18 +1,24 @@
# $NetBSD: Makefile,v 1.17 2000/06/20 06:00:27 thorpej Exp $
# $NetBSD: Makefile,v 1.18 2000/06/23 06:01:12 thorpej Exp $
# @(#)Makefile 8.1 (Berkeley) 7/19/93
.include <bsd.own.mk>
PROG= rcp
SRCS= rcp.c util.c
# XXX Kerberos support broken right now.
MKKERBEROS=no
#RLOGIN= ${.CURDIR}/../../usr.bin/rlogin
#SRCS+= krcmd.c kcmd.c
#CPPFLAGS+= -DKERBEROS -DCRYPT -I${RLOGIN}
.if (${MKKERBEROS} != "no")
#LDADD+= -lkrb -ldes
#DPADD+= ${LIBKRB} ${LIBDES}
RLOGIN= ${.CURDIR}/../../usr.bin/rlogin
SRCS+= krcmd.c kcmd.c
CPPFLAGS+= -DKERBEROS -DCRYPT -I${RLOGIN}
#.PATH: ${RLOGIN}
LDADD+= -lkrb -ldes
DPADD+= ${LIBKRB} ${LIBDES}
.PATH: ${RLOGIN}
.endif
.include <bsd.prog.mk>

View File

@ -1,6 +1,8 @@
# $NetBSD: Makefile,v 1.61 2000/06/20 06:00:33 thorpej Exp $
# $NetBSD: Makefile,v 1.62 2000/06/23 06:01:12 thorpej Exp $
# from: @(#)Makefile 5.25.1.1 (Berkeley) 5/7/91
.include <bsd.own.mk>
SUBDIR= csu libarch libbz2 libc libcompat libcrypt libcurses libedit \
libkvm libl libm libmenu libossaudio libpcap libposix \
libresolv librmt librpcsvc libskey libterm libusb libutil libwrap \
@ -8,6 +10,7 @@ SUBDIR= csu libarch libbz2 libc libcompat libcrypt libcurses libedit \
# XXX Crypto bits must be done before libtelnet.
.if (${MKCRYPTO} != "no")
# OpenSSL libraries. NOTE! WE DO NOT TRAVERSE INTO libdes FOR A REASON!
SUBDIR+= libcrypto libssl
@ -18,6 +21,7 @@ SUBDIR+= libroken libcom_err libsl libss libasn1 libkrb5 libhdb libkadm5 \
# KTH Kerberos 4 libraries
SUBDIR+= libkrb libkdb libkadm libkafs
SUBDIR+= libkstream
.endif # MKCRYPTO != no
SUBDIR+= libtelnet

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.4 2000/06/20 21:49:02 thorpej Exp $
# $NetBSD: Makefile,v 1.5 2000/06/23 06:01:13 thorpej Exp $
# RCSid:
# Id: Makefile,v 1.33 1998/11/11 11:53:53 sjg Exp
@ -16,6 +16,8 @@
# sjg@quick.com.au
#
.include <bsd.own.mk>
# XXX There's a bit of work to do before we can enable warnings.
WARNS=0
@ -29,6 +31,9 @@ CRYPTODIST= ${.CURDIR}/../../crypto/dist
.include "srcs.inc"
# NetBSD local addition to des library.
SRCS+= rnd_keys.c
# XXX
.if ${OBJECT_FMT} == "ELF"
AFLAGS+=-DELF
@ -56,18 +61,24 @@ INCS+= opensslv.h pem.h pem2.h pkcs12.h pkcs7.h rand.h rc2.h rc4.h
INCS+= ripemd.h safestack.h sha.h stack.h tmdiff.h
INCS+= txt_db.h x509.h x509_vfy.h x509v3.h
.if !defined(USELESS_CRYPTO)
INCS+= rsa.h rc5.h idea.h
INCS+= rsaref.h
.if (${MKCRYPTO_RSA} != "no")
INCS+= rsa.h rsaref.h
.PATH: ${OPENSSLSRC}/rsaref
.endif
.if (${MKCRYPTO_IDEA} != "no")
INCS+= idea.h
.endif
.if (${MKCRYPTO_RC5} != "no")
INCS+= rc5.h
.endif
INCSDIR=/usr/include/openssl
# this rebuilds the `srcs.inc' and the .inc files it reads.
# note that we have no idea, rc5 or rsa here so we include
# them explicitely above if we are using these ciphers.
# note that the resulting `srcs.inc' file needs to be modified
# to deal with our MKCRYPTO_* configuration variables.
update_inc:
(cd ${.CURDIR}; find ${OPENSSLSRC}/crypto \
@ -79,8 +90,6 @@ DES_SHLIB_MINOR != cd ${.CURDIR}/../libdes && make print-shlib-minor
LINKS+= ${LIBDIR}/libcrypto.a ${LIBDIR}/libdes.a
.include <bsd.own.mk>
.if ${MKPROFILE} != "no"
LINKS+= ${LIBDIR}/libcrypto_p.a ${LIBDIR}/libdes_p.a
.endif

View File

@ -7,11 +7,7 @@
.include "cast.inc"
.include "comp.inc"
.include "conf.inc"
.include "des.inc"
# NetBSD local addition to des library.
SRCS+= rnd_keys.c
.include "dh.inc"
.include "dsa.inc"
.include "err.inc"
@ -34,8 +30,15 @@ SRCS+= rnd_keys.c
.include "txt_db.inc"
.include "x509.inc"
.include "x509v3.inc"
.if !defined(USELESS_CRYPTO)
.if (${MKCRYPTO_RSA} != "no")
.include "rsa.inc"
.include "rc5.inc"
.endif
.if (${MKCRYPTO_IDEA} != "no")
.include "idea.inc"
.endif
.if (${MKCRYPTO_RC5} != "no")
.include "rc5.inc"
.endif

View File

@ -1,18 +1,23 @@
# from: @(#)Makefile 8.2 (Berkeley) 12/15/93
# $NetBSD: Makefile,v 1.11 2000/06/22 06:47:42 thorpej Exp $
# $NetBSD: Makefile,v 1.12 2000/06/23 06:01:13 thorpej Exp $
.include <bsd.own.mk>
LIB= telnet
SRCS= auth.c encrypt.c genget.c getent.c misc.c
CPPFLAGS+= -DHAS_CGETENT
CPPFLAGS+= -I${.CURDIR}
.if (${MKKERBEROS} != "no")
SRCS+= enc_des.c kerberos.c
SRCS+= kerberos5.c
CPPFLAGS+= -DHAS_CGETENT
CPPFLAGS+= -DENCRYPTION -DAUTHENTICATION
CPPFLAGS+= -DKRB4 -DDES_ENCRYPTION
CPPFLAGS+= -DKRB5
CPPFLAGS+= -I${DESTDIR}/usr/include/krb5
CPPFLAGS+= -I${DESTDIR}/usr/include/kerberosIV
CPPFLAGS+= -I${.CURDIR}
.endif
.include <bsd.lib.mk>

View File

@ -1,12 +1,16 @@
# $NetBSD: Makefile,v 1.37 2000/06/20 06:00:34 thorpej Exp $
# $NetBSD: Makefile,v 1.38 2000/06/23 06:01:14 thorpej Exp $
# @(#)Makefile 8.1 (Berkeley) 6/4/93
.include <bsd.own.mk>
SUBDIR= atrun comsat fingerd ftpd getNAME getty identd ld.aout_so \
ld.elf_so lfs_cleanerd mail.local makekey makewhatis rexecd \
rlogind rmail rshd rpc.rquotad rpc.rstatd rpc.rusersd rpc.rwalld \
rpc.sprayd talkd telnetd tftpd uucpd
.if (${MKCRYPTO} != "no")
# Heimdal/KTH Kerberos
SUBDIR+= hprop hpropd kadmind kdc kfd kpasswdd
.endif
.include <bsd.subdir.mk>

View File

@ -1,6 +1,8 @@
# $NetBSD: Makefile,v 1.24 2000/06/22 06:47:49 thorpej Exp $
# $NetBSD: Makefile,v 1.25 2000/06/23 06:01:14 thorpej Exp $
# from: @(#)Makefile 8.2 (Berkeley) 12/15/93
.include <bsd.own.mk>
MAN= telnetd.8
CPPFLAGS+=-DINET6
@ -13,13 +15,16 @@ SRCS= authenc.c global.c slc.c state.c sys_term.c telnetd.c \
DPADD= ${LIBUTIL} ${LIBTERMCAP} ${LIBTELNET}
LDADD+= -lutil -ltermcap -ltelnet
CPPFLAGS+=-I${.CURDIR}/../../lib
CPPFLAGS+=-I${.CURDIR}
.if (${MKKERBEROS} != "no")
CPPFLAGS+=-DAUTHENTICATION -DENCRYPTION
CPPFLAGS+=-I${DESTDIR}/usr/include/krb5
CPPFLAGS+=-I${.CURDIR}/../../lib
CPPFLAGS+=-DKRB5
CPPFLAGS+=-I${.CURDIR}
LDADD+= -lkrb5 -lkrb -lcrypto -lasn1 -lcom_err -lroken
DPADD+= ${LIBKRB5} ${LIBKRB} ${LIBCRYPTO} ${LIBASN1} ${LIBCOM_ERR} ${LIBROKEN}
.endif
.include <bsd.prog.mk>

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.own.mk,v 1.136 2000/05/02 11:44:20 simonb Exp $
# $NetBSD: bsd.own.mk,v 1.137 2000/06/23 06:01:15 thorpej Exp $
.if !defined(_BSD_OWN_MK_)
_BSD_OWN_MK_=1
@ -255,5 +255,34 @@ MKMAN=no
MKNLS=no
.endif
.if defined(NOCRYPTO)
MKCRYPTO=no
.else
MKCRYPTO?=yes
.endif
.if defined(NOCRYPTO_RSA)
MKCRYPTO_RSA=no
.else
MKCRYPTO_RSA?=yes
.endif
.if defined(NOCRYPTO_IDEA)
MKCRYPTO_IDEA=no
.else
MKCRYPTO_IDEA?=yes
.endif
.if defined(NOCRYPTO_RC5)
MKCRYPTO_RC5=no
.else
MKCRYPTO_RC5?=yes
.endif
.if defined(NOKERBEROS) || (${MKCRYPTO} == "no")
MKKERBEROS=no
.else
MKKERBEROS?=yes
.endif
.endif # _BSD_OWN_MK_

View File

@ -1,6 +1,8 @@
# $NetBSD: Makefile,v 1.109 2000/06/20 06:00:36 thorpej Exp $
# $NetBSD: Makefile,v 1.110 2000/06/23 06:01:15 thorpej Exp $
# from: @(#)Makefile 8.3 (Berkeley) 1/7/94
.include <bsd.own.mk>
SUBDIR= apply apropos asa at audio banner basename biff \
bzip2 bzip2recover cal calendar cap_mkdb cdplay checknr chflags \
chpass cksum cmp col colcrt colrm column comm compress \
@ -24,8 +26,10 @@ SUBDIR= apply apropos asa at audio banner basename biff \
write xargs xinstall xlint xstr yacc yes ypcat \
ypmatch ypwhich
.if (${MKCRYPTO} != "no")
SUBDIR+= openssl
SUBDIR+= compile_et kdestroy kf kinit klist kpasswd mk_cmds string2key
.endif
.include <bsd.subdir.mk>

View File

@ -1,6 +1,8 @@
# $NetBSD: Makefile,v 1.29 2000/06/20 06:00:36 thorpej Exp $
# $NetBSD: Makefile,v 1.30 2000/06/23 06:01:16 thorpej Exp $
# @(#)Makefile 8.1 (Berkeley) 7/19/93
.include <bsd.own.mk>
PROG= login
SRCS= login.c
DPADD+= ${LIBUTIL} ${LIBCRYPT}
@ -10,14 +12,13 @@ BINMODE=4555
INSTALLFLAGS=-fschg
CPPFLAGS+=-DLOGIN_CAP
.include <bsd.own.mk>
.ifdef SKEY
CPPFLAGS+=-DSKEY
DPADD+= ${LIBSKEY}
LDADD+= -lskey
.endif
.if (${MKKERBEROS} != "no")
SRCS+= k5login.c
CPPFLAGS+=-DKERBEROS5 -I${DESTDIR}/usr/include/krb5
LDADD+= -lkrb5 -lcrypto -lasn1 -lcom_err -lroken
@ -25,5 +26,6 @@ LDADD+= -lkrb5 -lcrypto -lasn1 -lcom_err -lroken
SRCS+= klogin.c
CPPFLAGS+=-DKERBEROS -I${DESTDIR}/usr/include/kerberosIV
LDADD+= -lkrb
.endif
.include <bsd.prog.mk>

View File

@ -1,9 +1,9 @@
# $NetBSD: Makefile,v 1.3 2000/06/20 21:57:12 thorpej Exp $
# $NetBSD: Makefile,v 1.4 2000/06/23 06:01:16 thorpej Exp $
.include <bsd.own.mk>
# RCSid:
# $Id: Makefile,v 1.3 2000/06/20 21:57:12 thorpej Exp $
# $Id: Makefile,v 1.4 2000/06/23 06:01:16 thorpej Exp $
#
# @(#) Copyright (c) 1995 Simon J. Gerraty
#
@ -89,7 +89,7 @@ CRYPTODIST= ${.CURDIR}/../../crypto/dist
# openssl rc2-cfb \
# openssl rc2-ofb \
.if !defined(USELESS_CRYPTO)
.if (${MKCRYPTO_RSA} != "no")
SRCS+= rsa.c genrsa.c
#LINKS+= openssl rsa \
# openssl rsa-cbc \

View File

@ -1,6 +1,8 @@
# $NetBSD: Makefile,v 1.18 2000/06/20 06:00:38 thorpej Exp $
# $NetBSD: Makefile,v 1.19 2000/06/23 06:01:17 thorpej Exp $
# from: @(#)Makefile 8.1 (Berkeley) 7/19/93
.include <bsd.own.mk>
PROG= su
DPADD+= ${LIBCRYPT}
LDADD+= -lcrypt -lutil
@ -13,6 +15,7 @@ CPPFLAGS+=-DLOGIN_CAP
#
#CPPFLAGS+=-DSUGROUP=\"sugroup\"
.if (${MKKERBEROS} != "no")
.ifdef AFS
DPADD+= ${LIBKAFS}
LDADD+= -lkafs
@ -21,6 +24,7 @@ LDADD+= -lkafs
CPPFLAGS+=-DKERBEROS -I${DESTDIR}/usr/include/kerberosIV
DPADD+= ${LIBKRB} ${LIBDES} ${LIBCOM_ERR} ${LIBROKEN}
LDADD+= -lkrb -ldes -lcom_err -lroken
.endif
.include <bsd.prog.mk>

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.21 2000/06/22 06:47:48 thorpej Exp $
# $NetBSD: Makefile,v 1.22 2000/06/23 06:01:17 thorpej Exp $
#
# Copyright (c) 1990 The Regents of the University of California.
# All rights reserved.
@ -34,6 +34,8 @@
# from: @(#)Makefile 8.1 (Berkeley) 6/6/93
#
.include <bsd.own.mk>
PROG= telnet
CPPFLAGS+=-DTERMCAP -DKLUDGELINEMODE -DUSE_TERMIO -Dunix
@ -53,10 +55,12 @@ LDADD+= -lipsec
DPADD+= ${LIBIPSEC}
CPPFLAGS+=-DINET6
.if (${MKKERBEROS} != "no")
CPPFLAGS+=-DAUTHENTICATION -DENCRYPTION -DKRB4
CPPFLAGS+=-DKRB5 -DFORWARD
LDADD+= -lkrb5 -lkrb -lcrypto -lasn1 -lcom_err -lroken
DPADD+= ${LIBKRB5} ${LIBKRB} ${LIBCRYPTO} ${LIBASN1} ${LIBCOM_ERR} ${LIBROKEN}
.endif
.include <bsd.prog.mk>

View File

@ -1,6 +1,8 @@
# $NetBSD: Makefile,v 1.144 2000/06/20 06:00:39 thorpej Exp $
# $NetBSD: Makefile,v 1.145 2000/06/23 06:01:18 thorpej Exp $
# from: @(#)Makefile 5.20 (Berkeley) 6/12/93
.include <bsd.own.mk>
SUBDIR= ac accton amd apm apmd arp bad144 bind bootp catman \
chown chroot chrtbl cnwctl config cron dbsym dev_mkdb \
dhcp diskpart dumpfs dumplfs edquota eeprom \
@ -25,6 +27,8 @@ SUBDIR+=faithd gifconfig ifmcstat mld6query mtrace6 ndp pim6dd pim6sd \
# ATM PVC
SUBDIR+=pvcsif pvctxctl
.if (${MKCRYPTO} != "no")
SUBDIR+= kadmin kstash ktutil
.endif
.include <bsd.subdir.mk>