]>
Commit | Line | Data |
---|---|---|
3c0ef626 | 1 | # $Id$ |
2 | ||
350391c5 | 3 | # uncomment if you run a non bourne compatable shell. Ie. csh |
4 | #SHELL = @SH@ | |
5 | ||
6 | AUTORECONF=autoreconf | |
7 | ||
3c0ef626 | 8 | prefix=@prefix@ |
9 | exec_prefix=@exec_prefix@ | |
10 | bindir=@bindir@ | |
11 | sbindir=@sbindir@ | |
12 | libexecdir=@libexecdir@ | |
13 | datadir=@datadir@ | |
14 | mandir=@mandir@ | |
15 | mansubdir=@mansubdir@ | |
16 | sysconfdir=@sysconfdir@ | |
17 | piddir=@piddir@ | |
18 | srcdir=@srcdir@ | |
19 | top_srcdir=@top_srcdir@ | |
20 | ||
21 | DESTDIR= | |
22 | VPATH=@srcdir@ | |
23 | SSH_PROGRAM=@bindir@/ssh | |
24 | ASKPASS_PROGRAM=$(libexecdir)/ssh-askpass | |
25 | SFTP_SERVER=$(libexecdir)/sftp-server | |
44a053a3 | 26 | SSH_KEYSIGN=$(libexecdir)/ssh-keysign |
27 | RAND_HELPER=$(libexecdir)/ssh-rand-helper | |
350391c5 | 28 | PRIVSEP_PATH=@PRIVSEP_PATH@ |
276b07a3 | 29 | SSH_PRIVSEP_USER=@SSH_PRIVSEP_USER@ |
bfe49944 | 30 | STRIP_OPT=@STRIP_OPT@ |
3c0ef626 | 31 | |
e9702f7d | 32 | PATHS= -DSSHDIR=\"$(sysconfdir)\" \ |
3c0ef626 | 33 | -D_PATH_SSH_PROGRAM=\"$(SSH_PROGRAM)\" \ |
34 | -D_PATH_SSH_ASKPASS_DEFAULT=\"$(ASKPASS_PROGRAM)\" \ | |
35 | -D_PATH_SFTP_SERVER=\"$(SFTP_SERVER)\" \ | |
44a053a3 | 36 | -D_PATH_SSH_KEY_SIGN=\"$(SSH_KEYSIGN)\" \ |
e9702f7d | 37 | -D_PATH_SSH_PIDDIR=\"$(piddir)\" \ |
350391c5 | 38 | -D_PATH_PRIVSEP_CHROOT_DIR=\"$(PRIVSEP_PATH)\" \ |
44a053a3 | 39 | -DSSH_RAND_HELPER=\"$(RAND_HELPER)\" |
3c0ef626 | 40 | |
41 | CC=@CC@ | |
42 | LD=@LD@ | |
43 | CFLAGS=@CFLAGS@ | |
44 | CPPFLAGS=-I. -I$(srcdir) @CPPFLAGS@ $(PATHS) @DEFS@ | |
45 | LIBS=@LIBS@ | |
e9702f7d | 46 | LIBPAM=@LIBPAM@ |
47 | LIBWRAP=@LIBWRAP@ | |
3c0ef626 | 48 | AR=@AR@ |
7cac2b65 | 49 | AWK=@AWK@ |
3c0ef626 | 50 | RANLIB=@RANLIB@ |
51 | INSTALL=@INSTALL@ | |
52 | PERL=@PERL@ | |
bfe49944 | 53 | SED=@SED@ |
3c0ef626 | 54 | ENT=@ENT@ |
55 | XAUTH_PATH=@XAUTH_PATH@ | |
56 | LDFLAGS=-L. -Lopenbsd-compat/ @LDFLAGS@ | |
57 | EXEEXT=@EXEEXT@ | |
3c0ef626 | 58 | |
59 | INSTALL_SSH_PRNG_CMDS=@INSTALL_SSH_PRNG_CMDS@ | |
e9702f7d | 60 | INSTALL_SSH_RAND_HELPER=@INSTALL_SSH_RAND_HELPER@ |
1ca858e9 | 61 | INSTALL_GSISSH=@INSTALL_GSISSH@ |
3c0ef626 | 62 | |
bfe49944 | 63 | 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-server$(EXEEXT) sftp$(EXEEXT) |
64 | ||
540d72c3 | 65 | LIBSSH_OBJS=acss.o authfd.o authfile.o bufaux.o buffer.o \ |
66 | canohost.o channels.o cipher.o cipher-acss.o cipher-aes.o \ | |
67 | cipher-bf1.o cipher-ctr.o cipher-3des1.o cleanup.o \ | |
68 | compat.o compress.o crc32.o deattack.o fatal.o hostfile.o \ | |
69 | log.o match.o moduli.o mpaux.o nchan.o packet.o \ | |
70 | readpass.o rsa.o tildexpand.o ttymodes.o xmalloc.o \ | |
71 | atomicio.o key.o dispatch.o kex.o mac.o uuencode.o misc.o \ | |
bfe49944 | 72 | rijndael.o ssh-dss.o ssh-rsa.o dh.o kexdh.o kexgex.o \ |
7cac2b65 | 73 | kexdhc.o kexgexc.o scard.o msg.o progressmeter.o dns.o \ |
74 | entropy.o scard-opensc.o kexgssc.o gss-genr.o | |
bfe49944 | 75 | |
76 | SSHOBJS= ssh.o readconf.o clientloop.o sshtty.o \ | |
77 | sshconnect.o sshconnect1.o sshconnect2.o | |
78 | ||
79 | SSHDOBJS=sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o \ | |
80 | sshpty.o sshlogin.o servconf.o serverloop.o uidswap.o \ | |
81 | auth.o auth1.o auth2.o auth-options.o session.o \ | |
82 | auth-chall.o auth2-chall.o groupaccess.o \ | |
83 | auth-skey.o auth-bsdauth.o auth2-hostbased.o auth2-kbdint.o \ | |
84 | auth2-none.o auth2-passwd.o auth2-pubkey.o \ | |
85 | monitor_mm.o monitor.o monitor_wrap.o monitor_fdpass.o \ | |
23987cb8 | 86 | kexdhs.o kexgexs.o kexgsss.o \ |
7cac2b65 | 87 | auth-krb5.o \ |
88 | auth2-gss.o gss-serv.o gss-serv-krb5.o gss-serv-gsi.o \ | |
540d72c3 | 89 | loginrec.o auth-pam.o auth-shadow.o auth-sia.o md5crypt.o |
3c0ef626 | 90 | |
44a053a3 | 91 | 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 |
92 | 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 | |
3c0ef626 | 93 | MANTYPE = @MANTYPE@ |
94 | ||
95 | CONFIGFILES=sshd_config.out ssh_config.out moduli.out | |
96 | CONFIGFILES_IN=sshd_config ssh_config moduli | |
97 | ||
98 | PATHSUBS = \ | |
bfe49944 | 99 | -e 's|/etc/ssh/ssh_prng_cmds|$(sysconfdir)/ssh_prng_cmds|g' \ |
100 | -e 's|/etc/ssh/ssh_config|$(sysconfdir)/ssh_config|g' \ | |
101 | -e 's|/etc/ssh/ssh_known_hosts|$(sysconfdir)/ssh_known_hosts|g' \ | |
102 | -e 's|/etc/ssh/sshd_config|$(sysconfdir)/sshd_config|g' \ | |
103 | -e 's|/usr/libexec|$(libexecdir)|g' \ | |
104 | -e 's|/etc/shosts.equiv|$(sysconfdir)/shosts.equiv|g' \ | |
105 | -e 's|/etc/ssh/ssh_host_key|$(sysconfdir)/ssh_host_key|g' \ | |
106 | -e 's|/etc/ssh/ssh_host_dsa_key|$(sysconfdir)/ssh_host_dsa_key|g' \ | |
107 | -e 's|/etc/ssh/ssh_host_rsa_key|$(sysconfdir)/ssh_host_rsa_key|g' \ | |
108 | -e 's|/var/run/sshd.pid|$(piddir)/sshd.pid|g' \ | |
109 | -e 's|/etc/ssh/moduli|$(sysconfdir)/moduli|g' \ | |
110 | -e 's|/etc/sshrc|$(sysconfdir)/sshrc|g' \ | |
111 | -e 's|/usr/X11R6/bin/xauth|$(XAUTH_PATH)|g' \ | |
112 | -e 's|/var/empty|$(PRIVSEP_PATH)|g' \ | |
113 | -e 's|/usr/bin:/bin:/usr/sbin:/sbin|@user_path@|g' | |
114 | ||
115 | FIXPATHSCMD = $(SED) $(PATHSUBS) | |
3c0ef626 | 116 | |
7cac2b65 | 117 | all: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) |
3c0ef626 | 118 | |
7cac2b65 | 119 | $(LIBSSH_OBJS): Makefile.in config.h |
120 | $(SSHOBJS): Makefile.in config.h | |
121 | $(SSHDOBJS): Makefile.in config.h | |
3c0ef626 | 122 | |
123 | .c.o: | |
124 | $(CC) $(CFLAGS) $(CPPFLAGS) -c $< | |
125 | ||
126 | LIBCOMPAT=openbsd-compat/libopenbsd-compat.a | |
127 | $(LIBCOMPAT): always | |
128 | (cd openbsd-compat && $(MAKE)) | |
129 | always: | |
130 | ||
131 | libssh.a: $(LIBSSH_OBJS) | |
132 | $(AR) rv $@ $(LIBSSH_OBJS) | |
133 | $(RANLIB) $@ | |
134 | ||
135 | ssh$(EXEEXT): $(LIBCOMPAT) libssh.a $(SSHOBJS) | |
136 | $(LD) -o $@ $(SSHOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) | |
137 | ||
138 | sshd$(EXEEXT): libssh.a $(LIBCOMPAT) $(SSHDOBJS) | |
e9702f7d | 139 | $(LD) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(LIBWRAP) $(LIBPAM) $(LIBS) |
3c0ef626 | 140 | |
bfe49944 | 141 | scp$(EXEEXT): $(LIBCOMPAT) libssh.a scp.o progressmeter.o |
142 | $(LD) -o $@ scp.o progressmeter.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) | |
3c0ef626 | 143 | |
144 | ssh-add$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-add.o | |
540d72c3 | 145 | $(LD) -o $@ ssh-add.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) |
3c0ef626 | 146 | |
147 | ssh-agent$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-agent.o | |
540d72c3 | 148 | $(LD) -o $@ ssh-agent.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) |
3c0ef626 | 149 | |
150 | ssh-keygen$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keygen.o | |
540d72c3 | 151 | $(LD) -o $@ ssh-keygen.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) |
3c0ef626 | 152 | |
44a053a3 | 153 | ssh-keysign$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keysign.o |
540d72c3 | 154 | $(LD) -o $@ ssh-keysign.o readconf.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) |
44a053a3 | 155 | |
3c0ef626 | 156 | ssh-keyscan$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-keyscan.o |
540d72c3 | 157 | $(LD) -o $@ ssh-keyscan.o $(LDFLAGS) -lssh -lopenbsd-compat -lssh $(LIBS) |
3c0ef626 | 158 | |
159 | sftp-server$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-common.o sftp-server.o | |
540d72c3 | 160 | $(LD) -o $@ sftp-server.o sftp-common.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) |
3c0ef626 | 161 | |
540d72c3 | 162 | sftp$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-client.o sftp-common.o sftp-glob.o progressmeter.o |
163 | $(LD) -o $@ progressmeter.o sftp.o sftp-client.o sftp-common.o sftp-glob.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) | |
3c0ef626 | 164 | |
e9702f7d | 165 | ssh-rand-helper${EXEEXT}: $(LIBCOMPAT) libssh.a ssh-rand-helper.o |
166 | $(LD) -o $@ ssh-rand-helper.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) | |
167 | ||
3c0ef626 | 168 | # test driver for the loginrec code - not built by default |
169 | logintest: logintest.o $(LIBCOMPAT) libssh.a loginrec.o | |
170 | $(LD) -o $@ logintest.o $(LDFLAGS) loginrec.o -lopenbsd-compat -lssh $(LIBS) | |
171 | ||
172 | $(MANPAGES): $(MANPAGES_IN) | |
173 | if test "$(MANTYPE)" = "cat"; then \ | |
174 | manpage=$(srcdir)/`echo $@ | sed 's/\.[1-9]\.out$$/\.0/'`; \ | |
175 | else \ | |
176 | manpage=$(srcdir)/`echo $@ | sed 's/\.out$$//'`; \ | |
177 | fi; \ | |
178 | if test "$(MANTYPE)" = "man"; then \ | |
7cac2b65 | 179 | $(FIXPATHSCMD) $${manpage} | $(AWK) -f $(srcdir)/mdoc2man.awk > $@; \ |
3c0ef626 | 180 | else \ |
181 | $(FIXPATHSCMD) $${manpage} > $@; \ | |
182 | fi | |
183 | ||
184 | $(CONFIGFILES): $(CONFIGFILES_IN) | |
185 | conffile=`echo $@ | sed 's/.out$$//'`; \ | |
186 | $(FIXPATHSCMD) $(srcdir)/$${conffile} > $@ | |
187 | ||
7cac2b65 | 188 | ssh_prng_cmds.out: ssh_prng_cmds |
189 | if test ! -z "$(INSTALL_SSH_PRNG_CMDS)"; then \ | |
190 | $(PERL) $(srcdir)/fixprogs ssh_prng_cmds $(ENT); \ | |
191 | fi | |
192 | ||
193 | # fake rule to stop make trying to compile moduli.o into a binary "modulo" | |
194 | moduli: | |
195 | echo | |
196 | ||
29d88157 | 197 | clean: regressclean |
540d72c3 | 198 | rm -f *.o *.a $(TARGETS) logintest config.cache config.log |
199 | rm -f *.out core | |
3c0ef626 | 200 | (cd openbsd-compat && $(MAKE) clean) |
201 | ||
29d88157 | 202 | distclean: regressclean |
540d72c3 | 203 | rm -f *.o *.a $(TARGETS) logintest config.cache config.log |
3c0ef626 | 204 | rm -f *.out core |
205 | rm -f Makefile config.h config.status ssh_prng_cmds *~ | |
206 | rm -rf autom4te.cache | |
207 | (cd openbsd-compat && $(MAKE) distclean) | |
208 | (cd scard && $(MAKE) distclean) | |
209 | ||
7cac2b65 | 210 | veryclean: distclean |
3c0ef626 | 211 | rm -f configure config.h.in *.0 |
3c0ef626 | 212 | |
7cac2b65 | 213 | mrproper: veryclean |
214 | ||
215 | realclean: veryclean | |
3c0ef626 | 216 | |
217 | catman-do: | |
218 | @for f in $(MANPAGES_IN) ; do \ | |
219 | base=`echo $$f | sed 's/\..*$$//'` ; \ | |
220 | echo "$$f -> $$base.0" ; \ | |
221 | nroff -mandoc $$f | cat -v | sed -e 's/.\^H//g' \ | |
222 | >$$base.0 ; \ | |
223 | done | |
224 | ||
225 | distprep: catman-do | |
350391c5 | 226 | $(AUTORECONF) |
540d72c3 | 227 | -rm -rf autom4te.cache |
3c0ef626 | 228 | (cd scard && $(MAKE) -f Makefile.in distprep) |
229 | ||
7cac2b65 | 230 | install: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) install-files host-key check-config |
231 | install-nokeys: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) install-files | |
3c0ef626 | 232 | |
d03f4262 | 233 | check-config: |
234 | -$(DESTDIR)$(sbindir)/sshd -t -f $(DESTDIR)$(sysconfdir)/sshd_config | |
276b07a3 | 235 | |
3c0ef626 | 236 | scard-install: |
237 | (cd scard && $(MAKE) DESTDIR=$(DESTDIR) install) | |
238 | ||
239 | install-files: scard-install | |
240 | $(srcdir)/mkinstalldirs $(DESTDIR)$(bindir) | |
241 | $(srcdir)/mkinstalldirs $(DESTDIR)$(sbindir) | |
242 | $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir) | |
243 | $(srcdir)/mkinstalldirs $(DESTDIR)$(datadir) | |
244 | $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)1 | |
44a053a3 | 245 | $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)5 |
3c0ef626 | 246 | $(srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/$(mansubdir)8 |
247 | $(srcdir)/mkinstalldirs $(DESTDIR)$(libexecdir) | |
d03f4262 | 248 | (umask 022 ; $(srcdir)/mkinstalldirs $(DESTDIR)$(PRIVSEP_PATH)) |
bfe49944 | 249 | $(INSTALL) -m 0755 $(STRIP_OPT) ssh $(DESTDIR)$(bindir)/ssh |
250 | $(INSTALL) -m 0755 $(STRIP_OPT) scp $(DESTDIR)$(bindir)/scp | |
251 | $(INSTALL) -m 0755 $(STRIP_OPT) ssh-add $(DESTDIR)$(bindir)/ssh-add | |
252 | $(INSTALL) -m 0755 $(STRIP_OPT) ssh-agent $(DESTDIR)$(bindir)/ssh-agent | |
253 | $(INSTALL) -m 0755 $(STRIP_OPT) ssh-keygen $(DESTDIR)$(bindir)/ssh-keygen | |
254 | $(INSTALL) -m 0755 $(STRIP_OPT) ssh-keyscan $(DESTDIR)$(bindir)/ssh-keyscan | |
255 | $(INSTALL) -m 0755 $(STRIP_OPT) sshd $(DESTDIR)$(sbindir)/sshd | |
e9702f7d | 256 | if test ! -z "$(INSTALL_SSH_RAND_HELPER)" ; then \ |
bfe49944 | 257 | $(INSTALL) -m 0755 $(STRIP_OPT) ssh-rand-helper $(DESTDIR)$(libexecdir)/ssh-rand-helper ; \ |
e9702f7d | 258 | fi |
bfe49944 | 259 | $(INSTALL) -m 4711 $(STRIP_OPT) ssh-keysign $(DESTDIR)$(SSH_KEYSIGN) |
260 | $(INSTALL) -m 0755 $(STRIP_OPT) sftp $(DESTDIR)$(bindir)/sftp | |
261 | $(INSTALL) -m 0755 $(STRIP_OPT) sftp-server $(DESTDIR)$(SFTP_SERVER) | |
3c0ef626 | 262 | $(INSTALL) -m 644 ssh.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1 |
263 | $(INSTALL) -m 644 scp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1 | |
264 | $(INSTALL) -m 644 ssh-add.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1 | |
265 | $(INSTALL) -m 644 ssh-agent.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-agent.1 | |
266 | $(INSTALL) -m 644 ssh-keygen.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keygen.1 | |
267 | $(INSTALL) -m 644 ssh-keyscan.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keyscan.1 | |
44a053a3 | 268 | $(INSTALL) -m 644 sshd_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/sshd_config.5 |
269 | $(INSTALL) -m 644 ssh_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/ssh_config.5 | |
3c0ef626 | 270 | $(INSTALL) -m 644 sshd.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8 |
276b07a3 | 271 | if [ ! -z "$(INSTALL_SSH_RAND_HELPER)" ]; then \ |
350391c5 | 272 | $(INSTALL) -m 644 ssh-rand-helper.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-rand-helper.8 ; \ |
273 | fi | |
bfe49944 | 274 | $(INSTALL) -m 644 sftp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1 |
275 | $(INSTALL) -m 644 sftp-server.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8 | |
44a053a3 | 276 | $(INSTALL) -m 644 ssh-keysign.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8 |
3c0ef626 | 277 | -rm -f $(DESTDIR)$(bindir)/slogin |
d03f4262 | 278 | ln -s ./ssh$(EXEEXT) $(DESTDIR)$(bindir)/slogin |
3c0ef626 | 279 | -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1 |
d03f4262 | 280 | ln -s ./ssh.1 $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1 |
1ca858e9 | 281 | if [ ! -z "$(INSTALL_GSISSH)" ]; then \ |
282 | rm -f $(DESTDIR)$(bindir)/gsissh; \ | |
d03f4262 | 283 | ln -s ./ssh$(EXEEXT) $(DESTDIR)$(bindir)/gsissh; \ |
1ca858e9 | 284 | rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/gsissh.1; \ |
d03f4262 | 285 | ln -s ./ssh.1 $(DESTDIR)$(mandir)/$(mansubdir)1/gsissh.1; \ |
1ca858e9 | 286 | rm -f $(DESTDIR)$(bindir)/gsiscp; \ |
d03f4262 | 287 | ln -s ./scp$(EXEEXT) $(DESTDIR)$(bindir)/gsiscp; \ |
1ca858e9 | 288 | rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/gsiscp.1; \ |
d03f4262 | 289 | ln -s ./scp.1 $(DESTDIR)$(mandir)/$(mansubdir)1/gsiscp.1; \ |
d12a5358 | 290 | rm -f $(DESTDIR)$(bindir)/gsisftp; \ |
291 | ln -s ./sftp$(EXEEXT) $(DESTDIR)$(bindir)/gsisftp; \ | |
292 | rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/gsisftp.1; \ | |
293 | ln -s ./sftp.1 $(DESTDIR)$(mandir)/$(mansubdir)1/gsisftp.1; \ | |
1ca858e9 | 294 | fi |
3c0ef626 | 295 | if [ ! -d $(DESTDIR)$(sysconfdir) ]; then \ |
296 | $(srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir); \ | |
297 | fi | |
d03f4262 | 298 | @if [ ! -f $(DESTDIR)$(sysconfdir)/ssh_config ]; then \ |
3c0ef626 | 299 | $(INSTALL) -m 644 ssh_config.out $(DESTDIR)$(sysconfdir)/ssh_config; \ |
300 | else \ | |
301 | echo "$(DESTDIR)$(sysconfdir)/ssh_config already exists, install will not overwrite"; \ | |
302 | fi | |
d03f4262 | 303 | @if [ ! -f $(DESTDIR)$(sysconfdir)/sshd_config ]; then \ |
3c0ef626 | 304 | $(INSTALL) -m 644 sshd_config.out $(DESTDIR)$(sysconfdir)/sshd_config; \ |
305 | else \ | |
306 | echo "$(DESTDIR)$(sysconfdir)/sshd_config already exists, install will not overwrite"; \ | |
307 | fi | |
d03f4262 | 308 | @if [ -f ssh_prng_cmds -a ! -z "$(INSTALL_SSH_PRNG_CMDS)" ]; then \ |
3c0ef626 | 309 | if [ ! -f $(DESTDIR)$(sysconfdir)/ssh_prng_cmds ] ; then \ |
310 | $(INSTALL) -m 644 ssh_prng_cmds.out $(DESTDIR)$(sysconfdir)/ssh_prng_cmds; \ | |
311 | else \ | |
312 | echo "$(DESTDIR)$(sysconfdir)/ssh_prng_cmds already exists, install will not overwrite"; \ | |
313 | fi ; \ | |
314 | fi | |
d03f4262 | 315 | @if [ ! -f $(DESTDIR)$(sysconfdir)/moduli ]; then \ |
3c0ef626 | 316 | if [ -f $(DESTDIR)$(sysconfdir)/primes ]; then \ |
317 | echo "moving $(DESTDIR)$(sysconfdir)/primes to $(DESTDIR)$(sysconfdir)/moduli"; \ | |
318 | mv "$(DESTDIR)$(sysconfdir)/primes" "$(DESTDIR)$(sysconfdir)/moduli"; \ | |
319 | else \ | |
320 | $(INSTALL) -m 644 moduli.out $(DESTDIR)$(sysconfdir)/moduli; \ | |
321 | fi ; \ | |
322 | else \ | |
323 | echo "$(DESTDIR)$(sysconfdir)/moduli already exists, install will not overwrite"; \ | |
324 | fi | |
325 | ||
326 | host-key: ssh-keygen$(EXEEXT) | |
d03f4262 | 327 | @if [ -z "$(DESTDIR)" ] ; then \ |
3c0ef626 | 328 | if [ -f "$(DESTDIR)$(sysconfdir)/ssh_host_key" ] ; then \ |
329 | echo "$(DESTDIR)$(sysconfdir)/ssh_host_key already exists, skipping." ; \ | |
330 | else \ | |
331 | ./ssh-keygen -t rsa1 -f $(DESTDIR)$(sysconfdir)/ssh_host_key -N "" ; \ | |
332 | fi ; \ | |
333 | if [ -f $(DESTDIR)$(sysconfdir)/ssh_host_dsa_key ] ; then \ | |
334 | echo "$(DESTDIR)$(sysconfdir)/ssh_host_dsa_key already exists, skipping." ; \ | |
335 | else \ | |
336 | ./ssh-keygen -t dsa -f $(DESTDIR)$(sysconfdir)/ssh_host_dsa_key -N "" ; \ | |
337 | fi ; \ | |
338 | if [ -f $(DESTDIR)$(sysconfdir)/ssh_host_rsa_key ] ; then \ | |
339 | echo "$(DESTDIR)$(sysconfdir)/ssh_host_rsa_key already exists, skipping." ; \ | |
340 | else \ | |
341 | ./ssh-keygen -t rsa -f $(DESTDIR)$(sysconfdir)/ssh_host_rsa_key -N "" ; \ | |
342 | fi ; \ | |
343 | fi ; | |
344 | ||
345 | host-key-force: ssh-keygen$(EXEEXT) | |
346 | ./ssh-keygen -t rsa1 -f $(DESTDIR)$(sysconfdir)/ssh_host_key -N "" | |
347 | ./ssh-keygen -t dsa -f $(DESTDIR)$(sysconfdir)/ssh_host_dsa_key -N "" | |
348 | ./ssh-keygen -t rsa -f $(DESTDIR)$(sysconfdir)/ssh_host_rsa_key -N "" | |
349 | ||
350 | uninstallall: uninstall | |
351 | -rm -f $(DESTDIR)$(sysconfdir)/ssh_config | |
352 | -rm -f $(DESTDIR)$(sysconfdir)/sshd_config | |
353 | -rm -f $(DESTDIR)$(sysconfdir)/ssh_prng_cmds | |
354 | -rmdir $(DESTDIR)$(sysconfdir) | |
355 | -rmdir $(DESTDIR)$(bindir) | |
356 | -rmdir $(DESTDIR)$(sbindir) | |
357 | -rmdir $(DESTDIR)$(mandir)/$(mansubdir)1 | |
358 | -rmdir $(DESTDIR)$(mandir)/$(mansubdir)8 | |
359 | -rmdir $(DESTDIR)$(mandir) | |
360 | -rmdir $(DESTDIR)$(libexecdir) | |
361 | ||
540d72c3 | 362 | uninstall: |
3c0ef626 | 363 | -rm -f $(DESTDIR)$(bindir)/slogin |
1ca858e9 | 364 | if [ ! -z "$(INSTALL_GSISSH)" ]; then \ |
365 | rm -f $(DESTDIR)$(bindir)/gsiscp; \ | |
366 | rm -f $(DESTDIR)$(bindir)/gsissh; \ | |
d12a5358 | 367 | rm -f $(DESTDIR)$(bindir)/gsisftp; \ |
1ca858e9 | 368 | fi |
3c0ef626 | 369 | -rm -f $(DESTDIR)$(bindir)/ssh$(EXEEXT) |
370 | -rm -f $(DESTDIR)$(bindir)/scp$(EXEEXT) | |
371 | -rm -f $(DESTDIR)$(bindir)/ssh-add$(EXEEXT) | |
372 | -rm -f $(DESTDIR)$(bindir)/ssh-agent$(EXEEXT) | |
373 | -rm -f $(DESTDIR)$(bindir)/ssh-keygen$(EXEEXT) | |
374 | -rm -f $(DESTDIR)$(bindir)/ssh-keyscan$(EXEEXT) | |
375 | -rm -f $(DESTDIR)$(bindir)/sftp$(EXEEXT) | |
376 | -rm -f $(DESTDIR)$(sbindir)/sshd$(EXEEXT) | |
377 | -rm -r $(DESTDIR)$(SFTP_SERVER)$(EXEEXT) | |
44a053a3 | 378 | -rm -f $(DESTDIR)$(SSH_KEYSIGN)$(EXEEXT) |
379 | -rm -f $(DESTDIR)$(RAND_HELPER)$(EXEEXT) | |
3c0ef626 | 380 | -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1 |
381 | -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1 | |
1ca858e9 | 382 | if [ ! -z "$(INSTALL_GSISSH)" ]; then \ |
383 | rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/gsissh.1; \ | |
384 | rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/gsiscp.1; \ | |
d12a5358 | 385 | rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/gsisftp.1; \ |
1ca858e9 | 386 | fi |
3c0ef626 | 387 | -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1 |
388 | -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-agent.1 | |
389 | -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keygen.1 | |
390 | -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1 | |
391 | -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keyscan.1 | |
392 | -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8 | |
350391c5 | 393 | -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-rand-helper.8 |
3c0ef626 | 394 | -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8 |
44a053a3 | 395 | -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8 |
3c0ef626 | 396 | -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1 |
7cac2b65 | 397 | |
398 | tests: $(TARGETS) | |
399 | BUILDDIR=`pwd`; \ | |
400 | [ -d `pwd`/regress ] || mkdir -p `pwd`/regress; \ | |
29d88157 | 401 | [ -f `pwd`/regress/Makefile ] || \ |
402 | ln -s $(srcdir)/regress/Makefile `pwd`/regress/Makefile ; \ | |
540d72c3 | 403 | TEST_SHELL="@TEST_MINUS_S_SH@"; \ |
7cac2b65 | 404 | TEST_SSH_SSH="$${BUILDDIR}/ssh"; \ |
405 | TEST_SSH_SSHD="$${BUILDDIR}/sshd"; \ | |
406 | TEST_SSH_SSHAGENT="$${BUILDDIR}/ssh-agent"; \ | |
407 | TEST_SSH_SSHADD="$${BUILDDIR}/ssh-add"; \ | |
408 | TEST_SSH_SSHKEYGEN="$${BUILDDIR}/ssh-keygen"; \ | |
409 | TEST_SSH_SSHKEYSCAN="$${BUILDDIR}/ssh-keyscan"; \ | |
410 | TEST_SSH_SFTP="$${BUILDDIR}/sftp"; \ | |
411 | TEST_SSH_SFTPSERVER="$${BUILDDIR}/sftp-server"; \ | |
412 | cd $(srcdir)/regress || exit $$?; \ | |
413 | $(MAKE) \ | |
414 | .OBJDIR="$${BUILDDIR}/regress" \ | |
415 | .CURDIR="`pwd`" \ | |
416 | BUILDDIR="$${BUILDDIR}" \ | |
417 | OBJ="$${BUILDDIR}/regress/" \ | |
418 | PATH="$${BUILDDIR}:$${PATH}" \ | |
540d72c3 | 419 | TEST_SHELL="$${TEST_SHELL}" \ |
7cac2b65 | 420 | TEST_SSH_SSH="$${TEST_SSH_SSH}" \ |
421 | TEST_SSH_SSHD="$${TEST_SSH_SSHD}" \ | |
422 | TEST_SSH_SSHAGENT="$${TEST_SSH_SSHAGENT}" \ | |
423 | TEST_SSH_SSHADD="$${TEST_SSH_SSHADD}" \ | |
424 | TEST_SSH_SSHKEYGEN="$${TEST_SSH_SSHKEYGEN}" \ | |
425 | TEST_SSH_SSHKEYSCAN="$${TEST_SSH_SSHKEYSCAN}" \ | |
426 | TEST_SSH_SFTP="$${TEST_SSH_SFTP}" \ | |
427 | TEST_SSH_SFTPSERVER="$${TEST_SSH_SFTPSERVER}" \ | |
428 | EXEEXT="$(EXEEXT)" \ | |
429 | $@ | |
29d88157 | 430 | |
431 | regressclean: | |
432 | if [ -f regress/Makefile -a -r regress/Makefile ]; then \ | |
433 | (cd regress && $(MAKE) clean) \ | |
434 | fi |