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