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