Makefile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. # $OpenBSD: Makefile,v 1.2 2019/11/29 00:13:29 djm Exp $
  2. .include <bsd.own.mk>
  3. .include <bsd.obj.mk>
  4. PROG= sk-dummy.so
  5. NOMAN=
  6. SSHREL=../../../../../usr.bin/ssh
  7. .PATH: ${.CURDIR}/${SSHREL}
  8. SRCS=sk-dummy.c
  9. # From usr.bin/ssh
  10. SRCS+=ed25519.c hash.c ge25519.c fe25519.c sc25519.c verify.c
  11. OPENSSL?= yes
  12. CFLAGS+= -fPIC
  13. .if (${OPENSSL:L} == "yes")
  14. CFLAGS+= -DWITH_OPENSSL
  15. .endif
  16. # enable warnings
  17. WARNINGS=Yes
  18. DEBUG=-g
  19. CFLAGS+= -fstack-protector-all
  20. CDIAGFLAGS= -Wall
  21. CDIAGFLAGS+= -Wextra
  22. CDIAGFLAGS+= -Werror
  23. CDIAGFLAGS+= -Wchar-subscripts
  24. CDIAGFLAGS+= -Wcomment
  25. CDIAGFLAGS+= -Wformat
  26. CDIAGFLAGS+= -Wformat-security
  27. CDIAGFLAGS+= -Wimplicit
  28. CDIAGFLAGS+= -Winline
  29. CDIAGFLAGS+= -Wmissing-declarations
  30. CDIAGFLAGS+= -Wmissing-prototypes
  31. CDIAGFLAGS+= -Wparentheses
  32. CDIAGFLAGS+= -Wpointer-arith
  33. CDIAGFLAGS+= -Wreturn-type
  34. CDIAGFLAGS+= -Wshadow
  35. CDIAGFLAGS+= -Wsign-compare
  36. CDIAGFLAGS+= -Wstrict-aliasing
  37. CDIAGFLAGS+= -Wstrict-prototypes
  38. CDIAGFLAGS+= -Wswitch
  39. CDIAGFLAGS+= -Wtrigraphs
  40. CDIAGFLAGS+= -Wuninitialized
  41. CDIAGFLAGS+= -Wunused
  42. CDIAGFLAGS+= -Wno-unused-parameter
  43. .if ${COMPILER_VERSION:L} != "gcc3"
  44. CDIAGFLAGS+= -Wold-style-definition
  45. .endif
  46. CFLAGS+=-I${.CURDIR}/${SSHREL}
  47. .if (${OPENSSL:L} == "yes")
  48. LDADD+= -lcrypto
  49. DPADD+= ${LIBCRYPTO}
  50. .endif
  51. $(PROG): $(OBJS)
  52. $(CC) $(LDFLAGS) -shared -o $@ $(OBJS) $(LDADD)
  53. .include <bsd.prog.mk>