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