Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 1 | prefix=@prefix@ |
| 2 | exec_prefix=@exec_prefix@ |
| 3 | bindir=@bindir@ |
| 4 | sbindir=@sbindir@ |
Damien Miller | e232455 | 1999-11-19 17:18:57 +1100 | [diff] [blame] | 5 | libexecdir=@libexecdir@ |
Damien Miller | 9438816 | 1999-10-29 09:57:31 +1000 | [diff] [blame] | 6 | mandir=@mandir@ |
Damien Miller | 296a546 | 1999-11-13 10:48:51 +1100 | [diff] [blame] | 7 | sysconfdir=@sysconfdir@ |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 8 | |
Damien Miller | c7b38ce | 1999-11-09 10:28:04 +1100 | [diff] [blame] | 9 | SSH_PROGRAM=@bindir@/ssh |
Damien Miller | 18ac171 | 1999-11-19 12:43:19 +1100 | [diff] [blame] | 10 | ASKPASS_PROGRAM=@libexecdir@/ssh/ssh-askpass |
Damien Miller | c7b38ce | 1999-11-09 10:28:04 +1100 | [diff] [blame] | 11 | |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 12 | CC=@CC@ |
Damien Miller | 3bc14dd | 1999-12-07 14:54:53 +1100 | [diff] [blame] | 13 | PATHS=-DETCDIR=\"$(sysconfdir)\" -DSSH_PROGRAM=\"$(SSH_PROGRAM)\" -DSSH_ASKPASS_DEFAULT=\"$(ASKPASS_PROGRAM)\" |
Damien Miller | c7b38ce | 1999-11-09 10:28:04 +1100 | [diff] [blame] | 14 | CFLAGS=@CFLAGS@ $(PATHS) @DEFS@ |
Damien Miller | e0d444c | 1999-11-09 14:23:45 +1100 | [diff] [blame] | 15 | EXTRA_TARGETS=@GNOME_ASKPASS@ |
| 16 | TARGETS=libssh.a ssh sshd ssh-add ssh-keygen ssh-agent scp $(EXTRA_TARGETS) |
Damien Miller | d3dcfaf | 1999-11-09 13:52:33 +1100 | [diff] [blame] | 17 | LIBS=@LIBS@ |
Damien Miller | d7f6615 | 1999-12-09 10:48:58 +1100 | [diff] [blame] | 18 | LIBWRAP=@LIBWRAP@ |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 19 | AR=@AR@ |
| 20 | RANLIB=@RANLIB@ |
Damien Miller | d8087f6 | 1999-11-25 12:31:26 +1100 | [diff] [blame] | 21 | INSTALL=@INSTALL@ |
Damien Miller | 18ccf85 | 1999-12-16 13:06:18 +1100 | [diff] [blame] | 22 | LDFLAGS=-L. @LDFLAGS@ |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 23 | |
Damien Miller | d3dcfaf | 1999-11-09 13:52:33 +1100 | [diff] [blame] | 24 | GNOME_CFLAGS=`gnome-config --cflags gnome gnomeui` |
| 25 | GNOME_LIBS=`gnome-config --libs gnome gnomeui` |
| 26 | |
Damien Miller | c6b3bbe | 1999-12-13 08:27:33 +1100 | [diff] [blame] | 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 \ |
Damien Miller | 36b339a | 1999-12-14 10:54:47 +1100 | [diff] [blame] | 29 | bsd-login.o bsd-mktemp.o bsd-snprintf.o bsd-strlcat.o bsd-strlcpy.o \ |
Damien Miller | c6b3bbe | 1999-12-13 08:27:33 +1100 | [diff] [blame] | 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 |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 36 | |
Damien Miller | 18ccf85 | 1999-12-16 13:06:18 +1100 | [diff] [blame] | 37 | LIBOBJS= atomicio.o authfd.o authfile.o bsd-daemon.o bsd-mktemp.o \ |
Damien Miller | 037a0dc | 1999-12-07 15:38:31 +1100 | [diff] [blame] | 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 \ |
Damien Miller | c6b3bbe | 1999-12-13 08:27:33 +1100 | [diff] [blame] | 42 | radix.o readpass.o rsa.o tildexpand.o ttymodes.o uidswap.o \ |
| 43 | xmalloc.o |
Damien Miller | 18ccf85 | 1999-12-16 13:06:18 +1100 | [diff] [blame] | 44 | |
| 45 | all: $(OBJS) $(TARGETS) |
| 46 | |
| 47 | libssh.a: $(LIBOBJS) |
| 48 | $(AR) rv $@ $(LIBOBJS) |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 49 | $(RANLIB) $@ |
| 50 | |
Damien Miller | d3dcfaf | 1999-11-09 13:52:33 +1100 | [diff] [blame] | 51 | ssh: ssh.o sshconnect.o log-client.o readconf.o clientloop.o libssh.a |
Damien Miller | 18ccf85 | 1999-12-16 13:06:18 +1100 | [diff] [blame] | 52 | $(CC) -o $@ ssh.o sshconnect.o log-client.o readconf.o \ |
| 53 | clientloop.o $(LDFLAGS) -lssh $(LIBS) |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 54 | |
Damien Miller | c6b3bbe | 1999-12-13 08:27:33 +1100 | [diff] [blame] | 55 | sshd: sshd.o auth-rhosts.o auth-krb4.o auth-passwd.o auth-rsa.o \ |
| 56 | auth-rh-rsa.o pty.o log-server.o login.o servconf.o serverloop.o \ |
| 57 | bsd-login.o md5crypt.o libssh.a |
Damien Miller | 18ccf85 | 1999-12-16 13:06:18 +1100 | [diff] [blame] | 58 | $(CC) -o $@ sshd.o auth-rhosts.o auth-krb4.o auth-passwd.o \ |
| 59 | auth-rsa.o auth-rh-rsa.o pty.o log-server.o login.o servconf.o \ |
| 60 | serverloop.o bsd-login.o md5crypt.o $(LDFLAGS) -lssh $(LIBS) $(LIBWRAP) |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 61 | |
Damien Miller | d3dcfaf | 1999-11-09 13:52:33 +1100 | [diff] [blame] | 62 | scp: scp.o libssh.a |
Damien Miller | 18ccf85 | 1999-12-16 13:06:18 +1100 | [diff] [blame] | 63 | $(CC) -o $@ scp.o $(LDFLAGS) -lssh $(LIBS) |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 64 | |
Damien Miller | d3dcfaf | 1999-11-09 13:52:33 +1100 | [diff] [blame] | 65 | ssh-add: ssh-add.o log-client.o libssh.a |
Damien Miller | 18ccf85 | 1999-12-16 13:06:18 +1100 | [diff] [blame] | 66 | $(CC) -o $@ ssh-add.o log-client.o $(LDFLAGS) -lssh $(LIBS) |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 67 | |
Damien Miller | d3dcfaf | 1999-11-09 13:52:33 +1100 | [diff] [blame] | 68 | ssh-agent: ssh-agent.o log-client.o libssh.a |
Damien Miller | 18ccf85 | 1999-12-16 13:06:18 +1100 | [diff] [blame] | 69 | $(CC) -o $@ ssh-agent.o log-client.o $(LDFLAGS) -lssh $(LIBS) |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 70 | |
Damien Miller | d3dcfaf | 1999-11-09 13:52:33 +1100 | [diff] [blame] | 71 | ssh-keygen: ssh-keygen.o log-client.o libssh.a |
Damien Miller | 18ccf85 | 1999-12-16 13:06:18 +1100 | [diff] [blame] | 72 | $(CC) -o $@ ssh-keygen.o log-client.o $(LDFLAGS) -lssh $(LIBS) |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 73 | |
Damien Miller | d3dcfaf | 1999-11-09 13:52:33 +1100 | [diff] [blame] | 74 | gnome-ssh-askpass: gnome-ssh-askpass.c |
| 75 | $(CC) $(CFLAGS) $(GNOME_CFLAGS) -o $@ gnome-ssh-askpass.c $(GNOME_LIBS) |
| 76 | |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 77 | clean: |
Damien Miller | 3c5cb38 | 1999-10-29 12:06:53 +1000 | [diff] [blame] | 78 | rm -f *.o core $(TARGETS) config.status config.cache config.log |
Damien Miller | 356a0b0 | 1999-11-08 15:30:59 +1100 | [diff] [blame] | 79 | |
Damien Miller | cdb8b1d | 1999-11-09 14:31:49 +1100 | [diff] [blame] | 80 | install: all |
Damien Miller | d8087f6 | 1999-11-25 12:31:26 +1100 | [diff] [blame] | 81 | $(INSTALL) -d $(bindir) |
| 82 | $(INSTALL) -d $(sbindir) |
| 83 | $(INSTALL) -d $(mandir) |
| 84 | $(INSTALL) -d $(mandir)/man1 |
| 85 | $(INSTALL) -d $(mandir)/man8 |
Damien Miller | f958fab | 1999-11-25 13:36:42 +1100 | [diff] [blame] | 86 | $(INSTALL) -s ssh $(bindir)/ssh |
| 87 | $(INSTALL) -s scp $(bindir)/scp |
| 88 | $(INSTALL) -s ssh-add $(bindir)/ssh-add |
| 89 | $(INSTALL) -s ssh-agent $(bindir)/ssh-agent |
| 90 | $(INSTALL) -s ssh-keygen $(bindir)/ssh-keygen |
| 91 | $(INSTALL) -s sshd $(sbindir)/sshd |
Damien Miller | c6b3bbe | 1999-12-13 08:27:33 +1100 | [diff] [blame] | 92 | $(INSTALL) -m 644 ssh.1 $(mandir)/man1/ssh.1 |
| 93 | $(INSTALL) -m 644 scp.1 $(mandir)/man1/scp.1 |
| 94 | $(INSTALL) -m 644 ssh-add.1 $(mandir)/man1/ssh-add.1 |
| 95 | $(INSTALL) -m 644 ssh-agent.1 $(mandir)/man1/ssh-agent.1 |
| 96 | $(INSTALL) -m 644 ssh-keygen.1 $(mandir)/man1/ssh-keygen.1 |
| 97 | $(INSTALL) -m 644 sshd.8 $(mandir)/man8/sshd.8 |
Damien Miller | 1f7833d | 1999-11-30 09:47:52 +1100 | [diff] [blame] | 98 | -rm -f $(bindir)/slogin |
| 99 | ln -s ssh $(bindir)/slogin |
| 100 | -rm -f $(mandir)/man1/slogin.1 |
| 101 | ln -s ssh.1 $(mandir)/man1/slogin.1 |
Damien Miller | 3d1b22c | 1999-11-12 15:46:08 +1100 | [diff] [blame] | 102 | |
Damien Miller | f066d6e | 1999-11-25 13:40:22 +1100 | [diff] [blame] | 103 | if [ ! -z "@GNOME_ASKPASS@" ] ; then \ |
Damien Miller | 11ba8d4 | 1999-12-15 16:42:45 +1100 | [diff] [blame] | 104 | $(INSTALL) -d $(libexecdir) ; \ |
| 105 | $(INSTALL) -d $(libexecdir)/ssh ; \ |
Damien Miller | f958fab | 1999-11-25 13:36:42 +1100 | [diff] [blame] | 106 | $(INSTALL) -s @GNOME_ASKPASS@ ${ASKPASS_PROGRAM} ; \ |
Damien Miller | 3d1b22c | 1999-11-12 15:46:08 +1100 | [diff] [blame] | 107 | fi |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 108 | |
Damien Miller | 296a546 | 1999-11-13 10:48:51 +1100 | [diff] [blame] | 109 | if [ ! -f $(sysconfdir)/ssh_config -a ! -f $(sysconfdir)/sshd_config ]; then \ |
Damien Miller | d8087f6 | 1999-11-25 12:31:26 +1100 | [diff] [blame] | 110 | $(INSTALL) -d $(sysconfdir); \ |
Damien Miller | c6b3bbe | 1999-12-13 08:27:33 +1100 | [diff] [blame] | 111 | $(INSTALL) -m 644 ssh_config $(sysconfdir)/ssh_config; \ |
| 112 | $(INSTALL) -m 644 sshd_config $(sysconfdir)/sshd_config; \ |
Damien Miller | 296a546 | 1999-11-13 10:48:51 +1100 | [diff] [blame] | 113 | fi |
| 114 | |
Damien Miller | bf1c9b2 | 1999-12-09 10:16:54 +1100 | [diff] [blame] | 115 | uninstallall: uninstall |
| 116 | -rm -f $(sysconfdir)/ssh_config |
| 117 | -rm -f $(sysconfdir)/sshd_config |
| 118 | -rmdir $(sysconfdir) |
| 119 | -rmdir $(bindir) |
| 120 | -rmdir $(sbindir) |
| 121 | -rmdir $(mandir)/man1 |
| 122 | -rmdir $(mandir)/man8 |
| 123 | -rmdir $(mandir) |
| 124 | -rmdir $(libexecdir) |
| 125 | |
| 126 | uninstall: |
| 127 | -rm -f $(bindir)/ssh |
| 128 | -rm -f $(bindir)/scp |
| 129 | -rm -f $(bindir)/ssh-add |
| 130 | -rm -f $(bindir)/ssh-agent |
| 131 | -rm -f $(bindir)/ssh-keygen |
| 132 | -rm -f $(sbindir)/sshd |
| 133 | -rm -f $(mandir)/man1/ssh.1 |
| 134 | -rm -f $(mandir)/man1/scp.1 |
| 135 | -rm -f $(mandir)/man1/ssh-add.1 |
| 136 | -rm -f $(mandir)/man1/ssh-agent.1 |
| 137 | -rm -f $(mandir)/man1/ssh-keygen.1 |
| 138 | -rm -f $(mandir)/man8/sshd.8 |
| 139 | -rm -f $(bindir)/slogin |
| 140 | -rm -f $(mandir)/man1/slogin.1 |
Damien Miller | bf1c9b2 | 1999-12-09 10:16:54 +1100 | [diff] [blame] | 141 | -rm -f ${ASKPASS_PROGRAM} |
| 142 | -rmdir $(libexecdir)/ssh ; |
| 143 | |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 144 | distclean: clean |
Damien Miller | 356a0b0 | 1999-11-08 15:30:59 +1100 | [diff] [blame] | 145 | rm -f Makefile config.h core *~ |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 146 | |
| 147 | mrproper: distclean |
Damien Miller | 356a0b0 | 1999-11-08 15:30:59 +1100 | [diff] [blame] | 148 | |
| 149 | veryclean: distclean |
Damien Miller | c7b38ce | 1999-11-09 10:28:04 +1100 | [diff] [blame] | 150 | rm -f configure config.h.in |
| 151 | |