]>
Commit | Line | Data |
---|---|---|
5881cd60 | 1 | prefix=@prefix@ |
2 | exec_prefix=@exec_prefix@ | |
3 | bindir=@bindir@ | |
4 | sbindir=@sbindir@ | |
42b89914 | 5 | libexecdir=@libexecdir@ |
bb0dd7f6 | 6 | mandir=@mandir@ |
c54a6257 | 7 | mansubdir=@mansubdir@ |
af381f02 | 8 | sysconfdir=@sysconfdir@ |
19d9ac2a | 9 | piddir=@piddir@ |
10 | srcdir=@srcdir@ | |
11 | top_srcdir=@top_srcdir@ | |
5881cd60 | 12 | |
ff8ecdb8 | 13 | DESTDIR= |
14 | ||
d2dcff5f | 15 | VPATH=@srcdir@ |
16 | ||
d4f11b59 | 17 | SSH_PROGRAM=@bindir@/ssh |
bc7ea646 | 18 | ASKPASS_LOCATION=@libexecdir@/ssh |
19 | ASKPASS_PROGRAM=$(ASKPASS_LOCATION)/ssh-askpass | |
d4f11b59 | 20 | |
5881cd60 | 21 | CC=@CC@ |
db28aeb5 | 22 | PATHS=-DETCDIR=\"$(sysconfdir)\" -DSSH_PROGRAM=\"$(SSH_PROGRAM)\" -DSSH_ASKPASS_DEFAULT=\"$(ASKPASS_PROGRAM)\" |
d4f11b59 | 23 | CFLAGS=@CFLAGS@ $(PATHS) @DEFS@ |
6a0aeebc | 24 | EXTRA_TARGETS=@GNOME_ASKPASS@ |
17f0f4a7 | 25 | LIBS=@LIBS@ |
5881cd60 | 26 | AR=@AR@ |
27 | RANLIB=@RANLIB@ | |
cf8dd513 | 28 | INSTALL=@INSTALL@ |
a0f84251 | 29 | PERL=@PERL@ |
6cfb695b | 30 | LDFLAGS=-L. @LDFLAGS@ |
5881cd60 | 31 | |
17f0f4a7 | 32 | GNOME_CFLAGS=`gnome-config --cflags gnome gnomeui` |
33 | GNOME_LIBS=`gnome-config --libs gnome gnomeui` | |
34 | ||
48e671d5 | 35 | TARGETS=ssh sshd ssh-add ssh-keygen ssh-agent scp $(EXTRA_TARGETS) |
36 | ||
37 | LIBOBJS= atomicio.o authfd.o authfile.o bsd-bindresvport.o bsd-daemon.o bsd-misc.o bsd-mktemp.o bsd-rresvport.o bsd-snprintf.o bsd-strlcat.o bsd-strlcpy.o bufaux.o buffer.o canohost.o channels.o cipher.o compat.o compress.o crc32.o deattack.o fake-getaddrinfo.o fake-getnameinfo.o fingerprint.o hostfile.o log.o match.o mpaux.o nchan.o packet.o radix.o readpass.o rsa.o tildexpand.o ttymodes.o uidswap.o xmalloc.o | |
6cfb695b | 38 | |
a5c9cd31 | 39 | SSHOBJS= ssh.o sshconnect.o log-client.o readconf.o clientloop.o |
40 | ||
48e671d5 | 41 | SSHDOBJS= sshd.o auth-rhosts.o auth-krb4.o auth-pam.o auth-passwd.o auth-rsa.o auth-rh-rsa.o pty.o log-server.o login.o servconf.o serverloop.o bsd-login.o md5crypt.o |
a5c9cd31 | 42 | |
c54a6257 | 43 | TROFFMAN = scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh.1 sshd.8 |
44 | CATMAN = scp.0 ssh-add.0 ssh-agent.0 ssh-keygen.0 ssh.0 sshd.0 | |
45 | MANPAGES = @MANTYPE@ | |
a1ec4d79 | 46 | |
47 | CONFIGFILES=sshd_config ssh_config | |
48 | ||
7e31dc81 | 49 | PATHSUBS = -D/etc/ssh_config=$(sysconfdir)/ssh_config -D/etc/known_hosts=$(sysconfdir)/ssh_known_hosts -D/etc/sshd_config=$(sysconfdir)/sshd_config -D/etc/shosts.equiv=$(sysconfdir)/shosts.equiv -D/etc/ssh_host_key=$(sysconfdir)/ssh_host_key -D/var/run/sshd.pid=$(piddir)/sshd.pid |
5f4fdfae | 50 | |
51 | FIXPATHSCMD = $(PERL) $(srcdir)/fixpaths $(PATHSUBS) | |
52 | ||
48e671d5 | 53 | all: $(TARGETS) $(MANPAGES) $(CONFIGFILES) |
6cfb695b | 54 | |
f74efc8d | 55 | $(LIBOBJS): config.h |
56 | ||
6cfb695b | 57 | libssh.a: $(LIBOBJS) |
58 | $(AR) rv $@ $(LIBOBJS) | |
5881cd60 | 59 | $(RANLIB) $@ |
60 | ||
48e671d5 | 61 | ssh: libssh.a $(SSHOBJS) |
a5c9cd31 | 62 | $(CC) -o $@ $(SSHOBJS) $(LDFLAGS) -lssh $(LIBS) |
5881cd60 | 63 | |
48e671d5 | 64 | sshd: libssh.a $(SSHDOBJS) |
dfb95100 | 65 | $(CC) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh $(LIBS) |
5881cd60 | 66 | |
48e671d5 | 67 | scp: libssh.a scp.o |
6cfb695b | 68 | $(CC) -o $@ scp.o $(LDFLAGS) -lssh $(LIBS) |
5881cd60 | 69 | |
48e671d5 | 70 | ssh-add: libssh.a ssh-add.o log-client.o |
6cfb695b | 71 | $(CC) -o $@ ssh-add.o log-client.o $(LDFLAGS) -lssh $(LIBS) |
5881cd60 | 72 | |
48e671d5 | 73 | ssh-agent: libssh.a ssh-agent.o log-client.o |
6cfb695b | 74 | $(CC) -o $@ ssh-agent.o log-client.o $(LDFLAGS) -lssh $(LIBS) |
5881cd60 | 75 | |
48e671d5 | 76 | ssh-keygen: libssh.a ssh-keygen.o log-client.o |
6cfb695b | 77 | $(CC) -o $@ ssh-keygen.o log-client.o $(LDFLAGS) -lssh $(LIBS) |
5881cd60 | 78 | |
17f0f4a7 | 79 | gnome-ssh-askpass: gnome-ssh-askpass.c |
80 | $(CC) $(CFLAGS) $(GNOME_CFLAGS) -o $@ gnome-ssh-askpass.c $(GNOME_LIBS) | |
81 | ||
5f4fdfae | 82 | $(MANPAGES) $(CONFIGFILES):: |
83 | $(FIXPATHSCMD) $(srcdir)/$@ | |
e1a9c08d | 84 | |
48e671d5 | 85 | clean: |
86 | rm -f *.o *.a $(TARGETS) config.status config.cache config.log | |
5f4fdfae | 87 | rm -f *.out core |
48e671d5 | 88 | |
89 | distclean: clean | |
90 | rm -f Makefile config.h core *~ | |
91 | ||
92 | mrproper: distclean | |
93 | ||
94 | veryclean: distclean | |
c54a6257 | 95 | rm -f configure config.h.in *.0 |
96 | ||
97 | catman-do: | |
98 | @for f in $(TROFFMAN) ; do \ | |
99 | echo "$$f -> $${f%%.[18]}.0" ; \ | |
100 | nroff -mandoc $$f | cat -v | sed -e 's/.\^H//g' \ | |
101 | >$${f%%.[18]}.0 ; \ | |
102 | done | |
48e671d5 | 103 | |
a1ec4d79 | 104 | install: $(TARGETS) |
ff8ecdb8 | 105 | $(INSTALL) -d $(DESTDIR)$(bindir) |
106 | $(INSTALL) -d $(DESTDIR)$(sbindir) | |
107 | $(INSTALL) -d $(DESTDIR)$(mandir) | |
108 | $(INSTALL) -d $(DESTDIR)$(mandir)/$(mansubdir)1 | |
109 | $(INSTALL) -d $(DESTDIR)$(mandir)/$(mansubdir)8 | |
110 | $(INSTALL) -s ssh $(DESTDIR)$(bindir)/ssh | |
111 | $(INSTALL) -s scp $(DESTDIR)$(bindir)/scp | |
112 | $(INSTALL) -s ssh-add $(DESTDIR)$(bindir)/ssh-add | |
113 | $(INSTALL) -s ssh-agent $(DESTDIR)$(bindir)/ssh-agent | |
114 | $(INSTALL) -s ssh-keygen $(DESTDIR)$(bindir)/ssh-keygen | |
115 | $(INSTALL) -s sshd $(DESTDIR)$(sbindir)/sshd | |
116 | $(INSTALL) -m 644 ssh.[01].out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1 | |
117 | $(INSTALL) -m 644 scp.[01].out $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1 | |
118 | $(INSTALL) -m 644 ssh-add.[01].out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1 | |
119 | $(INSTALL) -m 644 ssh-agent.[01].out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-agent.1 | |
120 | $(INSTALL) -m 644 ssh-keygen.[01].out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keygen.1 | |
121 | $(INSTALL) -m 644 sshd.[08].out $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8 | |
122 | -rm -f $(DESTDIR)$(bindir)/slogin | |
123 | ln -s ssh $(DESTDIR)$(bindir)/slogin | |
124 | -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1 | |
125 | ln -s ssh.1 $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1 | |
045672f9 | 126 | |
a2b62424 | 127 | if [ ! -z "@GNOME_ASKPASS@" ] ; then \ |
ff8ecdb8 | 128 | $(INSTALL) -d $(DESTDIR)$(libexecdir) ; \ |
129 | $(INSTALL) -d $(DESTDIR)$(libexecdir)/ssh ; \ | |
130 | $(INSTALL) -s @GNOME_ASKPASS@ $(DESTDIR)${ASKPASS_LOCATION} ; \ | |
045672f9 | 131 | fi |
5881cd60 | 132 | |
ff8ecdb8 | 133 | if [ ! -f $(DESTDIR)$(sysconfdir)/ssh_config -a ! -f $(DESTDIR)$(sysconfdir)/sshd_config ]; then \ |
134 | $(INSTALL) -d $(DESTDIR)$(sysconfdir); \ | |
135 | $(INSTALL) -m 644 ssh_config.out $(DESTDIR)$(sysconfdir)/ssh_config; \ | |
136 | $(INSTALL) -m 644 sshd_config.out $(DESTDIR)$(sysconfdir)/sshd_config; \ | |
af381f02 | 137 | fi |
138 | ||
8946db53 | 139 | uninstallall: uninstall |
ff8ecdb8 | 140 | -rm -f $(DESTDIR)$(sysconfdir)/ssh_config |
141 | -rm -f $(DESTDIR)$(sysconfdir)/sshd_config | |
142 | -rmdir $(DESTDIR)$(sysconfdir) | |
143 | -rmdir $(DESTDIR)$(bindir) | |
144 | -rmdir $(DESTDIR)$(sbindir) | |
145 | -rmdir $(DESTDIR)$(mandir)/$(mansubdir)1 | |
146 | -rmdir $(DESTDIR)$(mandir)/$(mansubdir)8 | |
147 | -rmdir $(DESTDIR)$(mandir) | |
148 | -rmdir $(DESTDIR)$(libexecdir) | |
8946db53 | 149 | |
150 | uninstall: | |
ff8ecdb8 | 151 | -rm -f $(DESTDIR)$(bindir)/ssh |
152 | -rm -f $(DESTDIR)$(bindir)/scp | |
153 | -rm -f $(DESTDIR)$(bindir)/ssh-add | |
154 | -rm -f $(DESTDIR)$(bindir)/ssh-agent | |
155 | -rm -f $(DESTDIR)$(bindir)/ssh-keygen | |
156 | -rm -f $(DESTDIR)$(sbindir)/sshd | |
157 | -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1 | |
158 | -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1 | |
159 | -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1 | |
160 | -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-agent.1 | |
161 | -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keygen.1 | |
162 | -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8 | |
163 | -rm -f $(DESTDIR)$(bindir)/slogin | |
164 | -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1 | |
165 | -rm -f $(DESTDIR)${ASKPASS_PROGRAM} | |
166 | -rmdir $(DESTDIR)$(libexecdir)/ssh ; |