Home | History | Annotate | Line # | Download | only in lib
Makefile revision 1.38
      1 #	$NetBSD: Makefile,v 1.38 2023/10/07 12:15:49 rin 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 kexdh.c \
     37 kexecdh.c \
     38 kexgen.c \
     39 kexgex.c \
     40 kexgexc.c \
     41 kexsntrup761x25519.c \
     42 krl.c \
     43 log.c \
     44 mac.c \
     45 match.c \
     46 misc.c \
     47 monitor_fdpass.c \
     48 msg.c \
     49 nchan.c \
     50 packet.c \
     51 poly1305.c \
     52 progressmeter.c \
     53 readpass.c \
     54 recallocarray.c \
     55 smult_curve25519_ref.c \
     56 sntrup761.c \
     57 ssh-ed25519.c \
     58 ssh-ed25519-sk.c \
     59 ssh-pkcs11.c \
     60 ssh-sk-client.c \
     61 ssh-xmss.c \
     62 sshbuf-getput-basic.c \
     63 sshbuf-getput-crypto.c \
     64 sshbuf-misc.c \
     65 sshbuf-io.c \
     66 sshbuf.c \
     67 ssherr.c \
     68 sshkey-xmss.c \
     69 sshkey.c \
     70 ttymodes.c \
     71 uidswap.c \
     72 umac.c \
     73 umac128.c \
     74 utf8.c \
     75 xmalloc.c \
     76 xmss_commons.c \
     77 xmss_fast.c \
     78 xmss_hash.c \
     79 xmss_hash_address.c \
     80 xmss_wots.c
     81 
     82 OPENSSL_SRCS=\
     83 digest-openssl.c \
     84 kexc25519.c \
     85 ssh-dss.c \
     86 ssh-ecdsa.c \
     87 ssh-ecdsa-sk.c \
     88 ssh-rsa.c
     89 
     90 SRCS+=	fmt_scaled.c
     91 SRCS+=	readpassphrase.c getpeereid.c getrrsetbyname.c
     92 COPTS.monitor_fdpass.c+=-Wno-stack-protector
     93 COPTS.xmss_fast.c+=	-Wno-stack-protector
     94 COPTS.xmss_hash.c+=	-Wno-stack-protector
     95 COPTS.xmss_wots.c+=	-Wno-stack-protector
     96 COPTS.sntrup761.c+=	-Wno-stack-protector
     97 
     98 .if WITH_OPENSSL
     99 SRCS+=		${OPENSSL_SRCS}
    100 .else
    101 SRCS+=		digest-libc.c
    102 .endif
    103 
    104 CPPFLAGS+= -DHAVE_BLF_H
    105 
    106 CPPFLAGS+=	-I${SSHDIST}
    107 .PATH:		${SSHDIST}
    108 
    109 LIBDPLIBS+=	crypto	${NETBSDSRCDIR}/crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib/libcrypto \
    110 		crypt	${NETBSDSRCDIR}/lib/libcrypt \
    111 		z	${NETBSDSRCDIR}/lib/libz
    112 
    113 .for f in dns channels hostfile ssh-pkcs11
    114 COPTS.${f}.c+=	-Wno-pointer-sign
    115 .endfor
    116 
    117 # XXX
    118 COPTS.channels.c+=	-fno-strict-aliasing
    119 
    120 COPTS.hostfile.c+=	${CC_WNO_FORMAT_TRUNCATION}
    121 COPTS.sshkey.c+=	${CC_WNO_FORMAT_TRUNCATION}
    122 COPTS.cipher.c+=	-Wno-error=deprecated-declarations
    123 COPTS.dh.c+=		-Wno-error=deprecated-declarations
    124 COPTS.kex.c+=		-Wno-error=deprecated-declarations
    125 COPTS.kexdh.c+=		-Wno-error=deprecated-declarations
    126 COPTS.kexecdh.c+=	-Wno-error=deprecated-declarations
    127 COPTS.kexgexc.c+=	-Wno-error=deprecated-declarations
    128 COPTS.ssh-dss.c+=	-Wno-error=deprecated-declarations
    129 COPTS.ssh-ecdsa-sk.c+=	-Wno-error=deprecated-declarations
    130 COPTS.ssh-ecdsa.c+=	-Wno-error=deprecated-declarations
    131 COPTS.ssh-pkcs11.c+=	-Wno-error=deprecated-declarations
    132 COPTS.ssh-rsa.c+=	-Wno-error=deprecated-declarations
    133 COPTS.sshbuf-getput-crypto.c+=	-Wno-error=deprecated-declarations
    134 COPTS.sshkey.c+=	-Wno-error=deprecated-declarations
    135 COPTS.umac.c+=		-Wno-error=deprecated-declarations
    136 COPTS.umac128.c+=	-Wno-error=deprecated-declarations
    137 
    138 .include <bsd.lib.mk>
    139