2 exec_prefix=@exec_prefix@
5 libexecdir=@libexecdir@
7 sysconfdir=@sysconfdir@
10 top_srcdir=@top_srcdir@
14 SSH_PROGRAM=@bindir@/ssh
15 ASKPASS_LOCATION=@libexecdir@/ssh
16 ASKPASS_PROGRAM=$(ASKPASS_LOCATION)/ssh-askpass
19 PATHS=-DETCDIR=\"$(sysconfdir)\" -DSSH_PROGRAM=\"$(SSH_PROGRAM)\" -DSSH_ASKPASS_DEFAULT=\"$(ASKPASS_PROGRAM)\"
20 CFLAGS=@CFLAGS@ $(PATHS) @DEFS@
21 EXTRA_TARGETS=@GNOME_ASKPASS@
27 FIXPATHS=$(PERL) @top_srcdir@/fixpaths -Dsysconfdir=${sysconfdir} -Dpiddir=${piddir}
30 GNOME_CFLAGS=`gnome-config --cflags gnome gnomeui`
31 GNOME_LIBS=`gnome-config --libs gnome gnomeui`
33 TARGETS=ssh sshd ssh-add ssh-keygen ssh-agent scp $(EXTRA_TARGETS)
35 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
37 SSHOBJS= ssh.o sshconnect.o log-client.o readconf.o clientloop.o
39 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
41 MANPAGES=scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh.1 sshd.8
43 CONFIGFILES=sshd_config ssh_config
45 all: $(TARGETS) $(MANPAGES) $(CONFIGFILES)
50 $(AR) rv $@ $(LIBOBJS)
53 ssh: libssh.a $(SSHOBJS)
54 $(CC) -o $@ $(SSHOBJS) $(LDFLAGS) -lssh $(LIBS)
56 sshd: libssh.a $(SSHDOBJS)
57 $(CC) -o $@ $(SSHDOBJS) $(LDFLAGS) -lssh $(LIBS)
60 $(CC) -o $@ scp.o $(LDFLAGS) -lssh $(LIBS)
62 ssh-add: libssh.a ssh-add.o log-client.o
63 $(CC) -o $@ ssh-add.o log-client.o $(LDFLAGS) -lssh $(LIBS)
65 ssh-agent: libssh.a ssh-agent.o log-client.o
66 $(CC) -o $@ ssh-agent.o log-client.o $(LDFLAGS) -lssh $(LIBS)
68 ssh-keygen: libssh.a ssh-keygen.o log-client.o
69 $(CC) -o $@ ssh-keygen.o log-client.o $(LDFLAGS) -lssh $(LIBS)
71 gnome-ssh-askpass: gnome-ssh-askpass.c
72 $(CC) $(CFLAGS) $(GNOME_CFLAGS) -o $@ gnome-ssh-askpass.c $(GNOME_LIBS)
75 $(FIXPATHS) $(srcdir)/scp.1.in
77 ssh-add.1: ssh-add.1.in
78 $(FIXPATHS) ssh-add.1.in
80 ssh-agent.1: ssh-agent.1.in
81 $(FIXPATHS) ssh-agent.1.in
83 ssh-keygen.1: ssh-keygen.1.in
84 $(FIXPATHS) ssh-keygen.1.in
92 sshd_config: sshd_config.in
93 $(FIXPATHS) sshd_config.in
95 ssh_config: ssh_config.in
96 $(FIXPATHS) ssh_config.in
99 rm -f *.o *.a $(TARGETS) config.status config.cache config.log
100 rm -f core *.1 *.8 sshd_config ssh_config
103 rm -f Makefile config.h core *~
108 rm -f configure config.h.in
111 $(INSTALL) -d $(bindir)
112 $(INSTALL) -d $(sbindir)
113 $(INSTALL) -d $(mandir)
114 $(INSTALL) -d $(mandir)/man1
115 $(INSTALL) -d $(mandir)/man8
116 $(INSTALL) -s ssh $(bindir)/ssh
117 $(INSTALL) -s scp $(bindir)/scp
118 $(INSTALL) -s ssh-add $(bindir)/ssh-add
119 $(INSTALL) -s ssh-agent $(bindir)/ssh-agent
120 $(INSTALL) -s ssh-keygen $(bindir)/ssh-keygen
121 $(INSTALL) -s sshd $(sbindir)/sshd
122 $(INSTALL) -m 644 ssh.1 $(mandir)/man1/ssh.1
123 $(INSTALL) -m 644 scp.1 $(mandir)/man1/scp.1
124 $(INSTALL) -m 644 ssh-add.1 $(mandir)/man1/ssh-add.1
125 $(INSTALL) -m 644 ssh-agent.1 $(mandir)/man1/ssh-agent.1
126 $(INSTALL) -m 644 ssh-keygen.1 $(mandir)/man1/ssh-keygen.1
127 $(INSTALL) -m 644 sshd.8 $(mandir)/man8/sshd.8
128 -rm -f $(bindir)/slogin
129 ln -s ssh $(bindir)/slogin
130 -rm -f $(mandir)/man1/slogin.1
131 ln -s ssh.1 $(mandir)/man1/slogin.1
133 if [ ! -z "@GNOME_ASKPASS@" ] ; then \
134 $(INSTALL) -d $(libexecdir) ; \
135 $(INSTALL) -d $(libexecdir)/ssh ; \
136 $(INSTALL) -s @GNOME_ASKPASS@ ${ASKPASS_LOCATION} ; \
139 if [ ! -f $(sysconfdir)/ssh_config -a ! -f $(sysconfdir)/sshd_config ]; then \
140 $(INSTALL) -d $(sysconfdir); \
141 $(INSTALL) -m 644 ssh_config $(sysconfdir)/ssh_config; \
142 $(INSTALL) -m 644 sshd_config $(sysconfdir)/sshd_config; \
145 uninstallall: uninstall
146 -rm -f $(sysconfdir)/ssh_config
147 -rm -f $(sysconfdir)/sshd_config
151 -rmdir $(mandir)/man1
152 -rmdir $(mandir)/man8
159 -rm -f $(bindir)/ssh-add
160 -rm -f $(bindir)/ssh-agent
161 -rm -f $(bindir)/ssh-keygen
162 -rm -f $(sbindir)/sshd
163 -rm -f $(mandir)/man1/ssh.1
164 -rm -f $(mandir)/man1/scp.1
165 -rm -f $(mandir)/man1/ssh-add.1
166 -rm -f $(mandir)/man1/ssh-agent.1
167 -rm -f $(mandir)/man1/ssh-keygen.1
168 -rm -f $(mandir)/man8/sshd.8
169 -rm -f $(bindir)/slogin
170 -rm -f $(mandir)/man1/slogin.1
171 -rm -f ${ASKPASS_PROGRAM}
172 -rmdir $(libexecdir)/ssh ;
177 for x in $(MANPAGES) ; do man ./$${x}.in > catman/$${x}.in ; done