2 exec_prefix=@exec_prefix@
5 libexecdir=@libexecdir@
7 sysconfdir=@sysconfdir@
9 SSH_PROGRAM=@bindir@/ssh
10 ASKPASS_LOCATION=@libexecdir@/ssh
11 ASKPASS_PROGRAM=$(ASKPASS_LOCATION)/ssh-askpass
14 PATHS=-DETCDIR=\"$(sysconfdir)\" -DSSH_PROGRAM=\"$(SSH_PROGRAM)\" -DSSH_ASKPASS_DEFAULT=\"$(ASKPASS_PROGRAM)\"
15 CFLAGS=@CFLAGS@ $(PATHS) @DEFS@
16 EXTRA_TARGETS=@GNOME_ASKPASS@
17 TARGETS=libssh.a ssh sshd ssh-add ssh-keygen ssh-agent scp $(EXTRA_TARGETS)
25 GNOME_CFLAGS=`gnome-config --cflags gnome gnomeui`
26 GNOME_LIBS=`gnome-config --libs gnome gnomeui`
28 OBJS= atomicio.o authfd.o authfile.o auth-krb4.o auth-passwd.o \
29 auth-rhosts.o auth-rh-rsa.o auth-rsa.o auth-skey.o bsd-daemon.o \
30 bsd-login.o bsd-mktemp.o bsd-snprintf.o bsd-strlcat.o bsd-strlcpy.o \
31 bufaux.o buffer.o canohost.o channels.o cipher.o clientloop.o \
32 compress.o crc32.o deattack.o helper.o helper.o hostfile.o \
33 log-client.o login.o log-server.o match.o md5crypt.o mpaux.o \
34 packet.o pty.o radix.o readconf.o readpass.o rsa.o servconf.o \
35 serverloop.o sshconnect.o tildexpand.o ttymodes.o uidswap.o \
38 LIBOBJS= atomicio.o authfd.o authfile.o bsd-daemon.o bsd-mktemp.o \
39 bsd-snprintf.o bsd-strlcat.o bsd-strlcpy.o bufaux.o \
40 buffer.o canohost.o channels.o cipher.o compat.o \
41 compress.o crc32.o deattack.o fingerprint.o helper.o \
42 hostfile.o log.o match.o mpaux.o nchan.o packet.o \
43 radix.o readpass.o rsa.o tildexpand.o ttymodes.o uidswap.o \
46 all: $(OBJS) $(TARGETS)
53 $(AR) rv $@ $(LIBOBJS)
56 ssh: ssh.o sshconnect.o log-client.o readconf.o clientloop.o libssh.a
57 $(CC) -o $@ ssh.o sshconnect.o log-client.o readconf.o \
58 clientloop.o $(LDFLAGS) -lssh $(LIBS)
60 sshd: sshd.o auth-rhosts.o auth-krb4.o auth-passwd.o auth-rsa.o \
61 auth-rh-rsa.o pty.o log-server.o login.o servconf.o serverloop.o \
62 bsd-login.o md5crypt.o libssh.a
63 $(CC) -o $@ sshd.o auth-rhosts.o auth-krb4.o auth-passwd.o \
64 auth-rsa.o auth-rh-rsa.o pty.o log-server.o login.o servconf.o \
65 serverloop.o bsd-login.o md5crypt.o $(LDFLAGS) -lssh $(LIBS) $(LIBWRAP)
68 $(CC) -o $@ scp.o $(LDFLAGS) -lssh $(LIBS)
70 ssh-add: ssh-add.o log-client.o libssh.a
71 $(CC) -o $@ ssh-add.o log-client.o $(LDFLAGS) -lssh $(LIBS)
73 ssh-agent: ssh-agent.o log-client.o libssh.a
74 $(CC) -o $@ ssh-agent.o log-client.o $(LDFLAGS) -lssh $(LIBS)
76 ssh-keygen: ssh-keygen.o log-client.o libssh.a
77 $(CC) -o $@ ssh-keygen.o log-client.o $(LDFLAGS) -lssh $(LIBS)
79 gnome-ssh-askpass: gnome-ssh-askpass.c
80 $(CC) $(CFLAGS) $(GNOME_CFLAGS) -o $@ gnome-ssh-askpass.c $(GNOME_LIBS)
83 rm -f *.o core $(TARGETS) config.status config.cache config.log
86 $(INSTALL) -d $(bindir)
87 $(INSTALL) -d $(sbindir)
88 $(INSTALL) -d $(mandir)
89 $(INSTALL) -d $(mandir)/man1
90 $(INSTALL) -d $(mandir)/man8
91 $(INSTALL) -s ssh $(bindir)/ssh
92 $(INSTALL) -s scp $(bindir)/scp
93 $(INSTALL) -s ssh-add $(bindir)/ssh-add
94 $(INSTALL) -s ssh-agent $(bindir)/ssh-agent
95 $(INSTALL) -s ssh-keygen $(bindir)/ssh-keygen
96 $(INSTALL) -s sshd $(sbindir)/sshd
97 $(INSTALL) -m 644 ssh.1 $(mandir)/man1/ssh.1
98 $(INSTALL) -m 644 scp.1 $(mandir)/man1/scp.1
99 $(INSTALL) -m 644 ssh-add.1 $(mandir)/man1/ssh-add.1
100 $(INSTALL) -m 644 ssh-agent.1 $(mandir)/man1/ssh-agent.1
101 $(INSTALL) -m 644 ssh-keygen.1 $(mandir)/man1/ssh-keygen.1
102 $(INSTALL) -m 644 sshd.8 $(mandir)/man8/sshd.8
103 -rm -f $(bindir)/slogin
104 ln -s ssh $(bindir)/slogin
105 -rm -f $(mandir)/man1/slogin.1
106 ln -s ssh.1 $(mandir)/man1/slogin.1
108 if [ ! -z "@GNOME_ASKPASS@" ] ; then \
109 $(INSTALL) -d $(libexecdir) ; \
110 $(INSTALL) -d $(libexecdir)/ssh ; \
111 $(INSTALL) -s @GNOME_ASKPASS@ ${ASKPASS_LOCATION} ; \
114 if [ ! -f $(sysconfdir)/ssh_config -a ! -f $(sysconfdir)/sshd_config ]; then \
115 $(INSTALL) -d $(sysconfdir); \
116 $(INSTALL) -m 644 ssh_config $(sysconfdir)/ssh_config; \
117 $(INSTALL) -m 644 sshd_config $(sysconfdir)/sshd_config; \
120 uninstallall: uninstall
121 -rm -f $(sysconfdir)/ssh_config
122 -rm -f $(sysconfdir)/sshd_config
126 -rmdir $(mandir)/man1
127 -rmdir $(mandir)/man8
134 -rm -f $(bindir)/ssh-add
135 -rm -f $(bindir)/ssh-agent
136 -rm -f $(bindir)/ssh-keygen
137 -rm -f $(sbindir)/sshd
138 -rm -f $(mandir)/man1/ssh.1
139 -rm -f $(mandir)/man1/scp.1
140 -rm -f $(mandir)/man1/ssh-add.1
141 -rm -f $(mandir)/man1/ssh-agent.1
142 -rm -f $(mandir)/man1/ssh-keygen.1
143 -rm -f $(mandir)/man8/sshd.8
144 -rm -f $(bindir)/slogin
145 -rm -f $(mandir)/man1/slogin.1
146 -rm -f ${ASKPASS_PROGRAM}
147 -rmdir $(libexecdir)/ssh ;
150 rm -f Makefile config.h core *~
155 rm -f configure config.h.in