2 exec_prefix=@exec_prefix@
5 libexecdir=@libexecdir@
7 sysconfdir=@sysconfdir@
10 top_srcdir = @top_srcdir@
13 SSH_PROGRAM=@bindir@/ssh
14 ASKPASS_LOCATION=@libexecdir@/ssh
15 ASKPASS_PROGRAM=$(ASKPASS_LOCATION)/ssh-askpass
16 FIXPATHS=@top_srcdir@/fixpaths
19 PATHS=-DETCDIR=\"$(sysconfdir)\" -DSSH_PROGRAM=\"$(SSH_PROGRAM)\" -DSSH_ASKPASS_DEFAULT=\"$(ASKPASS_PROGRAM)\"
20 CFLAGS=@CFLAGS@ $(PATHS) @DEFS@
21 EXTRA_TARGETS=@GNOME_ASKPASS@
22 TARGETS=libssh.a ssh sshd ssh-add ssh-keygen ssh-agent scp $(EXTRA_TARGETS)
30 GNOME_CFLAGS=`gnome-config --cflags gnome gnomeui`
31 GNOME_LIBS=`gnome-config --libs gnome gnomeui`
33 OBJS= atomicio.o authfd.o authfile.o auth-krb4.o auth-passwd.o \
34 auth-rhosts.o auth-rh-rsa.o auth-rsa.o auth-skey.o bsd-daemon.o \
35 bsd-login.o bsd-mktemp.o bsd-snprintf.o bsd-strlcat.o bsd-strlcpy.o \
36 bufaux.o buffer.o canohost.o channels.o cipher.o clientloop.o \
37 compress.o crc32.o deattack.o helper.o helper.o hostfile.o \
38 log-client.o login.o log-server.o match.o md5crypt.o mpaux.o \
39 packet.o pty.o radix.o readconf.o readpass.o rsa.o servconf.o \
40 serverloop.o sshconnect.o tildexpand.o ttymodes.o uidswap.o \
43 LIBOBJS= atomicio.o authfd.o authfile.o bsd-daemon.o bsd-mktemp.o \
44 bsd-snprintf.o bsd-strlcat.o bsd-strlcpy.o bufaux.o \
45 buffer.o canohost.o channels.o cipher.o compat.o \
46 compress.o crc32.o deattack.o fingerprint.o helper.o \
47 hostfile.o log.o match.o mpaux.o nchan.o packet.o \
48 radix.o readpass.o rsa.o tildexpand.o ttymodes.o uidswap.o \
51 all: $(OBJS) $(TARGETS) manpages
58 $(AR) rv $@ $(LIBOBJS)
61 ssh: ssh.o sshconnect.o log-client.o readconf.o clientloop.o libssh.a
62 $(CC) -o $@ ssh.o sshconnect.o log-client.o readconf.o \
63 clientloop.o $(LDFLAGS) -lssh $(LIBS)
65 sshd: sshd.o auth-rhosts.o auth-krb4.o auth-passwd.o auth-rsa.o \
66 auth-rh-rsa.o pty.o log-server.o login.o servconf.o serverloop.o \
67 bsd-login.o md5crypt.o libssh.a
68 $(CC) -o $@ sshd.o auth-rhosts.o auth-krb4.o auth-passwd.o \
69 auth-rsa.o auth-rh-rsa.o pty.o log-server.o login.o servconf.o \
70 serverloop.o bsd-login.o md5crypt.o $(LDFLAGS) -lssh $(LIBS) $(LIBWRAP)
73 $(CC) -o $@ scp.o $(LDFLAGS) -lssh $(LIBS)
75 ssh-add: ssh-add.o log-client.o libssh.a
76 $(CC) -o $@ ssh-add.o log-client.o $(LDFLAGS) -lssh $(LIBS)
78 ssh-agent: ssh-agent.o log-client.o libssh.a
79 $(CC) -o $@ ssh-agent.o log-client.o $(LDFLAGS) -lssh $(LIBS)
81 ssh-keygen: ssh-keygen.o log-client.o libssh.a
82 $(CC) -o $@ ssh-keygen.o log-client.o $(LDFLAGS) -lssh $(LIBS)
84 gnome-ssh-askpass: gnome-ssh-askpass.c
85 $(CC) $(CFLAGS) $(GNOME_CFLAGS) -o $@ gnome-ssh-askpass.c $(GNOME_LIBS)
88 rm -f $(OBJS) $(TARGETS) config.status config.cache config.log core \
89 *.1 *.8 sshd_config ssh_config
92 $(FIXPATHS) -Dsysconfdir=${sysconfdir} $(srcdir)/*.1.in $(srcdir)/*.8.in \
93 $(srcdir)/ssh_config.in $(srcdir)/sshd_config.in
96 $(INSTALL) -d $(bindir)
97 $(INSTALL) -d $(sbindir)
98 $(INSTALL) -d $(mandir)
99 $(INSTALL) -d $(mandir)/man1
100 $(INSTALL) -d $(mandir)/man8
101 $(INSTALL) -s ssh $(bindir)/ssh
102 $(INSTALL) -s scp $(bindir)/scp
103 $(INSTALL) -s ssh-add $(bindir)/ssh-add
104 $(INSTALL) -s ssh-agent $(bindir)/ssh-agent
105 $(INSTALL) -s ssh-keygen $(bindir)/ssh-keygen
106 $(INSTALL) -s sshd $(sbindir)/sshd
107 $(INSTALL) -m 644 ssh.1 $(mandir)/man1/ssh.1
108 $(INSTALL) -m 644 scp.1 $(mandir)/man1/scp.1
109 $(INSTALL) -m 644 ssh-add.1 $(mandir)/man1/ssh-add.1
110 $(INSTALL) -m 644 ssh-agent.1 $(mandir)/man1/ssh-agent.1
111 $(INSTALL) -m 644 ssh-keygen.1 $(mandir)/man1/ssh-keygen.1
112 $(INSTALL) -m 644 sshd.8 $(mandir)/man8/sshd.8
113 -rm -f $(bindir)/slogin
114 ln -s ssh $(bindir)/slogin
115 -rm -f $(mandir)/man1/slogin.1
116 ln -s ssh.1 $(mandir)/man1/slogin.1
118 if [ ! -z "@GNOME_ASKPASS@" ] ; then \
119 $(INSTALL) -d $(libexecdir) ; \
120 $(INSTALL) -d $(libexecdir)/ssh ; \
121 $(INSTALL) -s @GNOME_ASKPASS@ ${ASKPASS_LOCATION} ; \
124 if [ ! -f $(sysconfdir)/ssh_config -a ! -f $(sysconfdir)/sshd_config ]; then \
125 $(INSTALL) -d $(sysconfdir); \
126 $(INSTALL) -m 644 ssh_config $(sysconfdir)/ssh_config; \
127 $(INSTALL) -m 644 sshd_config $(sysconfdir)/sshd_config; \
130 uninstallall: uninstall
131 -rm -f $(sysconfdir)/ssh_config
132 -rm -f $(sysconfdir)/sshd_config
136 -rmdir $(mandir)/man1
137 -rmdir $(mandir)/man8
144 -rm -f $(bindir)/ssh-add
145 -rm -f $(bindir)/ssh-agent
146 -rm -f $(bindir)/ssh-keygen
147 -rm -f $(sbindir)/sshd
148 -rm -f $(mandir)/man1/ssh.1
149 -rm -f $(mandir)/man1/scp.1
150 -rm -f $(mandir)/man1/ssh-add.1
151 -rm -f $(mandir)/man1/ssh-agent.1
152 -rm -f $(mandir)/man1/ssh-keygen.1
153 -rm -f $(mandir)/man8/sshd.8
154 -rm -f $(bindir)/slogin
155 -rm -f $(mandir)/man1/slogin.1
156 -rm -f ${ASKPASS_PROGRAM}
157 -rmdir $(libexecdir)/ssh ;
160 rm -f Makefile config.h core *~
165 rm -f configure config.h.in