Makefile 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. # $OpenBSD: Makefile,v 1.8 2020/04/03 04:07:48 djm Exp $
  2. .include <bsd.own.mk>
  3. .include <bsd.obj.mk>
  4. # XXX detect from ssh binary?
  5. SSH1?= no
  6. OPENSSL?= yes
  7. PROG= kexfuzz
  8. SRCS= kexfuzz.c
  9. SSHREL=../../../../../usr.bin/ssh
  10. .PATH: ${.CURDIR}/${SSHREL}
  11. # From usr.bin/ssh
  12. SRCS+=sshbuf-getput-basic.c sshbuf-getput-crypto.c sshbuf-misc.c sshbuf.c
  13. SRCS+=atomicio.c sshkey.c authfile.c cipher.c log.c ssh-rsa.c ssh-dss.c
  14. SRCS+=ssh-ecdsa.c ssh-ed25519.c mac.c umac.c umac128.c hmac.c misc.c
  15. SRCS+=ssherr.c uidswap.c cleanup.c xmalloc.c match.c krl.c fatal.c
  16. SRCS+=addr.c addrmatch.c bitmap.c packet.c dispatch.c canohost.c ssh_api.c
  17. SRCS+=compat.c ed25519.c hash.c ge25519.c fe25519.c sc25519.c verify.c
  18. SRCS+=cipher-chachapoly.c chacha.c poly1305.c utf8.c
  19. SRCS+=sshbuf-io.c ssh-ecdsa-sk.c ssh-ed25519-sk.c msg.c ssh-sk-client.c
  20. SRCS+= kex.c
  21. SRCS+= dh.c
  22. SRCS+= kexdh.c
  23. SRCS+= kexecdh.c
  24. SRCS+= kexgex.c
  25. SRCS+= kexgexc.c
  26. SRCS+= kexgexs.c
  27. SRCS+= kexc25519.c
  28. SRCS+= smult_curve25519_ref.c
  29. SRCS+= kexgen.c
  30. SRCS+= kexsntrup761x25519.c
  31. SRCS+= sntrup761.c
  32. SRCS+=digest-openssl.c
  33. #SRCS+=digest-libc.c
  34. NOMAN= 1
  35. .if (${OPENSSL:L} == "yes")
  36. CFLAGS+= -DWITH_OPENSSL
  37. .else
  38. # SSH v.1 requires OpenSSL.
  39. SSH1= no
  40. .endif
  41. .if (${SSH1:L} == "yes")
  42. CFLAGS+= -DWITH_SSH1
  43. .endif
  44. LDADD+= -lfido2 -lcbor -lusbhid
  45. DPADD+= ${LIBFIDO2} ${LIBCBOR} ${LIBUSBHID}
  46. # enable warnings
  47. WARNINGS=Yes
  48. DEBUG=-g
  49. CFLAGS+= -fstack-protector-all
  50. CDIAGFLAGS= -Wall
  51. CDIAGFLAGS+= -Wextra
  52. CDIAGFLAGS+= -Werror
  53. CDIAGFLAGS+= -Wchar-subscripts
  54. CDIAGFLAGS+= -Wcomment
  55. CDIAGFLAGS+= -Wformat
  56. CDIAGFLAGS+= -Wformat-security
  57. CDIAGFLAGS+= -Wimplicit
  58. CDIAGFLAGS+= -Winline
  59. CDIAGFLAGS+= -Wmissing-declarations
  60. CDIAGFLAGS+= -Wmissing-prototypes
  61. CDIAGFLAGS+= -Wparentheses
  62. CDIAGFLAGS+= -Wpointer-arith
  63. CDIAGFLAGS+= -Wreturn-type
  64. CDIAGFLAGS+= -Wshadow
  65. CDIAGFLAGS+= -Wsign-compare
  66. CDIAGFLAGS+= -Wstrict-aliasing
  67. CDIAGFLAGS+= -Wstrict-prototypes
  68. CDIAGFLAGS+= -Wswitch
  69. CDIAGFLAGS+= -Wtrigraphs
  70. CDIAGFLAGS+= -Wuninitialized
  71. CDIAGFLAGS+= -Wunused
  72. CDIAGFLAGS+= -Wno-unused-parameter
  73. .if ${COMPILER_VERSION:L} != "gcc3"
  74. CDIAGFLAGS+= -Wold-style-definition
  75. .endif
  76. CFLAGS+=-I${.CURDIR}/${SSHREL}
  77. LDADD+= -lutil -lz
  78. DPADD+= ${LIBUTIL} ${LIBZ}
  79. .if (${OPENSSL:L} == "yes")
  80. LDADD+= -lcrypto
  81. DPADD+= ${LIBCRYPTO}
  82. .endif
  83. .include <bsd.prog.mk>