]>
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@ |
af381f02 | 7 | sysconfdir=@sysconfdir@ |
5881cd60 | 8 | |
d4f11b59 | 9 | SSH_PROGRAM=@bindir@/ssh |
736890c4 | 10 | ASKPASS_PROGRAM=@libexecdir@/ssh/ssh-askpass |
d4f11b59 | 11 | |
5881cd60 | 12 | CC=@CC@ |
db28aeb5 | 13 | PATHS=-DETCDIR=\"$(sysconfdir)\" -DSSH_PROGRAM=\"$(SSH_PROGRAM)\" -DSSH_ASKPASS_DEFAULT=\"$(ASKPASS_PROGRAM)\" |
d4f11b59 | 14 | CFLAGS=@CFLAGS@ $(PATHS) @DEFS@ |
6a0aeebc | 15 | EXTRA_TARGETS=@GNOME_ASKPASS@ |
16 | TARGETS=libssh.a ssh sshd ssh-add ssh-keygen ssh-agent scp $(EXTRA_TARGETS) | |
17f0f4a7 | 17 | LIBS=@LIBS@ |
87e91331 | 18 | LIBWRAP=@LIBWRAP@ |
5881cd60 | 19 | AR=@AR@ |
20 | RANLIB=@RANLIB@ | |
cf8dd513 | 21 | INSTALL=@INSTALL@ |
6cfb695b | 22 | LDFLAGS=-L. @LDFLAGS@ |
5881cd60 | 23 | |
17f0f4a7 | 24 | GNOME_CFLAGS=`gnome-config --cflags gnome gnomeui` |
25 | GNOME_LIBS=`gnome-config --libs gnome gnomeui` | |
26 | ||
847e8865 | 27 | OBJS= atomicio.o authfd.o authfile.o auth-krb4.o auth-passwd.o \ |
28 | auth-rhosts.o auth-rh-rsa.o auth-rsa.o auth-skey.o bsd-daemon.o \ | |
884bcb37 | 29 | bsd-login.o bsd-mktemp.o bsd-snprintf.o bsd-strlcat.o bsd-strlcpy.o \ |
847e8865 | 30 | bufaux.o buffer.o canohost.o channels.o cipher.o clientloop.o \ |
31 | compress.o crc32.o deattack.o helper.o helper.o hostfile.o \ | |
32 | log-client.o login.o log-server.o match.o md5crypt.o mpaux.o \ | |
33 | packet.o pty.o radix.o readconf.o readpass.o rsa.o servconf.o \ | |
34 | serverloop.o sshconnect.o tildexpand.o ttymodes.o uidswap.o \ | |
35 | xmalloc.o | |
5881cd60 | 36 | |
6cfb695b | 37 | LIBOBJS= atomicio.o authfd.o authfile.o bsd-daemon.o bsd-mktemp.o \ |
a408af76 | 38 | bsd-snprintf.o bsd-strlcat.o bsd-strlcpy.o bufaux.o \ |
39 | buffer.o canohost.o channels.o cipher.o compat.o \ | |
40 | compress.o crc32.o deattack.o fingerprint.o helper.o \ | |
41 | hostfile.o log.o match.o mpaux.o nchan.o packet.o \ | |
847e8865 | 42 | radix.o readpass.o rsa.o tildexpand.o ttymodes.o uidswap.o \ |
43 | xmalloc.o | |
6cfb695b | 44 | |
45 | all: $(OBJS) $(TARGETS) | |
46 | ||
f74efc8d | 47 | $(OBJS): config.h |
48 | ||
49 | $(LIBOBJS): config.h | |
50 | ||
6cfb695b | 51 | libssh.a: $(LIBOBJS) |
52 | $(AR) rv $@ $(LIBOBJS) | |
5881cd60 | 53 | $(RANLIB) $@ |
54 | ||
17f0f4a7 | 55 | ssh: ssh.o sshconnect.o log-client.o readconf.o clientloop.o libssh.a |
6cfb695b | 56 | $(CC) -o $@ ssh.o sshconnect.o log-client.o readconf.o \ |
57 | clientloop.o $(LDFLAGS) -lssh $(LIBS) | |
5881cd60 | 58 | |
847e8865 | 59 | sshd: sshd.o auth-rhosts.o auth-krb4.o auth-passwd.o auth-rsa.o \ |
60 | auth-rh-rsa.o pty.o log-server.o login.o servconf.o serverloop.o \ | |
61 | bsd-login.o md5crypt.o libssh.a | |
6cfb695b | 62 | $(CC) -o $@ sshd.o auth-rhosts.o auth-krb4.o auth-passwd.o \ |
63 | auth-rsa.o auth-rh-rsa.o pty.o log-server.o login.o servconf.o \ | |
64 | serverloop.o bsd-login.o md5crypt.o $(LDFLAGS) -lssh $(LIBS) $(LIBWRAP) | |
5881cd60 | 65 | |
17f0f4a7 | 66 | scp: scp.o libssh.a |
6cfb695b | 67 | $(CC) -o $@ scp.o $(LDFLAGS) -lssh $(LIBS) |
5881cd60 | 68 | |
17f0f4a7 | 69 | ssh-add: ssh-add.o log-client.o libssh.a |
6cfb695b | 70 | $(CC) -o $@ ssh-add.o log-client.o $(LDFLAGS) -lssh $(LIBS) |
5881cd60 | 71 | |
17f0f4a7 | 72 | ssh-agent: ssh-agent.o log-client.o libssh.a |
6cfb695b | 73 | $(CC) -o $@ ssh-agent.o log-client.o $(LDFLAGS) -lssh $(LIBS) |
5881cd60 | 74 | |
17f0f4a7 | 75 | ssh-keygen: ssh-keygen.o log-client.o libssh.a |
6cfb695b | 76 | $(CC) -o $@ ssh-keygen.o log-client.o $(LDFLAGS) -lssh $(LIBS) |
5881cd60 | 77 | |
17f0f4a7 | 78 | gnome-ssh-askpass: gnome-ssh-askpass.c |
79 | $(CC) $(CFLAGS) $(GNOME_CFLAGS) -o $@ gnome-ssh-askpass.c $(GNOME_LIBS) | |
80 | ||
5881cd60 | 81 | clean: |
e8162ec0 | 82 | rm -f *.o core $(TARGETS) config.status config.cache config.log |
e1a9c08d | 83 | |
df16c1f2 | 84 | install: all |
cf8dd513 | 85 | $(INSTALL) -d $(bindir) |
86 | $(INSTALL) -d $(sbindir) | |
87 | $(INSTALL) -d $(mandir) | |
88 | $(INSTALL) -d $(mandir)/man1 | |
89 | $(INSTALL) -d $(mandir)/man8 | |
d8b40f88 | 90 | $(INSTALL) -s ssh $(bindir)/ssh |
91 | $(INSTALL) -s scp $(bindir)/scp | |
92 | $(INSTALL) -s ssh-add $(bindir)/ssh-add | |
93 | $(INSTALL) -s ssh-agent $(bindir)/ssh-agent | |
94 | $(INSTALL) -s ssh-keygen $(bindir)/ssh-keygen | |
95 | $(INSTALL) -s sshd $(sbindir)/sshd | |
847e8865 | 96 | $(INSTALL) -m 644 ssh.1 $(mandir)/man1/ssh.1 |
97 | $(INSTALL) -m 644 scp.1 $(mandir)/man1/scp.1 | |
98 | $(INSTALL) -m 644 ssh-add.1 $(mandir)/man1/ssh-add.1 | |
99 | $(INSTALL) -m 644 ssh-agent.1 $(mandir)/man1/ssh-agent.1 | |
100 | $(INSTALL) -m 644 ssh-keygen.1 $(mandir)/man1/ssh-keygen.1 | |
101 | $(INSTALL) -m 644 sshd.8 $(mandir)/man8/sshd.8 | |
c6aeb966 | 102 | -rm -f $(bindir)/slogin |
103 | ln -s ssh $(bindir)/slogin | |
104 | -rm -f $(mandir)/man1/slogin.1 | |
105 | ln -s ssh.1 $(mandir)/man1/slogin.1 | |
045672f9 | 106 | |
a2b62424 | 107 | if [ ! -z "@GNOME_ASKPASS@" ] ; then \ |
5ee321fc | 108 | $(INSTALL) -d $(libexecdir) ; \ |
109 | $(INSTALL) -d $(libexecdir)/ssh ; \ | |
d8b40f88 | 110 | $(INSTALL) -s @GNOME_ASKPASS@ ${ASKPASS_PROGRAM} ; \ |
045672f9 | 111 | fi |
5881cd60 | 112 | |
af381f02 | 113 | if [ ! -f $(sysconfdir)/ssh_config -a ! -f $(sysconfdir)/sshd_config ]; then \ |
cf8dd513 | 114 | $(INSTALL) -d $(sysconfdir); \ |
847e8865 | 115 | $(INSTALL) -m 644 ssh_config $(sysconfdir)/ssh_config; \ |
116 | $(INSTALL) -m 644 sshd_config $(sysconfdir)/sshd_config; \ | |
af381f02 | 117 | fi |
118 | ||
8946db53 | 119 | uninstallall: uninstall |
120 | -rm -f $(sysconfdir)/ssh_config | |
121 | -rm -f $(sysconfdir)/sshd_config | |
122 | -rmdir $(sysconfdir) | |
123 | -rmdir $(bindir) | |
124 | -rmdir $(sbindir) | |
125 | -rmdir $(mandir)/man1 | |
126 | -rmdir $(mandir)/man8 | |
127 | -rmdir $(mandir) | |
128 | -rmdir $(libexecdir) | |
129 | ||
130 | uninstall: | |
131 | -rm -f $(bindir)/ssh | |
132 | -rm -f $(bindir)/scp | |
133 | -rm -f $(bindir)/ssh-add | |
134 | -rm -f $(bindir)/ssh-agent | |
135 | -rm -f $(bindir)/ssh-keygen | |
136 | -rm -f $(sbindir)/sshd | |
137 | -rm -f $(mandir)/man1/ssh.1 | |
138 | -rm -f $(mandir)/man1/scp.1 | |
139 | -rm -f $(mandir)/man1/ssh-add.1 | |
140 | -rm -f $(mandir)/man1/ssh-agent.1 | |
141 | -rm -f $(mandir)/man1/ssh-keygen.1 | |
142 | -rm -f $(mandir)/man8/sshd.8 | |
143 | -rm -f $(bindir)/slogin | |
144 | -rm -f $(mandir)/man1/slogin.1 | |
8946db53 | 145 | -rm -f ${ASKPASS_PROGRAM} |
146 | -rmdir $(libexecdir)/ssh ; | |
147 | ||
5881cd60 | 148 | distclean: clean |
e1a9c08d | 149 | rm -f Makefile config.h core *~ |
5881cd60 | 150 | |
151 | mrproper: distclean | |
e1a9c08d | 152 | |
153 | veryclean: distclean | |
d4f11b59 | 154 | rm -f configure config.h.in |
155 |