]>
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 |
bc7ea646 | 10 | ASKPASS_LOCATION=@libexecdir@/ssh |
11 | ASKPASS_PROGRAM=$(ASKPASS_LOCATION)/ssh-askpass | |
d4f11b59 | 12 | |
5881cd60 | 13 | CC=@CC@ |
db28aeb5 | 14 | PATHS=-DETCDIR=\"$(sysconfdir)\" -DSSH_PROGRAM=\"$(SSH_PROGRAM)\" -DSSH_ASKPASS_DEFAULT=\"$(ASKPASS_PROGRAM)\" |
d4f11b59 | 15 | CFLAGS=@CFLAGS@ $(PATHS) @DEFS@ |
6a0aeebc | 16 | EXTRA_TARGETS=@GNOME_ASKPASS@ |
17 | TARGETS=libssh.a ssh sshd ssh-add ssh-keygen ssh-agent scp $(EXTRA_TARGETS) | |
17f0f4a7 | 18 | LIBS=@LIBS@ |
87e91331 | 19 | LIBWRAP=@LIBWRAP@ |
5881cd60 | 20 | AR=@AR@ |
21 | RANLIB=@RANLIB@ | |
cf8dd513 | 22 | INSTALL=@INSTALL@ |
6cfb695b | 23 | LDFLAGS=-L. @LDFLAGS@ |
5881cd60 | 24 | |
17f0f4a7 | 25 | GNOME_CFLAGS=`gnome-config --cflags gnome gnomeui` |
26 | GNOME_LIBS=`gnome-config --libs gnome gnomeui` | |
27 | ||
847e8865 | 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 \ | |
884bcb37 | 30 | bsd-login.o bsd-mktemp.o bsd-snprintf.o bsd-strlcat.o bsd-strlcpy.o \ |
847e8865 | 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 \ | |
36 | xmalloc.o | |
5881cd60 | 37 | |
6cfb695b | 38 | LIBOBJS= atomicio.o authfd.o authfile.o bsd-daemon.o bsd-mktemp.o \ |
a408af76 | 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 \ | |
847e8865 | 43 | radix.o readpass.o rsa.o tildexpand.o ttymodes.o uidswap.o \ |
44 | xmalloc.o | |
6cfb695b | 45 | |
46 | all: $(OBJS) $(TARGETS) | |
47 | ||
f74efc8d | 48 | $(OBJS): config.h |
49 | ||
50 | $(LIBOBJS): config.h | |
51 | ||
6cfb695b | 52 | libssh.a: $(LIBOBJS) |
53 | $(AR) rv $@ $(LIBOBJS) | |
5881cd60 | 54 | $(RANLIB) $@ |
55 | ||
17f0f4a7 | 56 | ssh: ssh.o sshconnect.o log-client.o readconf.o clientloop.o libssh.a |
6cfb695b | 57 | $(CC) -o $@ ssh.o sshconnect.o log-client.o readconf.o \ |
58 | clientloop.o $(LDFLAGS) -lssh $(LIBS) | |
5881cd60 | 59 | |
847e8865 | 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 | |
6cfb695b | 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) | |
5881cd60 | 66 | |
17f0f4a7 | 67 | scp: scp.o libssh.a |
6cfb695b | 68 | $(CC) -o $@ scp.o $(LDFLAGS) -lssh $(LIBS) |
5881cd60 | 69 | |
17f0f4a7 | 70 | ssh-add: ssh-add.o log-client.o libssh.a |
6cfb695b | 71 | $(CC) -o $@ ssh-add.o log-client.o $(LDFLAGS) -lssh $(LIBS) |
5881cd60 | 72 | |
17f0f4a7 | 73 | ssh-agent: ssh-agent.o log-client.o libssh.a |
6cfb695b | 74 | $(CC) -o $@ ssh-agent.o log-client.o $(LDFLAGS) -lssh $(LIBS) |
5881cd60 | 75 | |
17f0f4a7 | 76 | ssh-keygen: ssh-keygen.o log-client.o libssh.a |
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 | ||
5881cd60 | 82 | clean: |
e8162ec0 | 83 | rm -f *.o core $(TARGETS) config.status config.cache config.log |
e1a9c08d | 84 | |
df16c1f2 | 85 | install: all |
cf8dd513 | 86 | $(INSTALL) -d $(bindir) |
87 | $(INSTALL) -d $(sbindir) | |
88 | $(INSTALL) -d $(mandir) | |
89 | $(INSTALL) -d $(mandir)/man1 | |
90 | $(INSTALL) -d $(mandir)/man8 | |
d8b40f88 | 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 | |
847e8865 | 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 | |
c6aeb966 | 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 | |
045672f9 | 107 | |
a2b62424 | 108 | if [ ! -z "@GNOME_ASKPASS@" ] ; then \ |
5ee321fc | 109 | $(INSTALL) -d $(libexecdir) ; \ |
110 | $(INSTALL) -d $(libexecdir)/ssh ; \ | |
bc7ea646 | 111 | $(INSTALL) -s @GNOME_ASKPASS@ ${ASKPASS_LOCATION} ; \ |
045672f9 | 112 | fi |
5881cd60 | 113 | |
af381f02 | 114 | if [ ! -f $(sysconfdir)/ssh_config -a ! -f $(sysconfdir)/sshd_config ]; then \ |
cf8dd513 | 115 | $(INSTALL) -d $(sysconfdir); \ |
847e8865 | 116 | $(INSTALL) -m 644 ssh_config $(sysconfdir)/ssh_config; \ |
117 | $(INSTALL) -m 644 sshd_config $(sysconfdir)/sshd_config; \ | |
af381f02 | 118 | fi |
119 | ||
8946db53 | 120 | uninstallall: uninstall |
121 | -rm -f $(sysconfdir)/ssh_config | |
122 | -rm -f $(sysconfdir)/sshd_config | |
123 | -rmdir $(sysconfdir) | |
124 | -rmdir $(bindir) | |
125 | -rmdir $(sbindir) | |
126 | -rmdir $(mandir)/man1 | |
127 | -rmdir $(mandir)/man8 | |
128 | -rmdir $(mandir) | |
129 | -rmdir $(libexecdir) | |
130 | ||
131 | uninstall: | |
132 | -rm -f $(bindir)/ssh | |
133 | -rm -f $(bindir)/scp | |
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 | |
8946db53 | 146 | -rm -f ${ASKPASS_PROGRAM} |
147 | -rmdir $(libexecdir)/ssh ; | |
148 | ||
5881cd60 | 149 | distclean: clean |
e1a9c08d | 150 | rm -f Makefile config.h core *~ |
5881cd60 | 151 | |
152 | mrproper: distclean | |
e1a9c08d | 153 | |
154 | veryclean: distclean | |
d4f11b59 | 155 | rm -f configure config.h.in |
156 |