Makefile.in 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772
  1. # uncomment if you run a non bourne compatible shell. Ie. csh
  2. #SHELL = @SH@
  3. AUTORECONF=autoreconf
  4. prefix=@prefix@
  5. exec_prefix=@exec_prefix@
  6. bindir=@bindir@
  7. sbindir=@sbindir@
  8. libexecdir=@libexecdir@
  9. datadir=@datadir@
  10. datarootdir=@datarootdir@
  11. mandir=@mandir@
  12. mansubdir=@mansubdir@
  13. sysconfdir=@sysconfdir@
  14. piddir=@piddir@
  15. srcdir=@srcdir@
  16. top_srcdir=@top_srcdir@
  17. DESTDIR=
  18. VPATH=@srcdir@
  19. SSH_PROGRAM=@bindir@/ssh
  20. ASKPASS_PROGRAM=$(libexecdir)/ssh-askpass
  21. SFTP_SERVER=$(libexecdir)/sftp-server
  22. SSH_KEYSIGN=$(libexecdir)/ssh-keysign
  23. SSH_KEYCAT=$(libexecdir)/ssh-keycat
  24. SSH_PKCS11_HELPER=$(libexecdir)/ssh-pkcs11-helper
  25. SSH_SK_HELPER=$(libexecdir)/ssh-sk-helper
  26. PRIVSEP_PATH=@PRIVSEP_PATH@
  27. SSH_PRIVSEP_USER=@SSH_PRIVSEP_USER@
  28. STRIP_OPT=@STRIP_OPT@
  29. TEST_SHELL=@TEST_SHELL@
  30. PATHS= -DSSHDIR=\"$(sysconfdir)\" \
  31. -D_PATH_SSH_PROGRAM=\"$(SSH_PROGRAM)\" \
  32. -D_PATH_SSH_ASKPASS_DEFAULT=\"$(ASKPASS_PROGRAM)\" \
  33. -D_PATH_SFTP_SERVER=\"$(SFTP_SERVER)\" \
  34. -D_PATH_SSH_KEY_SIGN=\"$(SSH_KEYSIGN)\" \
  35. -D_PATH_SSH_PKCS11_HELPER=\"$(SSH_PKCS11_HELPER)\" \
  36. -D_PATH_SSH_SK_HELPER=\"$(SSH_SK_HELPER)\" \
  37. -D_PATH_SSH_PIDDIR=\"$(piddir)\" \
  38. -D_PATH_PRIVSEP_CHROOT_DIR=\"$(PRIVSEP_PATH)\"
  39. CC=@CC@
  40. LD=@LD@
  41. CFLAGS=@CFLAGS@
  42. CFLAGS_NOPIE=@CFLAGS_NOPIE@
  43. CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ $(PATHS) @DEFS@
  44. PICFLAG=@PICFLAG@
  45. LIBS=@LIBS@ -lpthread
  46. K5LIBS=@K5LIBS@
  47. GSSLIBS=@GSSLIBS@
  48. SSHDLIBS=@SSHDLIBS@
  49. KEYCATLIBS=@KEYCATLIBS@
  50. LIBEDIT=@LIBEDIT@
  51. LIBFIDO2=@LIBFIDO2@
  52. AR=@AR@
  53. AWK=@AWK@
  54. RANLIB=@RANLIB@
  55. INSTALL=@INSTALL@
  56. SED=@SED@
  57. XAUTH_PATH=@XAUTH_PATH@
  58. LDFLAGS=-L. -Lopenbsd-compat/ @LDFLAGS@
  59. LDFLAGS_NOPIE=-L. -Lopenbsd-compat/ @LDFLAGS_NOPIE@
  60. EXEEXT=@EXEEXT@
  61. MANFMT=@MANFMT@
  62. MKDIR_P=@MKDIR_P@
  63. .SUFFIXES: .lo
  64. TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-pkcs11-helper$(EXEEXT) ssh-agent$(EXEEXT) scp$(EXEEXT) sftp-server$(EXEEXT) sftp$(EXEEXT) ssh-sk-helper$(EXEEXT) ssh-keycat$(EXEEXT)
  65. XMSS_OBJS=\
  66. ssh-xmss.o \
  67. sshkey-xmss.o \
  68. xmss_commons.o \
  69. xmss_fast.o \
  70. xmss_hash.o \
  71. xmss_hash_address.o \
  72. xmss_wots.o
  73. LIBOPENSSH_OBJS=\
  74. ssh_api.o \
  75. ssherr.o \
  76. sshbuf.o \
  77. sshkey.o \
  78. sshbuf-getput-basic.o \
  79. sshbuf-misc.o \
  80. sshbuf-getput-crypto.o \
  81. krl.o \
  82. bitmap.o \
  83. ${XMSS_OBJS}
  84. LIBSSH_OBJS=${LIBOPENSSH_OBJS} \
  85. authfd.o authfile.o \
  86. canohost.o channels.o cipher.o cipher-aes.o cipher-aesctr.o \
  87. cipher-ctr.o cleanup.o cipher-ctr-mt.o \
  88. compat.o fatal.o hostfile.o \
  89. log.o match.o moduli.o nchan.o packet.o \
  90. readpass.o ttymodes.o xmalloc.o addr.o addrmatch.o \
  91. atomicio.o dispatch.o mac.o misc.o utf8.o \
  92. monitor_fdpass.o rijndael.o ssh-dss.o ssh-ecdsa.o ssh-ecdsa-sk.o \
  93. ssh-ed25519-sk.o ssh-rsa.o dh.o \
  94. msg.o progressmeter.o dns.o entropy.o gss-genr.o umac.o umac128.o \
  95. ssh-pkcs11.o ssh-pkcs11-uri.o smult_curve25519_ref.o \
  96. poly1305.o chacha.o cipher-chachapoly.o cipher-chachapoly-libcrypto.o \
  97. ssh-ed25519.o digest-openssl.o digest-libc.o \
  98. hmac.o sc25519.o ge25519.o fe25519.o ed25519.o verify.o hash.o \
  99. kex.o kexdh.o kexgex.o kexecdh.o kexc25519.o \
  100. kexgexc.o kexgexs.o \
  101. kexsntrup761x25519.o sntrup761.o kexgen.o \
  102. sftp-realpath.o platform-pledge.o platform-tracing.o platform-misc.o \
  103. sshbuf-io.o auditstub.o
  104. SKOBJS= ssh-sk-client.o
  105. SSHOBJS= ssh.o readconf.o clientloop.o sshtty.o \
  106. sshconnect.o sshconnect2.o mux.o $(SKOBJS)
  107. SSHDOBJS=sshd.o auth-rhosts.o auth-passwd.o \
  108. audit.o audit-bsm.o audit-linux.o platform.o \
  109. sshpty.o sshlogin.o servconf.o serverloop.o \
  110. auth.o auth2.o auth-options.o session.o \
  111. auth2-chall.o groupaccess.o \
  112. auth-bsdauth.o auth2-hostbased.o auth2-kbdint.o \
  113. auth2-none.o auth2-passwd.o auth2-pubkey.o \
  114. monitor.o monitor_wrap.o auth-krb5.o \
  115. auth2-gss.o gss-serv.o gss-serv-krb5.o \
  116. loginrec.o auth-pam.o auth-shadow.o auth-sia.o md5crypt.o \
  117. srclimit.o sftp-server.o sftp-common.o \
  118. sandbox-null.o sandbox-rlimit.o sandbox-systrace.o sandbox-darwin.o \
  119. sandbox-seccomp-filter.o sandbox-capsicum.o sandbox-pledge.o \
  120. sandbox-solaris.o uidswap.o $(SKOBJS)
  121. SCP_OBJS= scp.o progressmeter.o
  122. SSHADD_OBJS= ssh-add.o $(SKOBJS)
  123. SSHAGENT_OBJS= ssh-agent.o ssh-pkcs11-client.o $(SKOBJS)
  124. SSHKEYGEN_OBJS= ssh-keygen.o sshsig.o $(SKOBJS)
  125. SSHKEYSIGN_OBJS=ssh-keysign.o readconf.o uidswap.o $(SKOBJS)
  126. P11HELPER_OBJS= ssh-pkcs11-helper.o ssh-pkcs11.o $(SKOBJS)
  127. SKHELPER_OBJS= ssh-sk-helper.o ssh-sk.o sk-usbhid.o
  128. SSHKEYSCAN_OBJS=ssh-keyscan.o $(SKOBJS)
  129. SFTPSERVER_OBJS=sftp-common.o sftp-server.o sftp-server-main.o
  130. SFTP_OBJS= sftp.o sftp-client.o sftp-common.o sftp-glob.o progressmeter.o
  131. MANPAGES = moduli.5.out scp.1.out ssh-add.1.out ssh-agent.1.out ssh-keygen.1.out ssh-keyscan.1.out ssh.1.out sshd.8.out sftp-server.8.out sftp.1.out ssh-keysign.8.out ssh-pkcs11-helper.8.out ssh-sk-helper.8.out sshd_config.5.out ssh_config.5.out
  132. MANPAGES_IN = moduli.5 scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh-keyscan.1 ssh.1 sshd.8 sftp-server.8 sftp.1 ssh-keysign.8 ssh-pkcs11-helper.8 ssh-sk-helper.8 sshd_config.5 ssh_config.5
  133. MANTYPE = @MANTYPE@
  134. CONFIGFILES=sshd_config.out ssh_config.out moduli.out
  135. CONFIGFILES_IN=sshd_config ssh_config moduli
  136. PATHSUBS = \
  137. -e 's|/etc/ssh/ssh_config|$(sysconfdir)/ssh_config|g' \
  138. -e 's|/etc/ssh/ssh_known_hosts|$(sysconfdir)/ssh_known_hosts|g' \
  139. -e 's|/etc/ssh/sshd_config|$(sysconfdir)/sshd_config|g' \
  140. -e 's|/usr/libexec|$(libexecdir)|g' \
  141. -e 's|/etc/shosts.equiv|$(sysconfdir)/shosts.equiv|g' \
  142. -e 's|/etc/ssh/ssh_host_key|$(sysconfdir)/ssh_host_key|g' \
  143. -e 's|/etc/ssh/ssh_host_ecdsa_key|$(sysconfdir)/ssh_host_ecdsa_key|g' \
  144. -e 's|/etc/ssh/ssh_host_dsa_key|$(sysconfdir)/ssh_host_dsa_key|g' \
  145. -e 's|/etc/ssh/ssh_host_rsa_key|$(sysconfdir)/ssh_host_rsa_key|g' \
  146. -e 's|/etc/ssh/ssh_host_ed25519_key|$(sysconfdir)/ssh_host_ed25519_key|g' \
  147. -e 's|/var/run/sshd.pid|$(piddir)/sshd.pid|g' \
  148. -e 's|/etc/moduli|$(sysconfdir)/moduli|g' \
  149. -e 's|/etc/ssh/moduli|$(sysconfdir)/moduli|g' \
  150. -e 's|/etc/ssh/sshrc|$(sysconfdir)/sshrc|g' \
  151. -e 's|/usr/X11R6/bin/xauth|$(XAUTH_PATH)|g' \
  152. -e 's|/var/empty|$(PRIVSEP_PATH)|g' \
  153. -e 's|/usr/bin:/bin:/usr/sbin:/sbin|@user_path@|g'
  154. FIXPATHSCMD = $(SED) $(PATHSUBS)
  155. FIXALGORITHMSCMD= $(SHELL) $(srcdir)/fixalgorithms $(SED) \
  156. @UNSUPPORTED_ALGORITHMS@
  157. all: configure-check $(CONFIGFILES) $(MANPAGES) $(TARGETS)
  158. $(LIBSSH_OBJS): Makefile.in config.h
  159. $(SSHOBJS): Makefile.in config.h
  160. $(SSHDOBJS): Makefile.in config.h
  161. configure-check: $(srcdir)/configure
  162. $(srcdir)/configure: configure.ac $(srcdir)/m4/*.m4
  163. @echo "ERROR: configure is out of date; please run ${AUTORECONF} (and configure)" 1>&2
  164. @exit 1
  165. .c.o:
  166. $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
  167. LIBCOMPAT=openbsd-compat/libopenbsd-compat.a
  168. $(LIBCOMPAT): always
  169. (cd openbsd-compat && $(MAKE))
  170. always:
  171. libssh.a: $(LIBSSH_OBJS)
  172. $(AR) rv $@ $(LIBSSH_OBJS)
  173. $(RANLIB) $@
  174. ssh$(EXEEXT): $(LIBCOMPAT) libssh.a $(SSHOBJS)
  175. $(LD) -o $@ $(SSHOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) $(GSSLIBS)
  176. sshd$(EXEEXT): libssh.a $(LIBCOMPAT) $(SSHDOBJS)
  177. $(LD) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(SSHDLIBS) $(LIBS) $(GSSLIBS) $(K5LIBS)
  178. scp$(EXEEXT): $(LIBCOMPAT) libssh.a $(SCP_OBJS)
  179. $(LD) -o $@ $(SCP_OBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
  180. ssh-add$(EXEEXT): $(LIBCOMPAT) libssh.a $(SSHADD_OBJS)
  181. $(LD) -o $@ $(SSHADD_OBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
  182. ssh-agent$(EXEEXT): $(LIBCOMPAT) libssh.a $(SSHAGENT_OBJS)
  183. $(LD) -o $@ $(SSHAGENT_OBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
  184. ssh-keygen$(EXEEXT): $(LIBCOMPAT) libssh.a $(SSHKEYGEN_OBJS)
  185. $(LD) -o $@ $(SSHKEYGEN_OBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
  186. ssh-keysign$(EXEEXT): $(LIBCOMPAT) libssh.a $(SSHKEYSIGN_OBJS)
  187. $(LD) -o $@ $(SSHKEYSIGN_OBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
  188. ssh-pkcs11-helper$(EXEEXT): $(LIBCOMPAT) libssh.a $(P11HELPER_OBJS)
  189. $(LD) -o $@ $(P11HELPER_OBJS) $(LDFLAGS) -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
  190. ssh-sk-helper$(EXEEXT): $(LIBCOMPAT) libssh.a $(SKHELPER_OBJS)
  191. $(LD) -o $@ $(SKHELPER_OBJS) $(LDFLAGS) -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS) $(LIBFIDO2)
  192. ssh-keycat$(EXEEXT): $(LIBCOMPAT) $(SSHDOBJS) libssh.a ssh-keycat.o uidswap.o
  193. $(LD) -o $@ ssh-keycat.o uidswap.o $(LDFLAGS) -lssh -lopenbsd-compat $(KEYCATLIBS) $(LIBS)
  194. ssh-keyscan$(EXEEXT): $(LIBCOMPAT) libssh.a $(SSHKEYSCAN_OBJS)
  195. $(LD) -o $@ $(SSHKEYSCAN_OBJS) $(LDFLAGS) -lssh -lopenbsd-compat -lssh $(LIBS)
  196. sftp-server$(EXEEXT): $(LIBCOMPAT) libssh.a $(SFTPSERVER_OBJS)
  197. $(LD) -o $@ $(SFTPSERVER_OBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
  198. sftp$(EXEEXT): $(LIBCOMPAT) libssh.a $(SFTP_OBJS)
  199. $(LD) -o $@ $(SFTP_OBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) $(LIBEDIT)
  200. # test driver for the loginrec code - not built by default
  201. logintest: logintest.o $(LIBCOMPAT) libssh.a loginrec.o
  202. $(LD) -o $@ logintest.o $(LDFLAGS) loginrec.o -lopenbsd-compat -lssh $(LIBS)
  203. $(MANPAGES): $(MANPAGES_IN)
  204. if test "$(MANTYPE)" = "cat"; then \
  205. manpage=$(srcdir)/`echo $@ | sed 's/\.[1-9]\.out$$/\.0/'`; \
  206. else \
  207. manpage=$(srcdir)/`echo $@ | sed 's/\.out$$//'`; \
  208. fi; \
  209. if test "$(MANTYPE)" = "man"; then \
  210. $(FIXPATHSCMD) $${manpage} | $(FIXALGORITHMSCMD) | \
  211. $(AWK) -f $(srcdir)/mdoc2man.awk > $@; \
  212. else \
  213. $(FIXPATHSCMD) $${manpage} | $(FIXALGORITHMSCMD) > $@; \
  214. fi
  215. $(CONFIGFILES): $(CONFIGFILES_IN)
  216. conffile=`echo $@ | sed 's/.out$$//'`; \
  217. $(FIXPATHSCMD) $(srcdir)/$${conffile} > $@
  218. # fake rule to stop make trying to compile moduli.o into a binary "moduli.o"
  219. moduli:
  220. echo
  221. clean: regressclean
  222. rm -f *.o *.lo *.a $(TARGETS) logintest config.cache config.log
  223. rm -f *.out core survey
  224. rm -f regress/check-perm$(EXEEXT)
  225. rm -f regress/mkdtemp$(EXEEXT)
  226. rm -f regress/unittests/test_helper/*.a
  227. rm -f regress/unittests/test_helper/*.o
  228. rm -f regress/unittests/sshbuf/*.o
  229. rm -f regress/unittests/sshbuf/test_sshbuf$(EXEEXT)
  230. rm -f regress/unittests/sshkey/*.o
  231. rm -f regress/unittests/sshkey/test_sshkey$(EXEEXT)
  232. rm -f regress/unittests/sshsig/*.o
  233. rm -f regress/unittests/sshsig/test_sshsig$(EXEEXT)
  234. rm -f regress/unittests/bitmap/*.o
  235. rm -f regress/unittests/bitmap/test_bitmap$(EXEEXT)
  236. rm -f regress/unittests/conversion/*.o
  237. rm -f regress/unittests/conversion/test_conversion$(EXEEXT)
  238. rm -f regress/unittests/hostkeys/*.o
  239. rm -f regress/unittests/hostkeys/test_hostkeys$(EXEEXT)
  240. rm -f regress/unittests/kex/*.o
  241. rm -f regress/unittests/kex/test_kex$(EXEEXT)
  242. rm -f regress/unittests/match/*.o
  243. rm -f regress/unittests/match/test_match$(EXEEXT)
  244. rm -f regress/unittests/utf8/*.o
  245. rm -f regress/unittests/utf8/test_utf8$(EXEEXT)
  246. rm -f regress/unittests/pkcs11/*.o
  247. rm -f regress/unittests/pkcs11/test_pkcs11$(EXEEXT)
  248. rm -f regress/misc/kexfuzz/*.o
  249. rm -f regress/misc/kexfuzz/kexfuzz$(EXEEXT)
  250. rm -f regress/misc/sk-dummy/*.o
  251. rm -f regress/misc/sk-dummy/*.lo
  252. rm -f regress/misc/sk-dummy/sk-dummy.so
  253. (cd openbsd-compat && $(MAKE) clean)
  254. distclean: regressclean
  255. rm -f *.o *.a $(TARGETS) logintest config.cache config.log
  256. rm -f *.out core opensshd.init openssh.xml
  257. rm -f Makefile buildpkg.sh config.h config.status
  258. rm -f survey.sh openbsd-compat/regress/Makefile *~
  259. rm -rf autom4te.cache
  260. rm -f regress/check-perm
  261. rm -f regress/mkdtemp
  262. rm -f regress/unittests/test_helper/*.a
  263. rm -f regress/unittests/test_helper/*.o
  264. rm -f regress/unittests/sshbuf/*.o
  265. rm -f regress/unittests/sshbuf/test_sshbuf
  266. rm -f regress/unittests/sshkey/*.o
  267. rm -f regress/unittests/sshkey/test_sshkey
  268. rm -f regress/unittests/sshsig/*.o
  269. rm -f regress/unittests/sshsig/test_sshsig
  270. rm -f regress/unittests/bitmap/*.o
  271. rm -f regress/unittests/bitmap/test_bitmap
  272. rm -f regress/unittests/conversion/*.o
  273. rm -f regress/unittests/conversion/test_conversion
  274. rm -f regress/unittests/hostkeys/*.o
  275. rm -f regress/unittests/hostkeys/test_hostkeys
  276. rm -f regress/unittests/kex/*.o
  277. rm -f regress/unittests/kex/test_kex
  278. rm -f regress/unittests/match/*.o
  279. rm -f regress/unittests/match/test_match
  280. rm -f regress/unittests/utf8/*.o
  281. rm -f regress/unittests/utf8/test_utf8
  282. rm -f regress/unittests/pkcs11/*.o
  283. rm -f regress/unittests/pkcs11/test_pkcs11
  284. rm -f regress/misc/kexfuzz/*.o
  285. rm -f regress/misc/kexfuzz/kexfuzz$(EXEEXT)
  286. (cd openbsd-compat && $(MAKE) distclean)
  287. if test -d pkg ; then \
  288. rm -fr pkg ; \
  289. fi
  290. veryclean: distclean
  291. rm -f configure config.h.in *.0
  292. cleandir: veryclean
  293. mrproper: veryclean
  294. realclean: veryclean
  295. catman-do:
  296. @for f in $(MANPAGES_IN) ; do \
  297. base=`echo $$f | sed 's/\..*$$//'` ; \
  298. echo "$$f -> $$base.0" ; \
  299. $(MANFMT) $$f | cat -v | sed -e 's/.\^H//g' \
  300. >$$base.0 ; \
  301. done
  302. depend: depend-rebuild
  303. rm -f .depend.bak
  304. depend-rebuild:
  305. mv .depend .depend.old
  306. rm -f config.h .depend
  307. touch config.h .depend
  308. makedepend -w1000 -Y. -f .depend *.c 2>/dev/null
  309. (echo '# Automatically generated by makedepend.'; \
  310. echo '# Run "make depend" to rebuild.'; sort .depend ) >.depend.tmp
  311. mv .depend.tmp .depend
  312. rm -f .depend.bak
  313. mv .depend.old .depend.bak
  314. rm -f config.h
  315. depend-check: depend-rebuild
  316. cmp .depend .depend.bak || (echo .depend stale && exit 1)
  317. distprep: catman-do depend-check
  318. $(AUTORECONF)
  319. -rm -rf autom4te.cache .depend.bak
  320. install: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files install-sysconf host-key check-config
  321. install-nokeys: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files install-sysconf
  322. install-nosysconf: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files
  323. check-config:
  324. -$(DESTDIR)$(sbindir)/sshd -t -f $(DESTDIR)$(sysconfdir)/sshd_config
  325. install-files:
  326. $(MKDIR_P) $(DESTDIR)$(bindir)
  327. $(MKDIR_P) $(DESTDIR)$(sbindir)
  328. $(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)1
  329. $(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)5
  330. $(MKDIR_P) $(DESTDIR)$(mandir)/$(mansubdir)8
  331. $(MKDIR_P) $(DESTDIR)$(libexecdir)
  332. $(MKDIR_P) -m 0755 $(DESTDIR)$(PRIVSEP_PATH)
  333. $(INSTALL) -m 0755 $(STRIP_OPT) ssh$(EXEEXT) $(DESTDIR)$(bindir)/ssh$(EXEEXT)
  334. $(INSTALL) -m 0755 $(STRIP_OPT) scp$(EXEEXT) $(DESTDIR)$(bindir)/scp$(EXEEXT)
  335. $(INSTALL) -m 0755 $(STRIP_OPT) ssh-add$(EXEEXT) $(DESTDIR)$(bindir)/ssh-add$(EXEEXT)
  336. $(INSTALL) -m 0755 $(STRIP_OPT) ssh-agent$(EXEEXT) $(DESTDIR)$(bindir)/ssh-agent$(EXEEXT)
  337. $(INSTALL) -m 0755 $(STRIP_OPT) ssh-keygen$(EXEEXT) $(DESTDIR)$(bindir)/ssh-keygen$(EXEEXT)
  338. $(INSTALL) -m 0755 $(STRIP_OPT) ssh-keyscan$(EXEEXT) $(DESTDIR)$(bindir)/ssh-keyscan$(EXEEXT)
  339. $(INSTALL) -m 0755 $(STRIP_OPT) sshd$(EXEEXT) $(DESTDIR)$(sbindir)/sshd$(EXEEXT)
  340. $(INSTALL) -m 4711 $(STRIP_OPT) ssh-keysign$(EXEEXT) $(DESTDIR)$(SSH_KEYSIGN)$(EXEEXT)
  341. $(INSTALL) -m 0755 $(STRIP_OPT) ssh-pkcs11-helper$(EXEEXT) $(DESTDIR)$(SSH_PKCS11_HELPER)$(EXEEXT)
  342. $(INSTALL) -m 0755 $(STRIP_OPT) ssh-sk-helper$(EXEEXT) $(DESTDIR)$(SSH_SK_HELPER)$(EXEEXT)
  343. $(INSTALL) -m 0755 $(STRIP_OPT) ssh-keycat$(EXEEXT) $(DESTDIR)$(libexecdir)/ssh-keycat$(EXEEXT)
  344. $(INSTALL) -m 0755 $(STRIP_OPT) sftp$(EXEEXT) $(DESTDIR)$(bindir)/sftp$(EXEEXT)
  345. $(INSTALL) -m 0755 $(STRIP_OPT) sftp-server$(EXEEXT) $(DESTDIR)$(SFTP_SERVER)$(EXEEXT)
  346. $(INSTALL) -m 644 ssh.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1
  347. $(INSTALL) -m 644 scp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1
  348. $(INSTALL) -m 644 ssh-add.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1
  349. $(INSTALL) -m 644 ssh-agent.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-agent.1
  350. $(INSTALL) -m 644 ssh-keygen.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keygen.1
  351. $(INSTALL) -m 644 ssh-keyscan.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keyscan.1
  352. $(INSTALL) -m 644 moduli.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/moduli.5
  353. $(INSTALL) -m 644 sshd_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/sshd_config.5
  354. $(INSTALL) -m 644 ssh_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/ssh_config.5
  355. $(INSTALL) -m 644 sshd.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8
  356. ln -fs ../$(mansubdir)8/sshd.8 $(DESTDIR)$(mandir)/$(mansubdir)5/authorized_keys.5
  357. $(INSTALL) -m 644 sftp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1
  358. $(INSTALL) -m 644 sftp-server.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8
  359. $(INSTALL) -m 644 ssh-keysign.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8
  360. $(INSTALL) -m 644 ssh-pkcs11-helper.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-pkcs11-helper.8
  361. $(INSTALL) -m 644 ssh-sk-helper.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-sk-helper.8
  362. install-sysconf:
  363. $(MKDIR_P) $(DESTDIR)$(sysconfdir)
  364. @if [ ! -f $(DESTDIR)$(sysconfdir)/ssh_config ]; then \
  365. $(INSTALL) -m 644 ssh_config.out $(DESTDIR)$(sysconfdir)/ssh_config; \
  366. else \
  367. echo "$(DESTDIR)$(sysconfdir)/ssh_config already exists, install will not overwrite"; \
  368. fi
  369. @if [ ! -f $(DESTDIR)$(sysconfdir)/sshd_config ]; then \
  370. $(INSTALL) -m 644 sshd_config.out $(DESTDIR)$(sysconfdir)/sshd_config; \
  371. else \
  372. echo "$(DESTDIR)$(sysconfdir)/sshd_config already exists, install will not overwrite"; \
  373. fi
  374. @if [ ! -f $(DESTDIR)$(sysconfdir)/moduli ]; then \
  375. if [ -f $(DESTDIR)$(sysconfdir)/primes ]; then \
  376. echo "moving $(DESTDIR)$(sysconfdir)/primes to $(DESTDIR)$(sysconfdir)/moduli"; \
  377. mv "$(DESTDIR)$(sysconfdir)/primes" "$(DESTDIR)$(sysconfdir)/moduli"; \
  378. else \
  379. $(INSTALL) -m 644 moduli.out $(DESTDIR)$(sysconfdir)/moduli; \
  380. fi ; \
  381. else \
  382. echo "$(DESTDIR)$(sysconfdir)/moduli already exists, install will not overwrite"; \
  383. fi
  384. host-key: ssh-keygen$(EXEEXT)
  385. @if [ -z "$(DESTDIR)" ] ; then \
  386. ./ssh-keygen -A; \
  387. fi
  388. host-key-force: ssh-keygen$(EXEEXT) ssh$(EXEEXT)
  389. ./ssh-keygen -t dsa -f $(DESTDIR)$(sysconfdir)/ssh_host_dsa_key -N ""
  390. ./ssh-keygen -t rsa -f $(DESTDIR)$(sysconfdir)/ssh_host_rsa_key -N ""
  391. ./ssh-keygen -t ed25519 -f $(DESTDIR)$(sysconfdir)/ssh_host_ed25519_key -N ""
  392. if ./ssh -Q key | grep ecdsa >/dev/null ; then \
  393. ./ssh-keygen -t ecdsa -f $(DESTDIR)$(sysconfdir)/ssh_host_ecdsa_key -N ""; \
  394. fi
  395. uninstallall: uninstall
  396. -rm -f $(DESTDIR)$(sysconfdir)/ssh_config
  397. -rm -f $(DESTDIR)$(sysconfdir)/sshd_config
  398. -rmdir $(DESTDIR)$(sysconfdir)
  399. -rmdir $(DESTDIR)$(bindir)
  400. -rmdir $(DESTDIR)$(sbindir)
  401. -rmdir $(DESTDIR)$(mandir)/$(mansubdir)1
  402. -rmdir $(DESTDIR)$(mandir)/$(mansubdir)8
  403. -rmdir $(DESTDIR)$(mandir)
  404. -rmdir $(DESTDIR)$(libexecdir)
  405. uninstall:
  406. -rm -f $(DESTDIR)$(bindir)/ssh$(EXEEXT)
  407. -rm -f $(DESTDIR)$(bindir)/scp$(EXEEXT)
  408. -rm -f $(DESTDIR)$(bindir)/ssh-add$(EXEEXT)
  409. -rm -f $(DESTDIR)$(bindir)/ssh-agent$(EXEEXT)
  410. -rm -f $(DESTDIR)$(bindir)/ssh-keygen$(EXEEXT)
  411. -rm -f $(DESTDIR)$(bindir)/ssh-keyscan$(EXEEXT)
  412. -rm -f $(DESTDIR)$(bindir)/sftp$(EXEEXT)
  413. -rm -f $(DESTDIR)$(sbindir)/sshd$(EXEEXT)
  414. -rm -r $(DESTDIR)$(SFTP_SERVER)$(EXEEXT)
  415. -rm -f $(DESTDIR)$(SSH_KEYSIGN)$(EXEEXT)
  416. -rm -f $(DESTDIR)$(SSH_PKCS11_HELPER)$(EXEEXT)
  417. -rm -f $(DESTDIR)$(SSH_SK_HELPER)$(EXEEXT)
  418. -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1
  419. -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1
  420. -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1
  421. -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-agent.1
  422. -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keygen.1
  423. -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1
  424. -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keyscan.1
  425. -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8
  426. -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8
  427. -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8
  428. -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-pkcs11-helper.8
  429. -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-sk-helper.8
  430. regress-prep:
  431. $(MKDIR_P) `pwd`/regress/unittests/test_helper
  432. $(MKDIR_P) `pwd`/regress/unittests/sshbuf
  433. $(MKDIR_P) `pwd`/regress/unittests/sshkey
  434. $(MKDIR_P) `pwd`/regress/unittests/sshsig
  435. $(MKDIR_P) `pwd`/regress/unittests/bitmap
  436. $(MKDIR_P) `pwd`/regress/unittests/conversion
  437. $(MKDIR_P) `pwd`/regress/unittests/hostkeys
  438. $(MKDIR_P) `pwd`/regress/unittests/kex
  439. $(MKDIR_P) `pwd`/regress/unittests/match
  440. $(MKDIR_P) `pwd`/regress/unittests/utf8
  441. $(MKDIR_P) `pwd`/regress/unittests/pkcs11
  442. $(MKDIR_P) `pwd`/regress/misc/kexfuzz
  443. $(MKDIR_P) `pwd`/regress/misc/sk-dummy
  444. [ -f `pwd`/regress/Makefile ] || \
  445. ln -s `cd $(srcdir) && pwd`/regress/Makefile `pwd`/regress/Makefile
  446. REGRESSLIBS=libssh.a $(LIBCOMPAT)
  447. regress/modpipe$(EXEEXT): $(srcdir)/regress/modpipe.c $(REGRESSLIBS)
  448. $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $(srcdir)/regress/modpipe.c \
  449. $(LDFLAGS) -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
  450. regress/setuid-allowed$(EXEEXT): $(srcdir)/regress/setuid-allowed.c $(REGRESSLIBS)
  451. $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $(srcdir)/regress/setuid-allowed.c \
  452. $(LDFLAGS) -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
  453. regress/netcat$(EXEEXT): $(srcdir)/regress/netcat.c $(REGRESSLIBS)
  454. $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $(srcdir)/regress/netcat.c \
  455. $(LDFLAGS) -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
  456. regress/check-perm$(EXEEXT): $(srcdir)/regress/check-perm.c $(REGRESSLIBS)
  457. $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $(srcdir)/regress/check-perm.c \
  458. $(LDFLAGS) -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
  459. regress/mkdtemp$(EXEEXT): $(srcdir)/regress/mkdtemp.c $(REGRESSLIBS)
  460. $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $(srcdir)/regress/mkdtemp.c \
  461. $(LDFLAGS) -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
  462. UNITTESTS_TEST_HELPER_OBJS=\
  463. regress/unittests/test_helper/test_helper.o \
  464. regress/unittests/test_helper/fuzz.o
  465. regress/unittests/test_helper/libtest_helper.a: ${UNITTESTS_TEST_HELPER_OBJS}
  466. $(AR) rv $@ $(UNITTESTS_TEST_HELPER_OBJS)
  467. $(RANLIB) $@
  468. UNITTESTS_TEST_SSHBUF_OBJS=\
  469. regress/unittests/sshbuf/tests.o \
  470. regress/unittests/sshbuf/test_sshbuf.o \
  471. regress/unittests/sshbuf/test_sshbuf_getput_basic.o \
  472. regress/unittests/sshbuf/test_sshbuf_getput_crypto.o \
  473. regress/unittests/sshbuf/test_sshbuf_misc.o \
  474. regress/unittests/sshbuf/test_sshbuf_fuzz.o \
  475. regress/unittests/sshbuf/test_sshbuf_getput_fuzz.o \
  476. regress/unittests/sshbuf/test_sshbuf_fixed.o
  477. regress/unittests/sshbuf/test_sshbuf$(EXEEXT): ${UNITTESTS_TEST_SSHBUF_OBJS} \
  478. regress/unittests/test_helper/libtest_helper.a libssh.a
  479. $(LD) -o $@ $(LDFLAGS) $(UNITTESTS_TEST_SSHBUF_OBJS) \
  480. regress/unittests/test_helper/libtest_helper.a \
  481. -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
  482. UNITTESTS_TEST_SSHKEY_OBJS=\
  483. regress/unittests/sshkey/test_fuzz.o \
  484. regress/unittests/sshkey/tests.o \
  485. regress/unittests/sshkey/common.o \
  486. regress/unittests/sshkey/test_file.o \
  487. regress/unittests/sshkey/test_sshkey.o \
  488. $(SKOBJS)
  489. regress/unittests/sshkey/test_sshkey$(EXEEXT): ${UNITTESTS_TEST_SSHKEY_OBJS} \
  490. regress/unittests/test_helper/libtest_helper.a libssh.a
  491. $(LD) -o $@ $(LDFLAGS) $(UNITTESTS_TEST_SSHKEY_OBJS) \
  492. regress/unittests/test_helper/libtest_helper.a \
  493. -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
  494. UNITTESTS_TEST_SSHSIG_OBJS=\
  495. sshsig.o \
  496. regress/unittests/sshsig/tests.o \
  497. $(SKOBJS)
  498. regress/unittests/sshsig/test_sshsig$(EXEEXT): ${UNITTESTS_TEST_SSHSIG_OBJS} \
  499. regress/unittests/test_helper/libtest_helper.a libssh.a
  500. $(LD) -o $@ $(LDFLAGS) $(UNITTESTS_TEST_SSHSIG_OBJS) \
  501. regress/unittests/test_helper/libtest_helper.a \
  502. -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
  503. UNITTESTS_TEST_BITMAP_OBJS=\
  504. regress/unittests/bitmap/tests.o
  505. regress/unittests/bitmap/test_bitmap$(EXEEXT): ${UNITTESTS_TEST_BITMAP_OBJS} \
  506. regress/unittests/test_helper/libtest_helper.a libssh.a
  507. $(LD) -o $@ $(LDFLAGS) $(UNITTESTS_TEST_BITMAP_OBJS) \
  508. regress/unittests/test_helper/libtest_helper.a \
  509. -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
  510. UNITTESTS_TEST_CONVERSION_OBJS=\
  511. regress/unittests/conversion/tests.o
  512. regress/unittests/conversion/test_conversion$(EXEEXT): \
  513. ${UNITTESTS_TEST_CONVERSION_OBJS} \
  514. regress/unittests/test_helper/libtest_helper.a libssh.a
  515. $(LD) -o $@ $(LDFLAGS) $(UNITTESTS_TEST_CONVERSION_OBJS) \
  516. regress/unittests/test_helper/libtest_helper.a \
  517. -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
  518. UNITTESTS_TEST_KEX_OBJS=\
  519. regress/unittests/kex/tests.o \
  520. regress/unittests/kex/test_kex.o \
  521. $(SKOBJS)
  522. regress/unittests/kex/test_kex$(EXEEXT): ${UNITTESTS_TEST_KEX_OBJS} \
  523. regress/unittests/test_helper/libtest_helper.a libssh.a
  524. $(LD) -o $@ $(LDFLAGS) $(UNITTESTS_TEST_KEX_OBJS) \
  525. regress/unittests/test_helper/libtest_helper.a \
  526. -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
  527. UNITTESTS_TEST_HOSTKEYS_OBJS=\
  528. regress/unittests/hostkeys/tests.o \
  529. regress/unittests/hostkeys/test_iterate.o \
  530. $(SKOBJS)
  531. regress/unittests/hostkeys/test_hostkeys$(EXEEXT): \
  532. ${UNITTESTS_TEST_HOSTKEYS_OBJS} \
  533. regress/unittests/test_helper/libtest_helper.a libssh.a
  534. $(LD) -o $@ $(LDFLAGS) $(UNITTESTS_TEST_HOSTKEYS_OBJS) \
  535. regress/unittests/test_helper/libtest_helper.a \
  536. -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
  537. UNITTESTS_TEST_MATCH_OBJS=\
  538. regress/unittests/match/tests.o
  539. regress/unittests/match/test_match$(EXEEXT): \
  540. ${UNITTESTS_TEST_MATCH_OBJS} \
  541. regress/unittests/test_helper/libtest_helper.a libssh.a
  542. $(LD) -o $@ $(LDFLAGS) $(UNITTESTS_TEST_MATCH_OBJS) \
  543. regress/unittests/test_helper/libtest_helper.a \
  544. -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
  545. UNITTESTS_TEST_UTF8_OBJS=\
  546. regress/unittests/utf8/tests.o
  547. regress/unittests/utf8/test_utf8$(EXEEXT): \
  548. ${UNITTESTS_TEST_UTF8_OBJS} \
  549. regress/unittests/test_helper/libtest_helper.a libssh.a
  550. $(LD) -o $@ $(LDFLAGS) $(UNITTESTS_TEST_UTF8_OBJS) \
  551. regress/unittests/test_helper/libtest_helper.a \
  552. -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
  553. UNITTESTS_TEST_PKCS11_OBJS=\
  554. regress/unittests/pkcs11/tests.o
  555. regress/unittests/pkcs11/test_pkcs11$(EXEEXT): \
  556. ${UNITTESTS_TEST_PKCS11_OBJS} \
  557. regress/unittests/test_helper/libtest_helper.a libssh.a
  558. $(LD) -o $@ $(LDFLAGS) $(UNITTESTS_TEST_PKCS11_OBJS) \
  559. regress/unittests/test_helper/libtest_helper.a \
  560. -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
  561. MISC_KEX_FUZZ_OBJS=\
  562. regress/misc/kexfuzz/kexfuzz.o \
  563. $(SKOBJS)
  564. regress/misc/kexfuzz/kexfuzz$(EXEEXT): ${MISC_KEX_FUZZ_OBJS} libssh.a
  565. $(LD) -o $@ $(LDFLAGS) $(MISC_KEX_FUZZ_OBJS) \
  566. -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
  567. # These all need to be compiled -fPIC, so they are treated differently.
  568. SK_DUMMY_OBJS=\
  569. regress/misc/sk-dummy/sk-dummy.lo \
  570. regress/misc/sk-dummy/fatal.lo \
  571. ed25519.lo hash.lo ge25519.lo fe25519.lo sc25519.lo verify.lo
  572. SK_DUMMY_LIBRARY=@SK_DUMMY_LIBRARY@
  573. .c.lo: Makefile.in config.h
  574. $(CC) $(CFLAGS_NOPIE) $(PICFLAG) $(CPPFLAGS) -c $< -o $@
  575. regress/misc/sk-dummy/sk-dummy.so: $(SK_DUMMY_OBJS)
  576. $(CC) $(CFLAGS) $(CPPFLAGS) -fPIC -shared -o $@ $(SK_DUMMY_OBJS) \
  577. -L. -Lopenbsd-compat -lopenbsd-compat $(LDFLAGS_NOPIE) $(LIBS)
  578. regress-binaries: regress-prep $(LIBCOMPAT) \
  579. regress/modpipe$(EXEEXT) \
  580. regress/setuid-allowed$(EXEEXT) \
  581. regress/netcat$(EXEEXT) \
  582. regress/check-perm$(EXEEXT) \
  583. regress/mkdtemp$(EXEEXT) \
  584. $(SK_DUMMY_LIBRARY)
  585. regress-unit-binaries: regress-prep $(REGRESSLIBS) \
  586. regress/unittests/sshbuf/test_sshbuf$(EXEEXT) \
  587. regress/unittests/sshkey/test_sshkey$(EXEEXT) \
  588. regress/unittests/sshsig/test_sshsig$(EXEEXT) \
  589. regress/unittests/bitmap/test_bitmap$(EXEEXT) \
  590. regress/unittests/conversion/test_conversion$(EXEEXT) \
  591. regress/unittests/hostkeys/test_hostkeys$(EXEEXT) \
  592. regress/unittests/kex/test_kex$(EXEEXT) \
  593. regress/unittests/match/test_match$(EXEEXT) \
  594. regress/unittests/utf8/test_utf8$(EXEEXT) \
  595. regress/unittests/pkcs11/test_pkcs11$(EXEEXT) \
  596. regress/misc/kexfuzz/kexfuzz$(EXEEXT)
  597. tests: file-tests t-exec interop-tests unit
  598. echo all tests passed
  599. unit: regress-unit-binaries
  600. BUILDDIR=`pwd`; \
  601. cd $(srcdir)/regress || exit $$?; \
  602. $(MAKE) \
  603. .OBJDIR="$${BUILDDIR}/regress" \
  604. .CURDIR="`pwd`" \
  605. $@ && echo $@ tests passed
  606. interop-tests t-exec file-tests: regress-prep regress-binaries $(TARGETS)
  607. BUILDDIR=`pwd`; \
  608. cd $(srcdir)/regress || exit $$?; \
  609. EGREP='@EGREP@' \
  610. $(MAKE) \
  611. .OBJDIR="$${BUILDDIR}/regress" \
  612. .CURDIR="`pwd`" \
  613. BUILDDIR="$${BUILDDIR}" \
  614. OBJ="$${BUILDDIR}/regress/" \
  615. PATH="$${BUILDDIR}:$${PATH}" \
  616. TEST_ENV=MALLOC_OPTIONS="@TEST_MALLOC_OPTIONS@" \
  617. TEST_MALLOC_OPTIONS="@TEST_MALLOC_OPTIONS@" \
  618. TEST_SSH_SCP="$${BUILDDIR}/scp" \
  619. TEST_SSH_SSH="$${BUILDDIR}/ssh" \
  620. TEST_SSH_SSHD="$${BUILDDIR}/sshd" \
  621. TEST_SSH_SSHAGENT="$${BUILDDIR}/ssh-agent" \
  622. TEST_SSH_SSHADD="$${BUILDDIR}/ssh-add" \
  623. TEST_SSH_SSHKEYGEN="$${BUILDDIR}/ssh-keygen" \
  624. TEST_SSH_SSHPKCS11HELPER="$${BUILDDIR}/ssh-pkcs11-helper" \
  625. TEST_SSH_SSHKEYSCAN="$${BUILDDIR}/ssh-keyscan" \
  626. TEST_SSH_SFTP="$${BUILDDIR}/sftp" \
  627. TEST_SSH_PKCS11_HELPER="$${BUILDDIR}/ssh-pkcs11-helper" \
  628. TEST_SSH_SK_HELPER="$${BUILDDIR}/ssh-sk-helper" \
  629. TEST_SSH_SFTPSERVER="$${BUILDDIR}/sftp-server" \
  630. TEST_SSH_PLINK="plink" \
  631. TEST_SSH_PUTTYGEN="puttygen" \
  632. TEST_SSH_CONCH="conch" \
  633. TEST_SSH_IPV6="@TEST_SSH_IPV6@" \
  634. TEST_SSH_UTF8="@TEST_SSH_UTF8@" \
  635. TEST_SSH_ECC="@TEST_SSH_ECC@" \
  636. TEST_SHELL="${TEST_SHELL}" \
  637. EXEEXT="$(EXEEXT)" \
  638. $@ && echo all $@ passed
  639. compat-tests: $(LIBCOMPAT)
  640. (cd openbsd-compat/regress && $(MAKE))
  641. regressclean:
  642. if [ -f regress/Makefile ] && [ -r regress/Makefile ]; then \
  643. (cd regress && $(MAKE) clean) \
  644. fi
  645. survey: survey.sh ssh
  646. @$(SHELL) ./survey.sh > survey
  647. @echo 'The survey results have been placed in the file "survey" in the'
  648. @echo 'current directory. Please review the file then send with'
  649. @echo '"make send-survey".'
  650. send-survey: survey
  651. mail portable-survey@mindrot.org <survey
  652. package: $(CONFIGFILES) $(MANPAGES) $(TARGETS)
  653. if [ "@MAKE_PACKAGE_SUPPORTED@" = yes ]; then \
  654. sh buildpkg.sh; \
  655. fi
  656. # @DEPEND@