-# $OpenBSD: Makefile.inc,v 1.56 2017/12/10 19:37:57 deraadt Exp $
+# $OpenBSD: Makefile.inc,v 1.57 2018/01/08 15:37:21 markus Exp $
.include <bsd.own.mk>
CFLAGS+= -DHAVE_DLOPEN
.endif
+SRCS_BASE+= sshbuf.c
+SRCS_BASE+= sshbuf-getput-basic.c
+SRCS_BASE+= ssherr.c
+SRCS_BASE+= log.c
+SRCS_BASE+= xmalloc.c
+SRCS_BASE+= misc.c
+
+.if (${OPENSSL:L} == "yes")
+SRCS_KEX+= dh.c
+SRCS_KEX+= kexdh.c
+SRCS_KEX+= kexecdh.c
+SRCS_KEX+= kexgex.c
+SRCS_KEXC+= kexdhc.c
+SRCS_KEXC+= kexecdhc.c
+SRCS_KEXC+= kexgexc.c
+SRCS_KEXS+= kexdhs.c
+SRCS_KEXS+= kexecdhs.c
+SRCS_KEXS+= kexgexs.c
+.endif
+SRCS_KEX+= kexc25519.c
+SRCS_KEX+= smult_curve25519_ref.c
+SRCS_KEXC+= kexc25519c.c
+SRCS_KEXS+= kexc25519s.c
+
+SRCS_KEY+= sshkey.c
+SRCS_KEY+= sshbuf-misc.c
+SRCS_KEY+= cipher.c
+SRCS_KEY+= cipher-chachapoly.c
+SRCS_KEY+= chacha.c
+SRCS_KEY+= poly1305.c
+.if (${OPENSSL:L} == "yes")
+SRCS_KEY+= ssh-dss.c
+SRCS_KEY+= ssh-ecdsa.c
+SRCS_KEY+= ssh-rsa.c
+SRCS_KEY+= sshbuf-getput-crypto.c
+SRCS_KEY+= digest-openssl.c
+.else
+SRCS_KEY+= cipher-aesctr.c
+SRCS_KEY+= rijndael.c
+SRCS_KEY+= digest-libc.c
+.endif
+SRCS_KEY+= ssh-ed25519.c
+# ed25519, from supercop
+SRCS_KEY+= sc25519.c
+SRCS_KEY+= ge25519.c
+SRCS_KEY+= fe25519.c
+SRCS_KEY+= ed25519.c
+SRCS_KEY+= verify.c
+SRCS_KEY+= hash.c
+
+SRCS_KEYP+= authfile.c
+
+SRCS_KRL+= bitmap.c
+SRCS_KRL+= krl.c
+
+SRCS_PKT+= canohost.c
+SRCS_PKT+= dispatch.c
+SRCS_PKT+= hmac.c
+SRCS_PKT+= kex.c
+SRCS_PKT+= mac.c
+SRCS_PKT+= packet.c
+SRCS_PKT+= umac.c
+SRCS_PKT+= umac128.c
+
+.if (${OPENSSL:L} == "yes")
+SRCS_PROT+= bufbn.c
+SRCS_PROT+= bufec.c
+.endif
+SRCS_PROT+= channels.c
+SRCS_PROT+= crc32.c
+SRCS_PROT+= monitor_fdpass.c
+SRCS_PROT+= nchan.c
+SRCS_PROT+= opacket.c
+SRCS_PROT+= ttymodes.c
+
+SRCS_UTL+= addrmatch.c
+SRCS_UTL+= match.c
+SRCS_UTL+= uidswap.c
+
+.if (${OPENSSL:L} == "yes")
+SRCS_PKCS11+= ssh-pkcs11.c
+.else
+SRCS_PKCS11+=
+.endif
+
.include <bsd.obj.mk>
-# $OpenBSD: Makefile,v 1.19 2018/01/08 15:21:49 markus Exp $
+# $OpenBSD: Makefile,v 1.20 2018/01/08 15:37:22 markus Exp $
.PATH: ${.CURDIR}/..
SRCS= scp.c
-SRCS+= atomicio.c cleanup.c fatal.c log.c misc.c progressmeter.c \
- sshbuf-getput-basic.c sshbuf.c ssherr.c utf8.c xmalloc.c
+SRCS+= atomicio.c cleanup.c fatal.c progressmeter.c utf8.c
+SRCS+= ${SRCS_BASE}
PROG= scp
BINOWN= root
-# $OpenBSD: Makefile,v 1.10 2017/12/10 19:37:57 deraadt Exp $
+# $OpenBSD: Makefile,v 1.11 2018/01/08 15:37:23 markus Exp $
.PATH: ${.CURDIR}/..
SRCS= sftp-server.c sftp-common.c sftp-server-main.c
-SRCS+= addrmatch.c fatal.c log.c match.c misc.c sshbuf-getput-basic.c \
- sshbuf.c ssherr.c uidswap.c xmalloc.c
+SRCS+= fatal.c
+SRCS+= ${SRCS_BASE} ${SRCS_UTL}
PROG= sftp-server
BINOWN= root
-# $OpenBSD: Makefile,v 1.15 2018/01/08 15:21:49 markus Exp $
+# $OpenBSD: Makefile,v 1.16 2018/01/08 15:37:24 markus Exp $
.PATH: ${.CURDIR}/..
SRCS= sftp.c sftp-client.c sftp-common.c sftp-glob.c
-SRCS+= atomicio.c cleanup.c fatal.c log.c misc.c progressmeter.c \
- sshbuf-getput-basic.c sshbuf.c ssherr.c utf8.c xmalloc.c
+SRCS+= atomicio.c cleanup.c fatal.c progressmeter.c utf8.c
+SRCS+= ${SRCS_BASE}
PROG= sftp
BINOWN= root
-# $OpenBSD: Makefile,v 1.23 2017/12/14 21:07:39 naddy Exp $
+# $OpenBSD: Makefile,v 1.24 2018/01/08 15:37:25 markus Exp $
.PATH: ${.CURDIR}/..
SRCS= ssh-add.c
-SRCS+= addrmatch.c atomicio.c authfd.c authfile.c bitmap.c chacha.c \
- cipher-chachapoly.c cipher.c cleanup.c digest-openssl.c ed25519.c \
- fatal.c fe25519.c ge25519.c hash.c krl.c log.c match.c misc.c \
- poly1305.c readpass.c sc25519.c ssh-dss.c ssh-ecdsa.c ssh-ed25519.c \
- ssh-rsa.c sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c \
- sshbuf.c ssherr.c sshkey.c uidswap.c verify.c xmalloc.c
+SRCS+= atomicio.c authfd.c cleanup.c fatal.c readpass.c
+SRCS+= ${SRCS_BASE} ${SRCS_KEY} ${SRCS_KEYP} ${SRCS_KRL} ${SRCS_UTL}
PROG= ssh-add
BINOWN= root
-# $OpenBSD: Makefile,v 1.27 2017/12/14 21:07:39 naddy Exp $
+# $OpenBSD: Makefile,v 1.28 2018/01/08 15:37:26 markus Exp $
.PATH: ${.CURDIR}/..
SRCS= ssh-agent.c ssh-pkcs11-client.c
-SRCS+= addrmatch.c atomicio.c authfile.c bitmap.c bufaux.c buffer.c \
- chacha.c cipher-chachapoly.c cipher.c compat.c digest-openssl.c \
- ed25519.c fatal.c fe25519.c ge25519.c hash.c key.c krl.c log.c match.c \
- misc.c poly1305.c readpass.c sc25519.c ssh-dss.c ssh-ecdsa.c \
- ssh-ed25519.c ssh-rsa.c sshbuf-getput-basic.c sshbuf-getput-crypto.c \
- sshbuf-misc.c sshbuf.c ssherr.c sshkey.c uidswap.c verify.c xmalloc.c
-
+SRCS+= atomicio.c bufaux.c buffer.c compat.c fatal.c key.c readpass.c
+SRCS+= ${SRCS_BASE} ${SRCS_KEY} ${SRCS_KEYP} ${SRCS_KRL} ${SRCS_UTL}
PROG= ssh-agent
BINOWN= root
BINGRP= _sshagnt
-# $OpenBSD: Makefile,v 1.25 2017/12/14 21:07:39 naddy Exp $
+# $OpenBSD: Makefile,v 1.26 2018/01/08 15:37:27 markus Exp $
.PATH: ${.CURDIR}/..
-SRCS= ssh-keygen.c moduli.c
-SRCS+= addrmatch.c atomicio.c authfd.c authfile.c bitmap.c chacha.c \
- cipher-chachapoly.c cipher.c cleanup.c digest-openssl.c dns.c \
- ed25519.c fatal.c fe25519.c ge25519.c hash.c hmac.c hostfile.c krl.c \
- log.c match.c misc.c poly1305.c readpass.c sc25519.c ssh-dss.c \
- ssh-ecdsa.c ssh-ed25519.c ssh-pkcs11.c ssh-rsa.c sshbuf-getput-basic.c \
- sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c ssherr.c sshkey.c \
- uidswap.c utf8.c uuencode.c verify.c xmalloc.c
+SRCS= ssh-keygen.c moduli.c uuencode.c
+SRCS+= atomicio.c authfd.c cleanup.c dns.c fatal.c hmac.c hostfile.c \
+ readpass.c utf8.c
+SRCS+= ${SRCS_BASE} ${SRCS_KEY} ${SRCS_KEYP} ${SRCS_KRL} ${SRCS_UTL} \
+ ${SRCS_PKCS11}
PROG= ssh-keygen
BINOWN= root
-# $OpenBSD: Makefile,v 1.10 2017/12/14 21:07:39 naddy Exp $
+# $OpenBSD: Makefile,v 1.11 2018/01/08 15:37:28 markus Exp $
.PATH: ${.CURDIR}/..
SRCS= ssh-keyscan.c
-
-SRCS+= addrmatch.c atomicio.c canohost.c chacha.c \
- cipher-chachapoly.c cipher.c cleanup.c compat.c dh.c digest-openssl.c \
- dispatch.c ed25519.c fe25519.c ge25519.c hash.c hmac.c hostfile.c \
- kex.c kexc25519.c kexc25519c.c kexc25519s.c kexdh.c kexdhc.c kexdhs.c \
- kexecdh.c kexecdhc.c kexecdhs.c kexgex.c kexgexc.c kexgexs.c log.c \
- mac.c match.c misc.c packet.c poly1305.c sc25519.c \
- smult_curve25519_ref.c ssh-dss.c ssh-ecdsa.c ssh-ed25519.c ssh-rsa.c \
- ssh_api.c sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c \
- sshbuf.c ssherr.c sshkey.c uidswap.c umac.c umac128.c verify.c \
- xmalloc.c
-
+SRCS+= atomicio.c cleanup.c compat.c hostfile.c ssh_api.c
+SRCS+= ${SRCS_BASE} ${SRCS_KEX} ${SRCS_KEXC} ${SRCS_KEXS} ${SRCS_KEY} \
+ ${SRCS_PKT} ${SRCS_UTL}
PROG= ssh-keyscan
BINOWN= root
-# $OpenBSD: Makefile,v 1.12 2017/12/14 21:07:39 naddy Exp $
+# $OpenBSD: Makefile,v 1.13 2018/01/08 15:37:38 markus Exp $
.PATH: ${.CURDIR}/..
SRCS= ssh-keysign.c readconf.c
-
-SRCS+= addrmatch.c atomicio.c authfile.c bitmap.c canohost.c \
- chacha.c cipher-chachapoly.c cipher.c cleanup.c digest-openssl.c \
- dispatch.c ed25519.c fatal.c fe25519.c ge25519.c hash.c hmac.c kex.c \
- krl.c log.c mac.c match.c misc.c msg.c packet.c poly1305.c sc25519.c \
- ssh-dss.c ssh-ecdsa.c ssh-ed25519.c ssh-rsa.c sshbuf-getput-basic.c \
- sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c ssherr.c sshkey.c \
- uidswap.c umac.c umac128.c verify.c xmalloc.c
-
+SRCS+= atomicio.c cleanup.c fatal.c msg.c
+SRCS+= ${SRCS_BASE} ${SRCS_KEY} ${SRCS_KEYP} ${SRCS_KRL} ${SRCS_PKT} \
+ ${SRCS_UTL}
PROG= ssh-keysign
BINOWN= root
-# $OpenBSD: Makefile,v 1.5 2018/01/08 15:18:46 markus Exp $
+# $OpenBSD: Makefile,v 1.6 2018/01/08 15:37:38 markus Exp $
.PATH: ${.CURDIR}/..
SRCS= ssh-pkcs11-helper.c ssh-pkcs11.c
-SRCS+= addrmatch.c atomicio.c bufaux.c buffer.c \
- chacha.c cipher-chachapoly.c cipher.c compat.c digest-openssl.c \
- ed25519.c fatal.c fe25519.c ge25519.c hash.c log.c match.c \
- misc.c poly1305.c readpass.c sc25519.c ssh-dss.c ssh-ecdsa.c \
- ssh-ed25519.c ssh-rsa.c sshbuf-getput-basic.c sshbuf-getput-crypto.c \
- sshbuf-misc.c sshbuf.c ssherr.c sshkey.c uidswap.c verify.c xmalloc.c
+SRCS+= atomicio.c bufaux.c buffer.c compat.c fatal.c readpass.c
+SRCS+= ${SRCS_KEY} ${SRCS_UTL} ${SRCS_BASE}
PROG= ssh-pkcs11-helper
BINOWN= root
LDADD+= -lcrypto -lutil
DPADD+= ${LIBCRYPTO} ${LIBUTIL}
-
-# $OpenBSD: Makefile,v 1.71 2018/01/08 15:15:17 markus Exp $
+# $OpenBSD: Makefile,v 1.72 2018/01/08 15:37:38 markus Exp $
.PATH: ${.CURDIR}/..
SRCS= ssh.c readconf.c clientloop.c sshtty.c sshconnect.c sshconnect2.c mux.c
-
-SRCS+= addrmatch.c atomicio.c authfd.c authfile.c bitmap.c bufaux.c \
- bufbn.c bufec.c buffer.c canohost.c chacha.c channels.c \
- cipher-chachapoly.c cipher.c compat.c crc32.c dh.c digest-openssl.c \
- dispatch.c dns.c ed25519.c fatal.c fe25519.c ge25519.c hash.c hmac.c \
- hostfile.c kex.c kexc25519.c kexc25519c.c kexdh.c \
- kexdhc.c kexecdh.c kexecdhc.c kexgex.c kexgexc.c \
- key.c krl.c log.c mac.c match.c misc.c monitor_fdpass.c msg.c nchan.c \
- opacket.c packet.c poly1305.c readpass.c sc25519.c \
- smult_curve25519_ref.c ssh-dss.c ssh-ecdsa.c ssh-ed25519.c \
- ssh-pkcs11.c ssh-rsa.c sshbuf-getput-basic.c sshbuf-getput-crypto.c \
- sshbuf-misc.c sshbuf.c ssherr.c sshkey.c ttymodes.c uidswap.c umac.c \
- umac128.c utf8.c verify.c xmalloc.c
+SRCS+= atomicio.c authfd.c bufaux.c buffer.c compat.c dns.c fatal.c \
+ hostfile.c key.c msg.c readpass.c utf8.c
+SRCS+= ${SRCS_BASE} ${SRCS_KEX} ${SRCS_KEXC} ${SRCS_KEY} ${SRCS_KEYP} \
+ ${SRCS_KRL} ${SRCS_PROT} ${SRCS_PKT} ${SRCS_UTL} ${SRCS_PKCS11}
PROG= ssh
BINOWN= root
.endif # KERBEROS5
.if (${OPENSSL:L} == "yes")
-LDADD+= -lcrypto -lutil
-DPADD+= ${LIBCRYPTO} ${LIBUTIL}
+LDADD+= -lcrypto
+DPADD+= ${LIBCRYPTO}
.endif
-LDADD+= -lz
-DPADD+= ${LIBZ}
+LDADD+= -lutil -lz
+DPADD+= ${LIBUTIL} ${LIBZ}
-# $OpenBSD: Makefile,v 1.94 2018/01/08 15:15:36 markus Exp $
+# $OpenBSD: Makefile,v 1.95 2018/01/08 15:37:38 markus Exp $
.PATH: ${.CURDIR}/..
groupaccess.c auth-bsdauth.c auth2-hostbased.c auth2-kbdint.c \
auth2-none.c auth2-passwd.c auth2-pubkey.c monitor.c monitor_wrap.c \
sftp-server.c sftp-common.c sandbox-pledge.c
-
-SRCS+= addrmatch.c atomicio.c authfd.c authfile.c bitmap.c bufaux.c \
- bufbn.c bufec.c buffer.c canohost.c chacha.c channels.c \
- cipher-chachapoly.c cipher.c compat.c crc32.c dh.c digest-openssl.c \
- dispatch.c dns.c ed25519.c fatal.c fe25519.c ge25519.c hash.c hmac.c \
- hostfile.c kex.c kexc25519.c kexc25519s.c kexdh.c \
- kexdhs.c kexecdh.c kexecdhs.c kexgex.c \
- kexgexs.c key.c krl.c log.c mac.c match.c misc.c monitor_fdpass.c \
- msg.c nchan.c opacket.c packet.c poly1305.c readpass.c \
- sc25519.c smult_curve25519_ref.c ssh-dss.c ssh-ecdsa.c ssh-ed25519.c \
- ssh-pkcs11.c ssh-rsa.c sshbuf-getput-basic.c sshbuf-getput-crypto.c \
- sshbuf-misc.c sshbuf.c ssherr.c sshkey.c ttymodes.c uidswap.c umac.c \
- umac128.c utf8.c verify.c xmalloc.c
+SRCS+= atomicio.c authfd.c bufaux.c buffer.c compat.c dns.c fatal.c \
+ hostfile.c key.c msg.c readpass.c utf8.c
+SRCS+= ${SRCS_BASE} ${SRCS_KEX} ${SRCS_KEXS} ${SRCS_KEY} ${SRCS_KEYP} \
+ ${SRCS_KRL} ${SRCS_PROT} ${SRCS_PKT} ${SRCS_UTL} ${SRCS_PKCS11}
PROG= sshd
BINOWN= root
.endif
.if (${OPENSSL:L} == "yes")
-LDADD+= -lcrypto -lutil
-DPADD+= ${LIBCRYPTO} ${LIBUTIL}
+LDADD+= -lcrypto
+DPADD+= ${LIBCRYPTO}
.endif
-LDADD+= -lz
-DPADD+= ${LIBZ}
+LDADD+= -lutil -lz
+DPADD+= ${LIBUTIL} ${LIBZ}