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