Home | History | Annotate | Line # | Download | only in lib
Makefile revision 1.32
      1 #	$NetBSD: Makefile,v 1.32 2020/02/29 20:44:15 mgorny 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 addrmatch.c \
     12 atomicio.c \
     13 authfd.c \
     14 authfile.c \
     15 bcrypt_pbkdf.c \
     16 bitmap.c \
     17 blowfish.c \
     18 canohost.c \
     19 chacha.c \
     20 channels.c \
     21 cipher-chachapoly.c \
     22 cipher.c \
     23 cleanup.c \
     24 compat.c \
     25 dh.c \
     26 dispatch.c \
     27 dns.c \
     28 ed25519.c \
     29 fatal.c \
     30 fe25519.c \
     31 freezero.c \
     32 ge25519.c \
     33 hash.c \
     34 hmac.c \
     35 hostfile.c \
     36 kex.c \
     37 kexdh.c \
     38 kexecdh.c \
     39 kexgen.c \
     40 kexgex.c \
     41 kexgexc.c \
     42 kexsntrup4591761x25519.c \
     43 krl.c \
     44 log.c \
     45 mac.c \
     46 match.c \
     47 misc.c \
     48 monitor_fdpass.c \
     49 msg.c \
     50 nchan.c \
     51 packet.c \
     52 poly1305.c \
     53 progressmeter.c \
     54 readpass.c \
     55 recallocarray.c \
     56 sc25519.c \
     57 smult_curve25519_ref.c \
     58 sntrup4591761.c \
     59 ssh-ed25519.c \
     60 ssh-ed25519-sk.c \
     61 ssh-pkcs11.c \
     62 ssh-xmss.c \
     63 sshbuf-getput-basic.c \
     64 sshbuf-getput-crypto.c \
     65 sshbuf-misc.c \
     66 sshbuf-io.c \
     67 sshbuf.c \
     68 ssherr.c \
     69 sshkey-xmss.c \
     70 sshkey.c \
     71 ttymodes.c \
     72 uidswap.c \
     73 umac.c \
     74 umac128.c \
     75 utf8.c \
     76 verify.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.sntrup4591761.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 # XXX
    123 .if ${MACHINE} == "vax"
    124 COPTS.poly1305.c+=	-O0
    125 COPTS.umac.c+=		-O0
    126 .endif
    127 
    128 COPTS.hostfile.c+=	${GCC_NO_FORMAT_TRUNCATION}
    129 COPTS.sshkey.c+=	${GCC_NO_FORMAT_TRUNCATION}
    130 
    131 .include <bsd.lib.mk>
    132