- (dtucker) platform.c session.c] Move the USE_LIBIAF fragment into
[openssh-git.git] / Makefile.in
blobbfd37d51ed0830a11cf6bce494b0c92e125ecb5f
1 # $Id: Makefile.in,v 1.311 2010/08/31 12:47:15 djm Exp $
3 # uncomment if you run a non bourne compatable shell. Ie. csh
4 #SHELL = @SH@
6 AUTORECONF=autoreconf
8 prefix=@prefix@
9 exec_prefix=@exec_prefix@
10 bindir=@bindir@
11 sbindir=@sbindir@
12 libexecdir=@libexecdir@
13 datadir=@datadir@
14 datarootdir=@datarootdir@
15 mandir=@mandir@
16 mansubdir=@mansubdir@
17 sysconfdir=@sysconfdir@
18 piddir=@piddir@
19 srcdir=@srcdir@
20 top_srcdir=@top_srcdir@
22 DESTDIR=
23 VPATH=@srcdir@
24 SSH_PROGRAM=@bindir@/ssh
25 ASKPASS_PROGRAM=$(libexecdir)/ssh-askpass
26 SFTP_SERVER=$(libexecdir)/sftp-server
27 SSH_KEYSIGN=$(libexecdir)/ssh-keysign
28 SSH_PKCS11_HELPER=$(libexecdir)/ssh-pkcs11-helper
29 RAND_HELPER=$(libexecdir)/ssh-rand-helper
30 PRIVSEP_PATH=@PRIVSEP_PATH@
31 SSH_PRIVSEP_USER=@SSH_PRIVSEP_USER@
32 STRIP_OPT=@STRIP_OPT@
34 PATHS= -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_PIDDIR=\"$(piddir)\" \
41 -D_PATH_PRIVSEP_CHROOT_DIR=\"$(PRIVSEP_PATH)\" \
42 -DSSH_RAND_HELPER=\"$(RAND_HELPER)\"
44 CC=@CC@
45 LD=@LD@
46 CFLAGS=@CFLAGS@
47 CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ $(PATHS) @DEFS@
48 LIBS=@LIBS@
49 SSHDLIBS=@SSHDLIBS@
50 LIBEDIT=@LIBEDIT@
51 AR=@AR@
52 AWK=@AWK@
53 RANLIB=@RANLIB@
54 INSTALL=@INSTALL@
55 PERL=@PERL@
56 SED=@SED@
57 ENT=@ENT@
58 XAUTH_PATH=@XAUTH_PATH@
59 LDFLAGS=-L. -Lopenbsd-compat/ @LDFLAGS@
60 EXEEXT=@EXEEXT@
62 INSTALL_SSH_PRNG_CMDS=@INSTALL_SSH_PRNG_CMDS@
63 INSTALL_SSH_RAND_HELPER=@INSTALL_SSH_RAND_HELPER@
65 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) ssh-rand-helper${EXEEXT} sftp-server$(EXEEXT) sftp$(EXEEXT)
67 LIBSSH_OBJS=acss.o authfd.o authfile.o bufaux.o bufbn.o buffer.o \
68 canohost.o channels.o cipher.o cipher-acss.o cipher-aes.o \
69 cipher-bf1.o cipher-ctr.o cipher-3des1.o cleanup.o \
70 compat.o compress.o crc32.o deattack.o fatal.o hostfile.o \
71 log.o match.o md-sha256.o moduli.o nchan.o packet.o \
72 readpass.o rsa.o ttymodes.o xmalloc.o addrmatch.o \
73 atomicio.o key.o dispatch.o kex.o mac.o uidswap.o uuencode.o misc.o \
74 monitor_fdpass.o rijndael.o ssh-dss.o ssh-ecdsa.o ssh-rsa.o dh.o \
75 kexdh.o kexgex.o kexdhc.o kexgexc.o bufec.o kexecdh.o kexecdhc.o \
76 msg.o progressmeter.o dns.o entropy.o gss-genr.o umac.o jpake.o \
77 schnorr.o ssh-pkcs11.o
79 SSHOBJS= ssh.o readconf.o clientloop.o sshtty.o \
80 sshconnect.o sshconnect1.o sshconnect2.o mux.o \
81 roaming_common.o roaming_client.o
83 SSHDOBJS=sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o \
84 sshpty.o sshlogin.o servconf.o serverloop.o \
85 auth.o auth1.o auth2.o auth-options.o session.o \
86 auth-chall.o auth2-chall.o groupaccess.o \
87 auth-skey.o auth-bsdauth.o auth2-hostbased.o auth2-kbdint.o \
88 auth2-none.o auth2-passwd.o auth2-pubkey.o auth2-jpake.o \
89 monitor_mm.o monitor.o monitor_wrap.o kexdhs.o kexgexs.o kexecdhs.o \
90 auth-krb5.o \
91 auth2-gss.o gss-serv.o gss-serv-krb5.o \
92 loginrec.o auth-pam.o auth-shadow.o auth-sia.o md5crypt.o \
93 audit.o audit-bsm.o platform.o sftp-server.o sftp-common.o \
94 roaming_common.o roaming_serv.o
96 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-rand-helper.8.out ssh-keysign.8.out ssh-pkcs11-helper.8.out sshd_config.5.out ssh_config.5.out
97 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-rand-helper.8 ssh-keysign.8 ssh-pkcs11-helper.8 sshd_config.5 ssh_config.5
98 MANTYPE = @MANTYPE@
100 CONFIGFILES=sshd_config.out ssh_config.out moduli.out
101 CONFIGFILES_IN=sshd_config ssh_config moduli
103 PATHSUBS = \
104 -e 's|/etc/ssh/ssh_prng_cmds|$(sysconfdir)/ssh_prng_cmds|g' \
105 -e 's|/etc/ssh/ssh_config|$(sysconfdir)/ssh_config|g' \
106 -e 's|/etc/ssh/ssh_known_hosts|$(sysconfdir)/ssh_known_hosts|g' \
107 -e 's|/etc/ssh/sshd_config|$(sysconfdir)/sshd_config|g' \
108 -e 's|/usr/libexec|$(libexecdir)|g' \
109 -e 's|/etc/shosts.equiv|$(sysconfdir)/shosts.equiv|g' \
110 -e 's|/etc/ssh/ssh_host_key|$(sysconfdir)/ssh_host_key|g' \
111 -e 's|/etc/ssh/ssh_host_dsa_key|$(sysconfdir)/ssh_host_dsa_key|g' \
112 -e 's|/etc/ssh/ssh_host_rsa_key|$(sysconfdir)/ssh_host_rsa_key|g' \
113 -e 's|/var/run/sshd.pid|$(piddir)/sshd.pid|g' \
114 -e 's|/etc/moduli|$(sysconfdir)/moduli|g' \
115 -e 's|/etc/ssh/moduli|$(sysconfdir)/moduli|g' \
116 -e 's|/etc/ssh/sshrc|$(sysconfdir)/sshrc|g' \
117 -e 's|/usr/X11R6/bin/xauth|$(XAUTH_PATH)|g' \
118 -e 's|/var/empty|$(PRIVSEP_PATH)|g' \
119 -e 's|/usr/bin:/bin:/usr/sbin:/sbin|@user_path@|g'
121 FIXPATHSCMD = $(SED) $(PATHSUBS)
123 all: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS)
125 $(LIBSSH_OBJS): Makefile.in config.h
126 $(SSHOBJS): Makefile.in config.h
127 $(SSHDOBJS): Makefile.in config.h
129 .c.o:
130 $(CC) $(CFLAGS) $(CPPFLAGS) -c $<
132 LIBCOMPAT=openbsd-compat/libopenbsd-compat.a
133 $(LIBCOMPAT): always
134 (cd openbsd-compat && $(MAKE))
135 always:
137 libssh.a: $(LIBSSH_OBJS)
138 $(AR) rv $@ $(LIBSSH_OBJS)
139 $(RANLIB) $@
141 ssh$(EXEEXT): $(LIBCOMPAT) libssh.a $(SSHOBJS)
142 $(LD) -o $@ $(SSHOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
144 sshd$(EXEEXT): libssh.a $(LIBCOMPAT) $(SSHDOBJS)
145 $(LD) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(SSHDLIBS) $(LIBS)
147 scp$(EXEEXT): $(LIBCOMPAT) libssh.a scp.o progressmeter.o
148 $(LD) -o $@ scp.o progressmeter.o bufaux.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
150 ssh-add$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-add.o
151 $(LD) -o $@ ssh-add.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
153 ssh-agent$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-agent.o ssh-pkcs11-client.o
154 $(LD) -o $@ ssh-agent.o ssh-pkcs11-client.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
156 ssh-keygen$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keygen.o
157 $(LD) -o $@ ssh-keygen.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
159 ssh-keysign$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keysign.o roaming_dummy.o readconf.o
160 $(LD) -o $@ ssh-keysign.o readconf.o roaming_dummy.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
162 ssh-pkcs11-helper$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-pkcs11-helper.o ssh-pkcs11.o
163 $(LD) -o $@ ssh-pkcs11-helper.o ssh-pkcs11.o $(LDFLAGS) -lssh -lopenbsd-compat -lssh -lopenbsd-compat $(LIBS)
165 ssh-keyscan$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keyscan.o roaming_dummy.o
166 $(LD) -o $@ ssh-keyscan.o roaming_dummy.o $(LDFLAGS) -lssh -lopenbsd-compat -lssh $(LIBS)
168 sftp-server$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-common.o sftp-server.o sftp-server-main.o
169 $(LD) -o $@ sftp-server.o sftp-common.o sftp-server-main.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
171 sftp$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-client.o sftp-common.o sftp-glob.o progressmeter.o
172 $(LD) -o $@ progressmeter.o sftp.o sftp-client.o sftp-common.o sftp-glob.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) $(LIBEDIT)
174 ssh-rand-helper${EXEEXT}: $(LIBCOMPAT) libssh.a ssh-rand-helper.o
175 $(LD) -o $@ ssh-rand-helper.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
177 # test driver for the loginrec code - not built by default
178 logintest: logintest.o $(LIBCOMPAT) libssh.a loginrec.o
179 $(LD) -o $@ logintest.o $(LDFLAGS) loginrec.o -lopenbsd-compat -lssh $(LIBS)
181 $(MANPAGES): $(MANPAGES_IN)
182 if test "$(MANTYPE)" = "cat"; then \
183 manpage=$(srcdir)/`echo $@ | sed 's/\.[1-9]\.out$$/\.0/'`; \
184 else \
185 manpage=$(srcdir)/`echo $@ | sed 's/\.out$$//'`; \
186 fi; \
187 if test "$(MANTYPE)" = "man"; then \
188 $(FIXPATHSCMD) $${manpage} | $(AWK) -f $(srcdir)/mdoc2man.awk > $@; \
189 else \
190 $(FIXPATHSCMD) $${manpage} > $@; \
193 $(CONFIGFILES): $(CONFIGFILES_IN)
194 conffile=`echo $@ | sed 's/.out$$//'`; \
195 $(FIXPATHSCMD) $(srcdir)/$${conffile} > $@
197 ssh_prng_cmds.out: ssh_prng_cmds
198 if test ! -z "$(INSTALL_SSH_PRNG_CMDS)"; then \
199 $(PERL) $(srcdir)/fixprogs ssh_prng_cmds $(ENT); \
202 # fake rule to stop make trying to compile moduli.o into a binary "moduli.o"
203 moduli:
204 echo
206 clean: regressclean
207 rm -f *.o *.a $(TARGETS) logintest config.cache config.log
208 rm -f *.out core survey
209 (cd openbsd-compat && $(MAKE) clean)
211 distclean: regressclean
212 rm -f *.o *.a $(TARGETS) logintest config.cache config.log
213 rm -f *.out core opensshd.init openssh.xml
214 rm -f Makefile buildpkg.sh config.h config.status ssh_prng_cmds
215 rm -f survey.sh openbsd-compat/regress/Makefile *~
216 rm -rf autom4te.cache
217 (cd openbsd-compat && $(MAKE) distclean)
218 if test -d pkg ; then \
219 rm -fr pkg ; \
222 veryclean: distclean
223 rm -f configure config.h.in *.0
225 mrproper: veryclean
227 realclean: veryclean
229 catman-do:
230 @for f in $(MANPAGES_IN) ; do \
231 base=`echo $$f | sed 's/\..*$$//'` ; \
232 echo "$$f -> $$base.0" ; \
233 nroff -mandoc $$f | cat -v | sed -e 's/.\^H//g' \
234 >$$base.0 ; \
235 done
237 distprep: catman-do
238 $(AUTORECONF)
239 -rm -rf autom4te.cache
241 install: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) install-files install-sysconf host-key check-config
242 install-nokeys: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) install-files install-sysconf
243 install-nosysconf: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) install-files
245 check-config:
246 -$(DESTDIR)$(sbindir)/sshd -t -f $(DESTDIR)$(sysconfdir)/sshd_config
248 install-files:
249 $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
250 $(srcdir)/mkinstalldirs $(DESTDIR)$(sbindir)
251 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)
252 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)1
253 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)5
254 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)8
255 $(srcdir)/mkinstalldirs $(DESTDIR)$(libexecdir)
256 (umask 022 ; $(srcdir)/mkinstalldirs $(DESTDIR)$(PRIVSEP_PATH))
257 $(INSTALL) -m 0755 $(STRIP_OPT) ssh$(EXEEXT) $(DESTDIR)$(bindir)/ssh$(EXEEXT)
258 $(INSTALL) -m 0755 $(STRIP_OPT) scp$(EXEEXT) $(DESTDIR)$(bindir)/scp$(EXEEXT)
259 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-add$(EXEEXT) $(DESTDIR)$(bindir)/ssh-add$(EXEEXT)
260 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-agent$(EXEEXT) $(DESTDIR)$(bindir)/ssh-agent$(EXEEXT)
261 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-keygen$(EXEEXT) $(DESTDIR)$(bindir)/ssh-keygen$(EXEEXT)
262 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-keyscan$(EXEEXT) $(DESTDIR)$(bindir)/ssh-keyscan$(EXEEXT)
263 $(INSTALL) -m 0755 $(STRIP_OPT) sshd$(EXEEXT) $(DESTDIR)$(sbindir)/sshd$(EXEEXT)
264 if test ! -z "$(INSTALL_SSH_RAND_HELPER)" ; then \
265 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-rand-helper$(EXEEXT) $(DESTDIR)$(libexecdir)/ssh-rand-helper$(EXEEXT) ; \
267 $(INSTALL) -m 4711 $(STRIP_OPT) ssh-keysign$(EXEEXT) $(DESTDIR)$(SSH_KEYSIGN)$(EXEEXT)
268 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-pkcs11-helper$(EXEEXT) $(DESTDIR)$(SSH_PKCS11_HELPER)$(EXEEXT)
269 $(INSTALL) -m 0755 $(STRIP_OPT) sftp$(EXEEXT) $(DESTDIR)$(bindir)/sftp$(EXEEXT)
270 $(INSTALL) -m 0755 $(STRIP_OPT) sftp-server$(EXEEXT) $(DESTDIR)$(SFTP_SERVER)$(EXEEXT)
271 $(INSTALL) -m 644 ssh.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1
272 $(INSTALL) -m 644 scp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1
273 $(INSTALL) -m 644 ssh-add.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1
274 $(INSTALL) -m 644 ssh-agent.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-agent.1
275 $(INSTALL) -m 644 ssh-keygen.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keygen.1
276 $(INSTALL) -m 644 ssh-keyscan.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keyscan.1
277 $(INSTALL) -m 644 moduli.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/moduli.5
278 $(INSTALL) -m 644 sshd_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/sshd_config.5
279 $(INSTALL) -m 644 ssh_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/ssh_config.5
280 $(INSTALL) -m 644 sshd.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8
281 if [ ! -z "$(INSTALL_SSH_RAND_HELPER)" ]; then \
282 $(INSTALL) -m 644 ssh-rand-helper.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-rand-helper.8 ; \
284 $(INSTALL) -m 644 sftp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1
285 $(INSTALL) -m 644 sftp-server.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8
286 $(INSTALL) -m 644 ssh-keysign.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8
287 $(INSTALL) -m 644 ssh-pkcs11-helper.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-pkcs11-helper.8
288 -rm -f $(DESTDIR)$(bindir)/slogin
289 ln -s ./ssh$(EXEEXT) $(DESTDIR)$(bindir)/slogin
290 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
291 ln -s ./ssh.1 $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
293 install-sysconf:
294 if [ ! -d $(DESTDIR)$(sysconfdir) ]; then \
295 $(srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir); \
297 @if [ ! -f $(DESTDIR)$(sysconfdir)/ssh_config ]; then \
298 $(INSTALL) -m 644 ssh_config.out $(DESTDIR)$(sysconfdir)/ssh_config; \
299 else \
300 echo "$(DESTDIR)$(sysconfdir)/ssh_config already exists, install will not overwrite"; \
302 @if [ ! -f $(DESTDIR)$(sysconfdir)/sshd_config ]; then \
303 $(INSTALL) -m 644 sshd_config.out $(DESTDIR)$(sysconfdir)/sshd_config; \
304 else \
305 echo "$(DESTDIR)$(sysconfdir)/sshd_config already exists, install will not overwrite"; \
307 @if [ -f ssh_prng_cmds ] && [ ! -z "$(INSTALL_SSH_PRNG_CMDS)" ]; then \
308 if [ ! -f $(DESTDIR)$(sysconfdir)/ssh_prng_cmds ] ; then \
309 $(INSTALL) -m 644 ssh_prng_cmds.out $(DESTDIR)$(sysconfdir)/ssh_prng_cmds; \
310 else \
311 echo "$(DESTDIR)$(sysconfdir)/ssh_prng_cmds already exists, install will not overwrite"; \
312 fi ; \
314 @if [ ! -f $(DESTDIR)$(sysconfdir)/moduli ]; then \
315 if [ -f $(DESTDIR)$(sysconfdir)/primes ]; then \
316 echo "moving $(DESTDIR)$(sysconfdir)/primes to $(DESTDIR)$(sysconfdir)/moduli"; \
317 mv "$(DESTDIR)$(sysconfdir)/primes" "$(DESTDIR)$(sysconfdir)/moduli"; \
318 else \
319 $(INSTALL) -m 644 moduli.out $(DESTDIR)$(sysconfdir)/moduli; \
320 fi ; \
321 else \
322 echo "$(DESTDIR)$(sysconfdir)/moduli already exists, install will not overwrite"; \
325 host-key: ssh-keygen$(EXEEXT)
326 @if [ -z "$(DESTDIR)" ] ; then \
327 if [ -f "$(DESTDIR)$(sysconfdir)/ssh_host_key" ] ; then \
328 echo "$(DESTDIR)$(sysconfdir)/ssh_host_key already exists, skipping." ; \
329 else \
330 ./ssh-keygen -t rsa1 -f $(DESTDIR)$(sysconfdir)/ssh_host_key -N "" ; \
331 fi ; \
332 if [ -f $(DESTDIR)$(sysconfdir)/ssh_host_dsa_key ] ; then \
333 echo "$(DESTDIR)$(sysconfdir)/ssh_host_dsa_key already exists, skipping." ; \
334 else \
335 ./ssh-keygen -t dsa -f $(DESTDIR)$(sysconfdir)/ssh_host_dsa_key -N "" ; \
336 fi ; \
337 if [ -f $(DESTDIR)$(sysconfdir)/ssh_host_rsa_key ] ; then \
338 echo "$(DESTDIR)$(sysconfdir)/ssh_host_rsa_key already exists, skipping." ; \
339 else \
340 ./ssh-keygen -t rsa -f $(DESTDIR)$(sysconfdir)/ssh_host_rsa_key -N "" ; \
341 fi ; \
342 fi ;
344 host-key-force: ssh-keygen$(EXEEXT)
345 ./ssh-keygen -t rsa1 -f $(DESTDIR)$(sysconfdir)/ssh_host_key -N ""
346 ./ssh-keygen -t dsa -f $(DESTDIR)$(sysconfdir)/ssh_host_dsa_key -N ""
347 ./ssh-keygen -t rsa -f $(DESTDIR)$(sysconfdir)/ssh_host_rsa_key -N ""
349 uninstallall: uninstall
350 -rm -f $(DESTDIR)$(sysconfdir)/ssh_config
351 -rm -f $(DESTDIR)$(sysconfdir)/sshd_config
352 -rm -f $(DESTDIR)$(sysconfdir)/ssh_prng_cmds
353 -rmdir $(DESTDIR)$(sysconfdir)
354 -rmdir $(DESTDIR)$(bindir)
355 -rmdir $(DESTDIR)$(sbindir)
356 -rmdir $(DESTDIR)$(mandir)/$(mansubdir)1
357 -rmdir $(DESTDIR)$(mandir)/$(mansubdir)8
358 -rmdir $(DESTDIR)$(mandir)
359 -rmdir $(DESTDIR)$(libexecdir)
361 uninstall:
362 -rm -f $(DESTDIR)$(bindir)/slogin
363 -rm -f $(DESTDIR)$(bindir)/ssh$(EXEEXT)
364 -rm -f $(DESTDIR)$(bindir)/scp$(EXEEXT)
365 -rm -f $(DESTDIR)$(bindir)/ssh-add$(EXEEXT)
366 -rm -f $(DESTDIR)$(bindir)/ssh-agent$(EXEEXT)
367 -rm -f $(DESTDIR)$(bindir)/ssh-keygen$(EXEEXT)
368 -rm -f $(DESTDIR)$(bindir)/ssh-keyscan$(EXEEXT)
369 -rm -f $(DESTDIR)$(bindir)/sftp$(EXEEXT)
370 -rm -f $(DESTDIR)$(sbindir)/sshd$(EXEEXT)
371 -rm -r $(DESTDIR)$(SFTP_SERVER)$(EXEEXT)
372 -rm -f $(DESTDIR)$(SSH_KEYSIGN)$(EXEEXT)
373 -rm -f $(DESTDIR)$(SSH_PKCS11_HELPER)$(EXEEXT)
374 -rm -f $(DESTDIR)$(RAND_HELPER)$(EXEEXT)
375 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1
376 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1
377 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1
378 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-agent.1
379 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keygen.1
380 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1
381 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keyscan.1
382 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8
383 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-rand-helper.8
384 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8
385 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8
386 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-pkcs11-helper.8
387 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
389 tests interop-tests: $(TARGETS)
390 BUILDDIR=`pwd`; \
391 [ -d `pwd`/regress ] || mkdir -p `pwd`/regress; \
392 [ -f `pwd`/regress/Makefile ] || \
393 ln -s `cd $(srcdir) && pwd`/regress/Makefile `pwd`/regress/Makefile ; \
394 TEST_SHELL="@TEST_SHELL@"; \
395 TEST_SSH_SSH="$${BUILDDIR}/ssh"; \
396 TEST_SSH_SSHD="$${BUILDDIR}/sshd"; \
397 TEST_SSH_SSHAGENT="$${BUILDDIR}/ssh-agent"; \
398 TEST_SSH_SSHADD="$${BUILDDIR}/ssh-add"; \
399 TEST_SSH_SSHKEYGEN="$${BUILDDIR}/ssh-keygen"; \
400 TEST_SSH_SSHPKCS11HELPER="$${BUILDDIR}/ssh-pkcs11-helper"; \
401 TEST_SSH_SSHKEYSCAN="$${BUILDDIR}/ssh-keyscan"; \
402 TEST_SSH_SFTP="$${BUILDDIR}/sftp"; \
403 TEST_SSH_SFTPSERVER="$${BUILDDIR}/sftp-server"; \
404 TEST_SSH_PLINK="plink"; \
405 TEST_SSH_PUTTYGEN="puttygen"; \
406 TEST_SSH_CONCH="conch"; \
407 TEST_SSH_IPV6="@TEST_SSH_IPV6@" ; \
408 cd $(srcdir)/regress || exit $$?; \
409 $(MAKE) \
410 .OBJDIR="$${BUILDDIR}/regress" \
411 .CURDIR="`pwd`" \
412 BUILDDIR="$${BUILDDIR}" \
413 OBJ="$${BUILDDIR}/regress/" \
414 PATH="$${BUILDDIR}:$${PATH}" \
415 TEST_SHELL="$${TEST_SHELL}" \
416 TEST_SSH_SSH="$${TEST_SSH_SSH}" \
417 TEST_SSH_SSHD="$${TEST_SSH_SSHD}" \
418 TEST_SSH_SSHAGENT="$${TEST_SSH_SSHAGENT}" \
419 TEST_SSH_SSHADD="$${TEST_SSH_SSHADD}" \
420 TEST_SSH_SSHKEYGEN="$${TEST_SSH_SSHKEYGEN}" \
421 TEST_SSH_SSHPKCS11HELPER="$${TEST_SSH_SSHPKCS11HELPER}" \
422 TEST_SSH_SSHKEYSCAN="$${TEST_SSH_SSHKEYSCAN}" \
423 TEST_SSH_SFTP="$${TEST_SSH_SFTP}" \
424 TEST_SSH_SFTPSERVER="$${TEST_SSH_SFTPSERVER}" \
425 TEST_SSH_PLINK="$${TEST_SSH_PLINK}" \
426 TEST_SSH_PUTTYGEN="$${TEST_SSH_PUTTYGEN}" \
427 TEST_SSH_CONCH="$${TEST_SSH_CONCH}" \
428 TEST_SSH_IPV6="@TEST_SSH_IPV6@" \
429 EXEEXT="$(EXEEXT)" \
430 $@ && echo all tests passed
432 compat-tests: $(LIBCOMPAT)
433 (cd openbsd-compat/regress && $(MAKE))
435 regressclean:
436 if [ -f regress/Makefile ] && [ -r regress/Makefile ]; then \
437 (cd regress && $(MAKE) clean) \
440 survey: survey.sh ssh
441 @$(SHELL) ./survey.sh > survey
442 @echo 'The survey results have been placed in the file "survey" in the'
443 @echo 'current directory. Please review the file then send with'
444 @echo '"make send-survey".'
446 send-survey: survey
447 mail portable-survey@mindrot.org <survey
449 package: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS)
450 if [ "@MAKE_PACKAGE_SUPPORTED@" = yes ]; then \
451 sh buildpkg.sh; \