1 # $NetBSD: Makefile,v 1.40 2024/09/24 21:32:20 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 freezero.c \ 32 hash.c \ 33 hmac.c \ 34 hostfile.c \ 35 kex.c \ 36 kex-names.c \ 37 kexdh.c \ 38 kexecdh.c \ 39 kexgen.c \ 40 kexgex.c \ 41 kexgexc.c \ 42 kexmlkem768x25519.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 smult_curve25519_ref.c \ 58 sntrup761.c \ 59 ssh-ed25519.c \ 60 ssh-ed25519-sk.c \ 61 ssh-pkcs11.c \ 62 ssh-sk-client.c \ 63 ssh-xmss.c \ 64 sshbuf-getput-basic.c \ 65 sshbuf-getput-crypto.c \ 66 sshbuf-misc.c \ 67 sshbuf-io.c \ 68 sshbuf.c \ 69 ssherr.c \ 70 sshkey-xmss.c \ 71 sshkey.c \ 72 ttymodes.c \ 73 uidswap.c \ 74 umac.c \ 75 umac128.c \ 76 utf8.c \ 77 xmalloc.c \ 78 xmss_commons.c \ 79 xmss_fast.c \ 80 xmss_hash.c \ 81 xmss_hash_address.c \ 82 xmss_wots.c 83 84 OPENSSL_SRCS=\ 85 digest-openssl.c \ 86 kexc25519.c \ 87 ssh-dss.c \ 88 ssh-ecdsa.c \ 89 ssh-ecdsa-sk.c \ 90 ssh-rsa.c 91 92 SRCS+= fmt_scaled.c 93 SRCS+= readpassphrase.c getpeereid.c getrrsetbyname.c 94 COPTS.monitor_fdpass.c+=-Wno-stack-protector 95 COPTS.xmss_fast.c+= -Wno-stack-protector 96 COPTS.xmss_hash.c+= -Wno-stack-protector 97 COPTS.xmss_wots.c+= -Wno-stack-protector 98 COPTS.sntrup761.c+= -Wno-stack-protector 99 100 .if WITH_OPENSSL 101 SRCS+= ${OPENSSL_SRCS} 102 .else 103 SRCS+= digest-libc.c 104 .endif 105 106 CPPFLAGS+= -DHAVE_BLF_H 107 108 CPPFLAGS+= -I${SSHDIST} 109 .PATH: ${SSHDIST} 110 111 LIBDPLIBS+= crypto ${NETBSDSRCDIR}/crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib/libcrypto \ 112 crypt ${NETBSDSRCDIR}/lib/libcrypt \ 113 z ${NETBSDSRCDIR}/lib/libz 114 115 .for f in dns channels hostfile ssh-pkcs11 116 COPTS.${f}.c+= -Wno-pointer-sign 117 .endfor 118 119 # XXX 120 COPTS.channels.c+= -fno-strict-aliasing 121 122 COPTS.hostfile.c+= ${CC_WNO_FORMAT_TRUNCATION} 123 COPTS.sshkey.c+= ${CC_WNO_FORMAT_TRUNCATION} 124 COPTS.cipher.c+= -Wno-error=deprecated-declarations 125 COPTS.dh.c+= -Wno-error=deprecated-declarations 126 COPTS.kex.c+= -Wno-error=deprecated-declarations 127 COPTS.kexdh.c+= -Wno-error=deprecated-declarations 128 COPTS.kexecdh.c+= -Wno-error=deprecated-declarations 129 COPTS.kexgexc.c+= -Wno-error=deprecated-declarations 130 COPTS.ssh-dss.c+= -Wno-error=deprecated-declarations 131 COPTS.ssh-ecdsa-sk.c+= -Wno-error=deprecated-declarations 132 COPTS.ssh-ecdsa.c+= -Wno-error=deprecated-declarations 133 COPTS.ssh-pkcs11.c+= -Wno-error=deprecated-declarations 134 COPTS.ssh-rsa.c+= -Wno-error=deprecated-declarations 135 COPTS.sshbuf-getput-crypto.c+= -Wno-error=deprecated-declarations 136 COPTS.sshkey.c+= -Wno-error=deprecated-declarations 137 COPTS.umac.c+= -Wno-error=deprecated-declarations 138 COPTS.umac128.c+= -Wno-error=deprecated-declarations 139 140 .include <bsd.lib.mk> 141