1 # $NetBSD: Makefile,v 1.21.4.1 2017/12/04 10:55:19 snj Exp $ 2 3 .include <bsd.own.mk> 4 5 .include "../Makefile.inc" 6 7 LIB= ssh 8 SRCS=\ 9 addrmatch.c \ 10 atomicio.c \ 11 authfd.c \ 12 authfile.c \ 13 bcrypt_pbkdf.c \ 14 bitmap.c \ 15 blocks.c \ 16 blowfish.c \ 17 bufaux.c \ 18 bufbn.c \ 19 bufec.c \ 20 buffer.c \ 21 canohost.c \ 22 channels.c \ 23 cipher-chachapoly.c \ 24 cipher.c \ 25 chacha.c \ 26 cleanup.c \ 27 compat.c \ 28 crc32.c \ 29 dh.c \ 30 dispatch.c \ 31 dns.c \ 32 ed25519.c \ 33 fatal.c \ 34 fe25519.c \ 35 ge25519.c \ 36 hash.c \ 37 hmac.c \ 38 hostfile.c \ 39 kex.c \ 40 kexdh.c \ 41 kexdhc.c \ 42 kexecdh.c \ 43 kexecdhc.c \ 44 kexgex.c \ 45 kexgexc.c \ 46 key.c \ 47 krl.c \ 48 log.c \ 49 mac.c \ 50 match.c \ 51 misc.c \ 52 monitor_fdpass.c \ 53 msg.c \ 54 nchan.c \ 55 opacket.c \ 56 packet.c \ 57 poly1305.c \ 58 progressmeter.c \ 59 readpass.c \ 60 recallocarray.c \ 61 sc25519.c \ 62 smult_curve25519_ref.c \ 63 sshbuf-getput-basic.c \ 64 sshbuf-misc.c \ 65 sshbuf-getput-crypto.c \ 66 sshbuf.c \ 67 ssherr.c \ 68 sshkey.c \ 69 ssh-ed25519.c \ 70 ssh-pkcs11.c \ 71 ttymodes.c \ 72 uidswap.c \ 73 umac.c \ 74 umac128.c \ 75 utf8.c \ 76 uuencode.c \ 77 verify.c \ 78 xmalloc.c 79 80 OPENSSL_SRCS=\ 81 digest-openssl.c \ 82 kexc25519.c \ 83 kexc25519c.c \ 84 kexc25519s.c \ 85 ssh-dss.c \ 86 ssh-ecdsa.c \ 87 ssh-rsa.c 88 89 SRCS+= fmt_scaled.c 90 SRCS+= readpassphrase.c getpeereid.c getrrsetbyname.c 91 COPTS.monitor_fdpass.c = -Wno-stack-protector 92 93 .if WITH_OPENSSL 94 SRCS+= ${OPENSSL_SRCS} 95 .else 96 SRCS+= digest-libc.c 97 .endif 98 99 CPPFLAGS+= -DHAVE_BLF_H 100 101 CPPFLAGS+= -I${SSHDIST} 102 .PATH: ${SSHDIST} 103 104 LIBDPLIBS+= crypto ${NETBSDSRCDIR}/crypto/external/bsd/openssl/lib/libcrypto \ 105 crypt ${NETBSDSRCDIR}/lib/libcrypt \ 106 z ${NETBSDSRCDIR}/lib/libz 107 108 .for f in dns channels hostfile ssh-pkcs11 109 COPTS.${f}.c+= -Wno-pointer-sign 110 .endfor 111 112 # XXX 113 COPTS.channels.c+= -fno-strict-aliasing 114 115 # XXX 116 .if ${MACHINE} == "vax" 117 COPTS.poly1305.c+= -O0 118 COPTS.umac.c+= -O0 119 .endif 120 121 .include <bsd.lib.mk> 122