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