3 # uncomment if you run a non bourne compatable shell. Ie. csh
10 exec_prefix=@exec_prefix@
13 libexecdir=@libexecdir@
17 sysconfdir=$$GLOBUS_LOCATION/etc/ssh
18 docdir=$$GLOBUS_LOCATION/doc/gsi_openssh
21 top_srcdir=@top_srcdir@
25 SSH_PROGRAM=@bindir@/ssh
26 ASKPASS_PROGRAM=$(libexecdir)/ssh-askpass
27 SFTP_SERVER=$(libexecdir)/sftp-server
28 SSH_KEYSIGN=$(libexecdir)/ssh-keysign
29 RAND_HELPER=$(libexecdir)/ssh-rand-helper
30 PRIVSEP_PATH=@PRIVSEP_PATH@
31 SSH_PRIVSEP_USER=@SSH_PRIVSEP_USER@
33 PATHS= -D_PATH_SSH_PIDDIR=\"$(piddir)\" \
34 -D_PATH_PRIVSEP_CHROOT_DIR=\"$(PRIVSEP_PATH)\"
39 CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ $(PATHS) @DEFS@
48 XAUTH_PATH=@XAUTH_PATH@
49 LDFLAGS=-L. -Lopenbsd-compat/ @LDFLAGS@
52 INSTALL_SSH_PRNG_CMDS=@INSTALL_SSH_PRNG_CMDS@
53 INSTALL_SSH_RAND_HELPER=@INSTALL_SSH_RAND_HELPER@
55 @NO_SFTP@SFTP_PROGS=sftp-server$(EXEEXT) sftp$(EXEEXT)
57 TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-agent$(EXEEXT) scp$(EXEEXT) ssh-rand-helper${EXEEXT} $(SFTP_PROGS)
59 LIBSSH_OBJS=atomicio.o authfd.o authfile.o bufaux.o buffer.o canohost.o channels.o cipher.o compat.o compress.o crc32.o deattack.o dh.o dispatch.o fatal.o mac.o msg.o hostfile.o key.o kex.o kexdh.o kexgex.o log.o match.o misc.o mpaux.o nchan.o packet.o radix.o rijndael.o entropy.o readpass.o rsa.o scard.o scard-opensc.o ssh-dss.o ssh-rsa.o tildexpand.o ttymodes.o uidswap.o uuencode.o xmalloc.o monitor_wrap.o monitor_fdpass.o kexgss.o gss-genr.o pathnames.o
61 SSHOBJS= ssh.o sshconnect.o sshconnect1.o sshconnect2.o sshtty.o readconf.o clientloop.o
63 SSHDOBJS= sshd.o auth.o auth1.o auth2.o auth2-hostbased.o auth2-kbdint.o auth2-none.o auth2-passwd.o auth2-pubkey.o auth-chall.o auth2-chall.o auth-rhosts.o auth-options.o auth-krb4.o auth-krb5.o auth-pam.o auth2-pam.o auth-passwd.o auth-rsa.o auth-rh-rsa.o auth-sia.o sshpty.o sshlogin.o loginrec.o servconf.o serverloop.o md5crypt.o session.o groupaccess.o auth-skey.o auth-bsdauth.o monitor_mm.o monitor.o auth2-gss.o gss-serv.o
65 MANPAGES = 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 sshd_config.5.out ssh_config.5.out
66 MANPAGES_IN = 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 sshd_config.5 ssh_config.5
69 CONFIGFILES=sshd_config.out ssh_config.out moduli.out
70 CONFIGFILES_IN=sshd_config ssh_config moduli
73 -D/etc/ssh/ssh_prng_cmds='$(sysconfdir)'/ssh_prng_cmds \
74 -D/etc/ssh/ssh_config='$(sysconfdir)'/ssh_config \
75 -D/etc/ssh/ssh_known_hosts='$(sysconfdir)'/ssh_known_hosts \
76 -D/etc/ssh/sshd_config='$(sysconfdir)'/sshd_config \
77 -D/usr/libexec=$(libexecdir) \
78 -D/etc/shosts.equiv='$(sysconfdir)'/shosts.equiv \
79 -D/etc/ssh/ssh_host_key='$(sysconfdir)'/ssh_host_key \
80 -D/etc/ssh/ssh_host_dsa_key='$(sysconfdir)'/ssh_host_dsa_key \
81 -D/etc/ssh/ssh_host_rsa_key='$(sysconfdir)'/ssh_host_rsa_key \
82 -D/var/run/sshd.pid=$(piddir)/sshd.pid \
83 -D/etc/ssh/moduli='$(sysconfdir)'/moduli \
84 -D/etc/ssh/sshrc='$(sysconfdir)'/sshrc \
85 -D/usr/X11R6/bin/xauth=$(XAUTH_PATH) \
86 -D/var/empty=$(PRIVSEP_PATH) \
87 -D/usr/bin:/bin:/usr/sbin:/sbin=@user_path@
89 FIXPATHSCMD = $(DISTPERL) ./fixpaths $(PATHSUBS)
91 all: $(CONFIGFILES) $(MANPAGES) $(TARGETS)
95 $(LIBSSH_OBJS): config.h
100 $(CC) $(CFLAGS) $(CPPFLAGS) -c $<
102 LIBCOMPAT=openbsd-compat/libopenbsd-compat.a
104 (cd openbsd-compat && $(MAKE))
107 libssh.a: $(LIBSSH_OBJS)
108 $(AR) rv $@ $(LIBSSH_OBJS)
111 ssh$(EXEEXT): $(LIBCOMPAT) libssh.a $(SSHOBJS)
112 $(LD) -o $@ $(SSHOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
114 sshd$(EXEEXT): libssh.a $(LIBCOMPAT) $(SSHDOBJS)
115 $(LD) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBWRAP) $(LIBPAM) $(LIBS)
117 scp$(EXEEXT): $(LIBCOMPAT) libssh.a scp.o
118 $(LD) -o $@ scp.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
120 ssh-add$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-add.o
121 $(LD) -o $@ ssh-add.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
123 ssh-agent$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-agent.o
124 $(LD) -o $@ ssh-agent.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
126 ssh-keygen$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keygen.o
127 $(LD) -o $@ ssh-keygen.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
129 ssh-keysign$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keysign.o
130 $(LD) -o $@ ssh-keysign.o readconf.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
132 ssh-keyscan$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keyscan.o
133 $(LD) -o $@ ssh-keyscan.o $(LDFLAGS) -lssh -lopenbsd-compat -lssh $(LIBS)
135 sftp-server$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-common.o sftp-server.o
136 $(LD) -o $@ sftp-server.o sftp-common.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
138 sftp$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-client.o sftp-int.o sftp-common.o sftp-glob.o
139 $(LD) -o $@ sftp.o sftp-client.o sftp-common.o sftp-int.o sftp-glob.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
141 ssh-rand-helper${EXEEXT}: $(LIBCOMPAT) libssh.a ssh-rand-helper.o
142 $(LD) -o $@ ssh-rand-helper.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
144 # test driver for the loginrec code - not built by default
145 logintest: logintest.o $(LIBCOMPAT) libssh.a loginrec.o
146 $(LD) -o $@ logintest.o $(LDFLAGS) loginrec.o -lopenbsd-compat -lssh $(LIBS)
148 $(MANPAGES): $(MANPAGES_IN)
149 if test "$(MANTYPE)" = "cat"; then \
150 manpage=$(srcdir)/`echo $@ | sed 's/\.[1-9]\.out$$/\.0/'`; \
152 manpage=$(srcdir)/`echo $@ | sed 's/\.out$$//'`; \
154 if test "$(MANTYPE)" = "man"; then \
155 $(FIXPATHSCMD) $${manpage} | $(PERL) $(srcdir)/mdoc2man.pl > $@; \
157 $(FIXPATHSCMD) $${manpage} > $@; \
160 $(CONFIGFILES): $(CONFIGFILES_IN)
161 conffile=`echo $@ | sed 's/.out$$//'`; \
162 $(FIXPATHSCMD) $(srcdir)/$${conffile} > $@
165 rm -f *.o *.a $(TARGETS) logintest config.cache config.log
167 (cd openbsd-compat && $(MAKE) clean)
170 rm -f *.o *.a $(TARGETS) logintest config.cache config.log
172 rm -f Makefile config.h config.status ssh_prng_cmds *~
173 rm -rf autom4te.cache
174 (cd openbsd-compat && $(MAKE) distclean)
175 (cd scard && $(MAKE) distclean)
178 rm -f configure config.h.in *.0
179 rm -f *.o *.a $(TARGETS) logintest config.cache config.log
181 rm -f Makefile config.h config.status ssh_prng_cmds *~
182 (cd openbsd-compat && $(MAKE) distclean)
183 (cd scard && $(MAKE) distclean)
190 @for f in $(MANPAGES_IN) ; do \
191 echo -n "$$f -> cat.." ; \
192 nroff -mandoc $$f | cat -v | sed -e 's/.\^H//g' > ./cat/$$f ; \
194 $(FIXPATHSCMD) $$f | $(DISTPERL) ./mdoc2man.pl > ./man/$$f ; \
200 (cd scard && $(MAKE) -f Makefile.in distprep)
202 install: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files host-key check-config
203 install-nokeys: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files
205 gpt-install: gpt-all gpt-install-files
206 gpt-install-nokeys: gpt-all gpt-install-files
209 -$(DESTDIR)$(sbindir)/sshd -t -f $(DESTDIR)$(sysconfdir)/sshd_config
212 (cd scard && $(MAKE) DESTDIR=$(DESTDIR) install)
214 install-files: scard-install
215 $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
216 $(srcdir)/mkinstalldirs $(DESTDIR)$(sbindir)
217 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)
218 $(srcdir)/mkinstalldirs $(DESTDIR)$(datadir)
219 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)1
220 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)5
221 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)8
222 $(srcdir)/mkinstalldirs $(DESTDIR)$(libexecdir)
223 (umask 022 ; $(srcdir)/mkinstalldirs $(DESTDIR)$(PRIVSEP_PATH))
224 $(INSTALL) -m 0755 -s ssh $(DESTDIR)$(bindir)/ssh
225 $(INSTALL) -m 0755 -s scp $(DESTDIR)$(bindir)/scp
226 $(INSTALL) -m 0755 -s ssh-add $(DESTDIR)$(bindir)/ssh-add
227 $(INSTALL) -m 0755 -s ssh-agent $(DESTDIR)$(bindir)/ssh-agent
228 $(INSTALL) -m 0755 -s ssh-keygen $(DESTDIR)$(bindir)/ssh-keygen
229 $(INSTALL) -m 0755 -s ssh-keyscan $(DESTDIR)$(bindir)/ssh-keyscan
230 $(INSTALL) -m 0755 -s sshd $(DESTDIR)$(sbindir)/sshd
231 if test ! -z "$(INSTALL_SSH_RAND_HELPER)" ; then \
232 $(INSTALL) -m 0755 -s ssh-rand-helper $(DESTDIR)$(libexecdir)/ssh-rand-helper ; \
234 $(INSTALL) -m 4711 -s ssh-keysign $(DESTDIR)$(SSH_KEYSIGN)
235 @NO_SFTP@$(INSTALL) -m 0755 -s sftp $(DESTDIR)$(bindir)/sftp
236 @NO_SFTP@$(INSTALL) -m 0755 -s sftp-server $(DESTDIR)$(SFTP_SERVER)
237 $(INSTALL) -m 644 ssh.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1
238 $(INSTALL) -m 644 scp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1
239 $(INSTALL) -m 644 ssh-add.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1
240 $(INSTALL) -m 644 ssh-agent.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-agent.1
241 $(INSTALL) -m 644 ssh-keygen.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keygen.1
242 $(INSTALL) -m 644 ssh-keyscan.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keyscan.1
243 $(INSTALL) -m 644 sshd_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/sshd_config.5
244 $(INSTALL) -m 644 ssh_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/ssh_config.5
245 $(INSTALL) -m 644 sshd.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8
246 if [ ! -z "$(INSTALL_SSH_RAND_HELPER)" ]; then \
247 $(INSTALL) -m 644 ssh-rand-helper.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-rand-helper.8 ; \
249 @NO_SFTP@$(INSTALL) -m 644 sftp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1
250 @NO_SFTP@$(INSTALL) -m 644 sftp-server.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8
251 $(INSTALL) -m 644 ssh-keysign.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8
252 -rm -f $(DESTDIR)$(bindir)/slogin
253 ln -s ./ssh$(EXEEXT) $(DESTDIR)$(bindir)/slogin
254 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
255 ln -s ./ssh.1 $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
256 if [ ! -d $(DESTDIR)$(sysconfdir) ]; then \
257 $(srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir); \
259 @if [ ! -f $(DESTDIR)$(sysconfdir)/ssh_config ]; then \
260 $(INSTALL) -m 644 ssh_config.out $(DESTDIR)$(sysconfdir)/ssh_config; \
262 echo "$(DESTDIR)$(sysconfdir)/ssh_config already exists, install will not overwrite"; \
264 @if [ ! -f $(DESTDIR)$(sysconfdir)/sshd_config ]; then \
265 $(INSTALL) -m 644 sshd_config.out $(DESTDIR)$(sysconfdir)/sshd_config; \
267 echo "$(DESTDIR)$(sysconfdir)/sshd_config already exists, install will not overwrite"; \
269 @if [ -f ssh_prng_cmds -a ! -z "$(INSTALL_SSH_PRNG_CMDS)" ]; then \
270 $(PERL) $(srcdir)/fixprogs ssh_prng_cmds $(ENT); \
271 if [ ! -f $(DESTDIR)$(sysconfdir)/ssh_prng_cmds ] ; then \
272 $(INSTALL) -m 644 ssh_prng_cmds.out $(DESTDIR)$(sysconfdir)/ssh_prng_cmds; \
274 echo "$(DESTDIR)$(sysconfdir)/ssh_prng_cmds already exists, install will not overwrite"; \
277 @if [ ! -f $(DESTDIR)$(sysconfdir)/moduli ]; then \
278 if [ -f $(DESTDIR)$(sysconfdir)/primes ]; then \
279 echo "moving $(DESTDIR)$(sysconfdir)/primes to $(DESTDIR)$(sysconfdir)/moduli"; \
280 mv "$(DESTDIR)$(sysconfdir)/primes" "$(DESTDIR)$(sysconfdir)/moduli"; \
282 $(INSTALL) -m 644 moduli.out $(DESTDIR)$(sysconfdir)/moduli; \
285 echo "$(DESTDIR)$(sysconfdir)/moduli already exists, install will not overwrite"; \
290 # Upon a new OpenSSH merge into the repository:
292 # o Set up new catman-do.
293 # o Set up new gpt-all.
294 # o Remove $(MANPAGES) and $(CONFIGFILES) from target list.
295 # o Set up new gpt-install-files.
296 # o Destroy current/old gpt-install-files target.
297 # o Copy install-files target into gpt-install-files target.
298 # o Remove the following sections:
299 # o Copying the configuration files.
300 # o Copying the configuration file man pages.
301 # o The scard-install target.
302 # o Creating and chmod'ing PRIVSEP_PATH.
303 # o Removing the conditionals around ssh-rand-helper*.
304 # o Install docs into $GL/doc/gsi_openssh.
305 # o Add links for gsi tools (gsissh -> ssh, etc).
306 # o Refer to the new man and cat pages.
310 $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir)
311 $(srcdir)/mkinstalldirs $(DESTDIR)$(sbindir)
312 $(srcdir)/mkinstalldirs $(DESTDIR)$(datadir)
313 $(srcdir)/mkinstalldirs $(DESTDIR)$(libexecdir)
315 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir); \
316 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$${docdir}1; \
317 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$${docdir}5; \
318 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$${docdir}8
320 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir); \
321 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$${docdir}1; \
322 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$${docdir}5; \
323 $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$${docdir}8
324 $(INSTALL) -m 0755 ssh $(DESTDIR)$(bindir)/ssh
325 $(INSTALL) -m 0755 scp $(DESTDIR)$(bindir)/scp
326 $(INSTALL) -m 0755 ssh-add $(DESTDIR)$(bindir)/ssh-add
327 $(INSTALL) -m 0755 ssh-agent $(DESTDIR)$(bindir)/ssh-agent
328 $(INSTALL) -m 0755 ssh-keygen $(DESTDIR)$(bindir)/ssh-keygen
329 $(INSTALL) -m 0755 ssh-keyscan $(DESTDIR)$(bindir)/ssh-keyscan
330 $(INSTALL) -m 0755 sshd $(DESTDIR)$(sbindir)/sshd
331 $(INSTALL) -m 0755 ssh-rand-helper $(DESTDIR)$(libexecdir)/ssh-rand-helper ; \
332 $(INSTALL) -m 4711 ssh-keysign $(DESTDIR)$(SSH_KEYSIGN)
333 @NO_SFTP@$(INSTALL) -m 0755 sftp $(DESTDIR)$(bindir)/sftp
334 @NO_SFTP@$(INSTALL) -m 0755 sftp-server $(DESTDIR)$(SFTP_SERVER)
335 -rm -f $(DESTDIR)$(bindir)/slogin
336 ln -s ./ssh$(EXEEXT) $(DESTDIR)$(bindir)/slogin
337 -rm -f $(DESTDIR)$(bindir)/gsissh
338 ln -s ./ssh$(EXEEXT) $(DESTDIR)$(bindir)/gsissh
339 -rm -f $(DESTDIR)$(bindir)/gsiscp
340 ln -s ./scp$(EXEEXT) $(DESTDIR)$(bindir)/gsiscp
343 $(INSTALL) -m 644 $${docdir}/ssh.1 $(DESTDIR)$(mandir)/$${docdir}1/ssh.1; \
344 $(INSTALL) -m 644 $${docdir}/scp.1 $(DESTDIR)$(mandir)/$${docdir}1/scp.1; \
345 $(INSTALL) -m 644 $${docdir}/ssh-add.1 $(DESTDIR)$(mandir)/$${docdir}1/ssh-add.1; \
346 $(INSTALL) -m 644 $${docdir}/ssh-agent.1 $(DESTDIR)$(mandir)/$${docdir}1/ssh-agent.1; \
347 $(INSTALL) -m 644 $${docdir}/ssh-keygen.1 $(DESTDIR)$(mandir)/$${docdir}1/ssh-keygen.1; \
348 $(INSTALL) -m 644 $${docdir}/ssh-keyscan.1 $(DESTDIR)$(mandir)/$${docdir}1/ssh-keyscan.1; \
349 $(INSTALL) -m 644 $${docdir}/sshd_config.5 $(DESTDIR)$(mandir)/$${docdir}5/sshd_config.5; \
350 $(INSTALL) -m 644 $${docdir}/ssh_config.5 $(DESTDIR)$(mandir)/$${docdir}5/ssh_config.5; \
351 $(INSTALL) -m 644 $${docdir}/sshd.8 $(DESTDIR)$(mandir)/$${docdir}8/sshd.8; \
352 $(INSTALL) -m 644 $${docdir}/ssh-rand-helper.8 $(DESTDIR)$(mandir)/$${docdir}8/ssh-rand-helper.8; \
353 @NO_SFTP@$(INSTALL) -m 644 $${docdir}/sftp.1 $(DESTDIR)$(mandir)/$${docdir}1/sftp.1; \
354 @NO_SFTP@$(INSTALL) -m 644 $${docdir}/sftp-server.8 $(DESTDIR)$(mandir)/$${docdir}8/sftp-server.8; \
355 $(INSTALL) -m 644 $${docdir}/ssh-keysign.8 $(DESTDIR)$(mandir)/$${docdir}8/ssh-keysign.8; \
356 -rm -f $(DESTDIR)$(mandir)/$${docdir}1/slogin.1; \
357 ln -s ./ssh.1 $(DESTDIR)$(mandir)/$${docdir}1/slogin.1; \
358 -rm -f $(DESTDIR)$(mandir)/$${docdir}1/gsissh.1; \
359 ln -s ./ssh.1 $(DESTDIR)$(mandir)/$${docdir}1/gsissh.1; \
360 -rm -f $(DESTDIR)$(mandir)/$${docdir}1/gsiscp.1; \
361 ln -s ./scp.1 $(DESTDIR)$(mandir)/$${docdir}1/gsiscp.1;
365 $(INSTALL) -m 644 $${docdir}/ssh.1 $(DESTDIR)$(mandir)/$${docdir}1/ssh.1; \
366 $(INSTALL) -m 644 $${docdir}/scp.1 $(DESTDIR)$(mandir)/$${docdir}1/scp.1; \
367 $(INSTALL) -m 644 $${docdir}/ssh-add.1 $(DESTDIR)$(mandir)/$${docdir}1/ssh-add.1; \
368 $(INSTALL) -m 644 $${docdir}/ssh-agent.1 $(DESTDIR)$(mandir)/$${docdir}1/ssh-agent.1; \
369 $(INSTALL) -m 644 $${docdir}/ssh-keygen.1 $(DESTDIR)$(mandir)/$${docdir}1/ssh-keygen.1; \
370 $(INSTALL) -m 644 $${docdir}/ssh-keyscan.1 $(DESTDIR)$(mandir)/$${docdir}1/ssh-keyscan.1; \
371 $(INSTALL) -m 644 $${docdir}/sshd_config.5 $(DESTDIR)$(mandir)/$${docdir}5/sshd_config.5; \
372 $(INSTALL) -m 644 $${docdir}/ssh_config.5 $(DESTDIR)$(mandir)/$${docdir}5/ssh_config.5; \
373 $(INSTALL) -m 644 $${docdir}/sshd.8 $(DESTDIR)$(mandir)/$${docdir}8/sshd.8; \
374 $(INSTALL) -m 644 $${docdir}/ssh-rand-helper.8 $(DESTDIR)$(mandir)/$${docdir}8/ssh-rand-helper.8; \
375 @NO_SFTP@$(INSTALL) -m 644 $${docdir}/sftp.1 $(DESTDIR)$(mandir)/$${docdir}1/sftp.1; \
376 @NO_SFTP@$(INSTALL) -m 644 $${docdir}/sftp-server.8 $(DESTDIR)$(mandir)/$${docdir}8/sftp-server.8; \
377 $(INSTALL) -m 644 $${docdir}/ssh-keysign.8 $(DESTDIR)$(mandir)/$${docdir}8/ssh-keysign.8; \
378 -rm -f $(DESTDIR)$(mandir)/$${docdir}1/slogin.1; \
379 ln -s ./ssh.1 $(DESTDIR)$(mandir)/$${docdir}1/slogin.1; \
380 -rm -f $(DESTDIR)$(mandir)/$${docdir}1/gsissh.1; \
381 ln -s ./ssh.1 $(DESTDIR)$(mandir)/$${docdir}1/gsissh.1; \
382 -rm -f $(DESTDIR)$(mandir)/$${docdir}1/gsiscp.1; \
383 ln -s ./scp.1 $(DESTDIR)$(mandir)/$${docdir}1/gsiscp.1;
385 if [ ! -d $(DESTDIR)$(docdir) ]; then \
386 $(srcdir)/mkinstalldirs $(DESTDIR)$(docdir); \
388 $(INSTALL) -m 644 README $(DESTDIR)$(docdir)/README
389 $(INSTALL) -m 644 README.gpt $(DESTDIR)$(docdir)/README.gpt
390 $(INSTALL) -m 644 README.privsep $(DESTDIR)$(docdir)/README.privsep
391 $(INSTALL) -m 644 INSTALL $(DESTDIR)$(docdir)/INSTALL
392 $(INSTALL) -m 644 WARNING.RNG $(DESTDIR)$(docdir)/WARNING.RNG
393 $(INSTALL) -m 644 LICENCE $(DESTDIR)$(docdir)/LICENSE.OpenSSH
394 $(INSTALL) -m 644 CREDITS $(DESTDIR)$(docdir)/CREDITS
396 host-key: ssh-keygen$(EXEEXT)
397 @if [ -z "$(DESTDIR)" ] ; then \
398 if [ -f "$(DESTDIR)$(sysconfdir)/ssh_host_key" ] ; then \
399 echo "$(DESTDIR)$(sysconfdir)/ssh_host_key already exists, skipping." ; \
401 ./ssh-keygen -t rsa1 -f $(DESTDIR)$(sysconfdir)/ssh_host_key -N "" ; \
403 if [ -f $(DESTDIR)$(sysconfdir)/ssh_host_dsa_key ] ; then \
404 echo "$(DESTDIR)$(sysconfdir)/ssh_host_dsa_key already exists, skipping." ; \
406 ./ssh-keygen -t dsa -f $(DESTDIR)$(sysconfdir)/ssh_host_dsa_key -N "" ; \
408 if [ -f $(DESTDIR)$(sysconfdir)/ssh_host_rsa_key ] ; then \
409 echo "$(DESTDIR)$(sysconfdir)/ssh_host_rsa_key already exists, skipping." ; \
411 ./ssh-keygen -t rsa -f $(DESTDIR)$(sysconfdir)/ssh_host_rsa_key -N "" ; \
415 host-key-force: ssh-keygen$(EXEEXT)
416 ./ssh-keygen -t rsa1 -f $(DESTDIR)$(sysconfdir)/ssh_host_key -N ""
417 ./ssh-keygen -t dsa -f $(DESTDIR)$(sysconfdir)/ssh_host_dsa_key -N ""
418 ./ssh-keygen -t rsa -f $(DESTDIR)$(sysconfdir)/ssh_host_rsa_key -N ""
420 uninstallall: uninstall
421 -rm -f $(DESTDIR)$(sysconfdir)/ssh_config
422 -rm -f $(DESTDIR)$(sysconfdir)/sshd_config
423 -rm -f $(DESTDIR)$(sysconfdir)/ssh_prng_cmds
424 -rmdir $(DESTDIR)$(sysconfdir)
425 -rmdir $(DESTDIR)$(bindir)
426 -rmdir $(DESTDIR)$(sbindir)
427 -rmdir $(DESTDIR)$(mandir)/$(mansubdir)1
428 -rmdir $(DESTDIR)$(mandir)/$(mansubdir)8
429 -rmdir $(DESTDIR)$(mandir)
430 -rmdir $(DESTDIR)$(libexecdir)
433 -rm -f $(DESTDIR)$(bindir)/slogin
434 -rm -f $(DESTDIR)$(bindir)/gsiscp
435 -rm -f $(DESTDIR)$(bindir)/gsissh
436 -rm -f $(DESTDIR)$(bindir)/ssh$(EXEEXT)
437 -rm -f $(DESTDIR)$(bindir)/scp$(EXEEXT)
438 -rm -f $(DESTDIR)$(bindir)/ssh-add$(EXEEXT)
439 -rm -f $(DESTDIR)$(bindir)/ssh-agent$(EXEEXT)
440 -rm -f $(DESTDIR)$(bindir)/ssh-keygen$(EXEEXT)
441 -rm -f $(DESTDIR)$(bindir)/ssh-keyscan$(EXEEXT)
442 -rm -f $(DESTDIR)$(bindir)/sftp$(EXEEXT)
443 -rm -f $(DESTDIR)$(sbindir)/sshd$(EXEEXT)
444 -rm -r $(DESTDIR)$(SFTP_SERVER)$(EXEEXT)
445 -rm -f $(DESTDIR)$(SSH_KEYSIGN)$(EXEEXT)
446 -rm -f $(DESTDIR)$(RAND_HELPER)$(EXEEXT)
447 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1
448 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1
449 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/gsissh.1
450 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/gsiscp.1
451 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1
452 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-agent.1
453 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keygen.1
454 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1
455 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keyscan.1
456 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8
457 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-rand-helper.8
458 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8
459 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8
460 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1