1 # $NetBSD: Makefile,v 1.29 2019/10/13 07:28:05 mrg 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 blowfish.c \ 16 canohost.c \ 17 chacha.c \ 18 channels.c \ 19 cipher-chachapoly.c \ 20 cipher.c \ 21 cleanup.c \ 22 compat.c \ 23 dh.c \ 24 dispatch.c \ 25 dns.c \ 26 ed25519.c \ 27 fatal.c \ 28 fe25519.c \ 29 freezero.c \ 30 ge25519.c \ 31 hash.c \ 32 hmac.c \ 33 hostfile.c \ 34 kex.c \ 35 kexdh.c \ 36 kexecdh.c \ 37 kexgen.c \ 38 kexgex.c \ 39 kexgexc.c \ 40 kexsntrup4591761x25519.c \ 41 krl.c \ 42 log.c \ 43 mac.c \ 44 match.c \ 45 misc.c \ 46 monitor_fdpass.c \ 47 msg.c \ 48 nchan.c \ 49 packet.c \ 50 poly1305.c \ 51 progressmeter.c \ 52 readpass.c \ 53 recallocarray.c \ 54 sc25519.c \ 55 smult_curve25519_ref.c \ 56 sntrup4591761.c \ 57 ssh-ed25519.c \ 58 ssh-pkcs11.c \ 59 ssh-xmss.c \ 60 sshbuf-getput-basic.c \ 61 sshbuf-getput-crypto.c \ 62 sshbuf-misc.c \ 63 sshbuf.c \ 64 ssherr.c \ 65 sshkey-xmss.c \ 66 sshkey.c \ 67 ttymodes.c \ 68 uidswap.c \ 69 umac.c \ 70 umac128.c \ 71 utf8.c \ 72 verify.c \ 73 xmalloc.c \ 74 xmss_commons.c \ 75 xmss_fast.c \ 76 xmss_hash.c \ 77 xmss_hash_address.c \ 78 xmss_wots.c 79 80 OPENSSL_SRCS=\ 81 digest-openssl.c \ 82 kexc25519.c \ 83 ssh-dss.c \ 84 ssh-ecdsa.c \ 85 ssh-rsa.c 86 87 SRCS+= fmt_scaled.c 88 SRCS+= readpassphrase.c getpeereid.c getrrsetbyname.c 89 COPTS.monitor_fdpass.c+=-Wno-stack-protector 90 COPTS.xmss_fast.c+= -Wno-stack-protector 91 COPTS.xmss_hash.c+= -Wno-stack-protector 92 COPTS.xmss_wots.c+= -Wno-stack-protector 93 COPTS.sntrup4591761.c+= -Wno-stack-protector 94 95 .if WITH_OPENSSL 96 SRCS+= ${OPENSSL_SRCS} 97 .else 98 SRCS+= digest-libc.c 99 .endif 100 101 CPPFLAGS+= -DHAVE_BLF_H 102 103 CPPFLAGS+= -I${SSHDIST} 104 .PATH: ${SSHDIST} 105 106 LIBDPLIBS+= crypto ${NETBSDSRCDIR}/crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib/libcrypto \ 107 crypt ${NETBSDSRCDIR}/lib/libcrypt \ 108 z ${NETBSDSRCDIR}/lib/libz 109 110 .for f in dns channels hostfile ssh-pkcs11 111 COPTS.${f}.c+= -Wno-pointer-sign 112 .endfor 113 114 # XXX 115 COPTS.channels.c+= -fno-strict-aliasing 116 117 # XXX 118 .if ${MACHINE} == "vax" 119 COPTS.poly1305.c+= -O0 120 COPTS.umac.c+= -O0 121 .endif 122 123 COPTS.hostfile.c+= ${GCC_NO_FORMAT_TRUNCATION} 124 COPTS.sshkey.c+= ${GCC_NO_FORMAT_TRUNCATION} 125 126 .include <bsd.lib.mk> 127