xref: /dflybsd-src/lib/libssh/Makefile (revision ba1276acd1c8c22d225b1bcf370a14c878644f44)
10fe46dc6SMatthew DillonLIB=	private_ssh
2ca4ef999SzrjSHLIB_MAJOR= 5
3ca4ef999SzrjPRIVATELIB= shpub
46d1a01feSzrj
573b5ca6bSzrj.PATH: ${.CURDIR}/../../crypto/openssh
6*ba1276acSMatthew Dillon
7*ba1276acSMatthew Dillon# SRCS built from /usr/src/crypto/openssh/Makefile.inc,
8*ba1276acSMatthew Dillon#	XMSS_OBJS
9*ba1276acSMatthew Dillon#	LIBOPENSSH_OBJS
10*ba1276acSMatthew Dillon#	LIBSHS_OBJS
11*ba1276acSMatthew Dillon#	+ ssh-sk-client.c
12*ba1276acSMatthew Dillon#
13*ba1276acSMatthew Dillon#	ssh-sk-client.c is used by sshkey.c from LIBOPENSSH_OBJS and had
14*ba1276acSMatthew Dillon#	to be included in libssh in order for initrd rescue to build.
15*ba1276acSMatthew Dillon#
16*ba1276acSMatthew DillonSRCS=   ssh_api.c \
17*ba1276acSMatthew Dillon        ssherr.c \
18*ba1276acSMatthew Dillon        sshbuf.c \
19*ba1276acSMatthew Dillon        sshkey.c \
20*ba1276acSMatthew Dillon        sshbuf-getput-basic.c \
21*ba1276acSMatthew Dillon        sshbuf-misc.c \
22*ba1276acSMatthew Dillon        sshbuf-getput-crypto.c \
23*ba1276acSMatthew Dillon        krl.c \
24*ba1276acSMatthew Dillon        bitmap.c \
25*ba1276acSMatthew Dillon	\
26*ba1276acSMatthew Dillon        ssh-xmss.c \
27*ba1276acSMatthew Dillon        sshkey-xmss.c \
28*ba1276acSMatthew Dillon        xmss_commons.c \
29*ba1276acSMatthew Dillon        xmss_fast.c \
30*ba1276acSMatthew Dillon        xmss_hash.c \
31*ba1276acSMatthew Dillon        xmss_hash_address.c \
32*ba1276acSMatthew Dillon        xmss_wots.c \
33*ba1276acSMatthew Dillon	\
34*ba1276acSMatthew Dillon        authfd.c authfile.c \
35*ba1276acSMatthew Dillon        canohost.c channels.c cipher.c cipher-aes.c cipher-aesctr.c \
36*ba1276acSMatthew Dillon        cleanup.c \
37*ba1276acSMatthew Dillon        compat.c fatal.c hostfile.c \
38*ba1276acSMatthew Dillon        log.c match.c moduli.c nchan.c packet.c \
39*ba1276acSMatthew Dillon        readpass.c ttymodes.c xmalloc.c addr.c addrmatch.c \
40*ba1276acSMatthew Dillon        atomicio.c dispatch.c mac.c misc.c utf8.c \
41*ba1276acSMatthew Dillon        monitor_fdpass.c rijndael.c ssh-dss.c ssh-ecdsa.c ssh-ecdsa-sk.c \
42*ba1276acSMatthew Dillon        ssh-ed25519-sk.c ssh-rsa.c dh.c \
43*ba1276acSMatthew Dillon        msg.c progressmeter.c dns.c entropy.c gss-genr.c umac.c umac128.c \
44*ba1276acSMatthew Dillon        ssh-pkcs11.c smult_curve25519_ref.c \
45*ba1276acSMatthew Dillon        poly1305.c chacha.c cipher-chachapoly.c cipher-chachapoly-libcrypto.c \
46*ba1276acSMatthew Dillon        ssh-ed25519.c digest-openssl.c digest-libc.c \
47*ba1276acSMatthew Dillon        hmac.c ed25519.c hash.c \
48*ba1276acSMatthew Dillon        kex.c kex-names.c kexdh.c kexgex.c kexecdh.c kexc25519.c \
49*ba1276acSMatthew Dillon        kexgexc.c kexgexs.c \
50*ba1276acSMatthew Dillon        kexsntrup761x25519.c sntrup761.c kexgen.c \
51*ba1276acSMatthew Dillon        sftp-realpath.c platform-pledge.c platform-tracing.c platform-misc.c \
52*ba1276acSMatthew Dillon        sshbuf-io.c \
53*ba1276acSMatthew Dillon	\
54*ba1276acSMatthew Dillon	ssh-sk-client.c
557b1120e5Szrj
567b1120e5Szrj# not implemented: platform-pledge.c platform-tracing.c
577b1120e5Szrj# only for scp/sftp: progressmeter.c
587b1120e5Szrj# disabled: ssh-pkcs11.c
597b1120e5Szrj# no GSSAPI: gss-genr.c
607b1120e5Szrj# no openssl: cipher-aes.c cipher-aesctr.c cipher-ctr.c crc32.c digest-libc.c rijndael.c
617b1120e5Szrj# no xmss: ssh-xmss.c sshkey-xmss.c xmss_commons.c xmss_fast.c xmss_hash.c
627b1120e5Szrj#	   xmss_hash_address.c xmss_wots.c
637b1120e5Szrj
640fe46dc6SMatthew Dillon# Portability layer
657b1120e5Szrj.PATH: ${.CURDIR}/openbsd-compat
667b1120e5SzrjSRCS+=	bcrypt_pbkdf.c blowfish.c bsd-misc.c bsd-signal.c fmt_scaled.c \
67e926d9f3SDaniel Fojt	getrrsetbyname-ldns.c glob.c openssl-compat.c port-net.c xcrypt.c
680fe46dc6SMatthew Dillon
697b1120e5Szrj# not needed compat:
707b1120e5Szrj# arc4random.c base64.c basename.c bindresvport.c bsd-asprintf.c
717b1120e5Szrj# bsd-closefrom.c bsd-cygwin_util.c bsd-err.c bsd-flock.c bsd-getline.c
727b1120e5Szrj# bsd-getpagesize.c bsd-getpeereid.c bsd-malloc.c bsd-nextstep.c bsd-openpty.c
737b1120e5Szrj# bsd-poll.c bsd-setres_id.c bsd-snprintf.c bsd-statvfs.c bsd-waitpid.c
747b1120e5Szrj# daemon.c dirname.c explicit_bzero.c fake-rfc2553.c freezero.c getcwd.c
757b1120e5Szrj# getgrouplist.c getopt_long.c inet_aton.c inet_ntoa.c inet_ntop.c
767b1120e5Szrj# kludge-fd_set.c libressl-api-compat.c md5.c mktemp.c
777b1120e5Szrj# port-aix.c port-irix.c port-linux.c port-solaris.c port-uw.c
787b1120e5Szrj# pwcache.c readpassphrase.c reallocarray.c recallocarray.c rmd160.c
797b1120e5Szrj# rresvport.c setenv.c setproctitle.c sha1.c sha2.c sigact.c
807b1120e5Szrj# strcasestr.c strlcat.c strlcpy.c strmode.c strndup.c strnlen.c strptime.c
817b1120e5Szrj# strsep.c strtoll.c strtonum.c strtoul.c strtoull.c timingsafe_bcmp.c vis.c
820fe46dc6SMatthew Dillon
830fe46dc6SMatthew DillonMAN=	moduli.5
840fe46dc6SMatthew Dillon
850fe46dc6SMatthew DillonWARNS?=	2
860fe46dc6SMatthew DillonNO_STRICT_ALIASING=
870fe46dc6SMatthew Dillon
8873b5ca6bSzrjCFLAGS+=	-I${.CURDIR} -I${.CURDIR}/../../crypto/openssh
8973b5ca6bSzrjCFLAGS+=	-I${.CURDIR}/../../crypto/libressl/include
90e926d9f3SDaniel FojtCFLAGS+=	-I${.CURDIR}/../../contrib/ldns
91c1ccac55SAntonio Huete JimenezCFLAGS+=	-I${.CURDIR}/../libldns
92e926d9f3SDaniel FojtDPADD=		${LIBCRYPTO} ${LIBLDNS} ${LIBUTIL} ${LIBZ}
93e926d9f3SDaniel FojtLDADD=		-lprivate_crypto -lprivate_ldns -lutil -lz
9473b5ca6bSzrjLDFLAGS+=	-rpath /usr/lib/priv ${PRIVATELIB_LDFLAGS}
9573b5ca6bSzrj
960fe46dc6SMatthew Dillon.include <bsd.lib.mk>
97