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 | 296a546 | 1999-11-13 10:48:51 +1100 | [diff] [blame] | 13 | PATHS=-DETCDIR=\"$(sysconfdir)\" -DSSH_PROGRAM=\"$(SSH_PROGRAM)\" -DASKPASS_PROGRAM=\"$(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 | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 18 | AR=@AR@ |
| 19 | RANLIB=@RANLIB@ |
Damien Miller | d8087f6 | 1999-11-25 12:31:26 +1100 | [diff] [blame] | 20 | INSTALL=@INSTALL@ |
| 21 | LFLAGS=@LDFLAGS@ |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 22 | |
Damien Miller | d3dcfaf | 1999-11-09 13:52:33 +1100 | [diff] [blame] | 23 | GNOME_CFLAGS=`gnome-config --cflags gnome gnomeui` |
| 24 | GNOME_LIBS=`gnome-config --libs gnome gnomeui` |
| 25 | |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 26 | OBJS= authfd.o authfile.o auth-passwd.o auth-rhosts.o auth-rh-rsa.o \ |
Damien Miller | 8029775 | 1999-11-19 13:03:25 +1100 | [diff] [blame] | 27 | auth-rsa.o auth-skey.o bufaux.o buffer.o canohost.o channels.o \ |
| 28 | cipher.o clientloop.o compress.o crc32.o deattack.o helper.o \ |
| 29 | hostfile.o log-client.o login.o log-server.o match.o mpaux.o \ |
| 30 | packet.o pty.o readconf.o readpass.o rsa.o servconf.o serverloop.o \ |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 31 | sshconnect.o tildexpand.o ttymodes.o uidswap.o xmalloc.o \ |
Damien Miller | b3ca3aa | 1999-11-22 13:57:07 +1100 | [diff] [blame] | 32 | helper.o bsd-mktemp.o bsd-strlcpy.o bsd-strlcat.o bsd-daemon.o \ |
| 33 | bsd-login.o rc4.o md5crypt.o |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 34 | |
| 35 | all: $(OBJS) $(TARGETS) |
| 36 | |
Damien Miller | b3ca3aa | 1999-11-22 13:57:07 +1100 | [diff] [blame] | 37 | libssh.a: authfd.o authfile.o bufaux.o buffer.o canohost.o channels.o cipher.o compat.o compress.o crc32.o deattack.o hostfile.o match.o mpaux.o nchan.o packet.o readpass.o rsa.o tildexpand.o ttymodes.o uidswap.o xmalloc.o helper.o rc4.o bsd-mktemp.o bsd-strlcpy.o bsd-strlcat.o log.o fingerprint.o |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 38 | $(AR) rv $@ $^ |
| 39 | $(RANLIB) $@ |
| 40 | |
Damien Miller | d3dcfaf | 1999-11-09 13:52:33 +1100 | [diff] [blame] | 41 | ssh: ssh.o sshconnect.o log-client.o readconf.o clientloop.o libssh.a |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 42 | $(CC) -o $@ $^ $(LFLAGS) $(LIBS) |
| 43 | |
Damien Miller | dd1c7ba | 1999-11-19 15:53:20 +1100 | [diff] [blame] | 44 | sshd: sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o pty.o log-server.o login.o servconf.o serverloop.o bsd-login.o bsd-daemon.o md5crypt.o libssh.a |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 45 | $(CC) -o $@ $^ $(LFLAGS) $(LIBS) |
| 46 | |
Damien Miller | d3dcfaf | 1999-11-09 13:52:33 +1100 | [diff] [blame] | 47 | scp: scp.o libssh.a |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 48 | $(CC) -o $@ $^ $(LFLAGS) $(LIBS) |
| 49 | |
Damien Miller | d3dcfaf | 1999-11-09 13:52:33 +1100 | [diff] [blame] | 50 | ssh-add: ssh-add.o log-client.o libssh.a |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 51 | $(CC) -o $@ $^ $(LFLAGS) $(LIBS) |
| 52 | |
Damien Miller | d3dcfaf | 1999-11-09 13:52:33 +1100 | [diff] [blame] | 53 | ssh-agent: ssh-agent.o log-client.o libssh.a |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 54 | $(CC) -o $@ $^ $(LFLAGS) $(LIBS) |
| 55 | |
Damien Miller | d3dcfaf | 1999-11-09 13:52:33 +1100 | [diff] [blame] | 56 | ssh-keygen: ssh-keygen.o log-client.o libssh.a |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 57 | $(CC) -o $@ $^ $(LFLAGS) $(LIBS) |
| 58 | |
Damien Miller | d3dcfaf | 1999-11-09 13:52:33 +1100 | [diff] [blame] | 59 | gnome-ssh-askpass: gnome-ssh-askpass.c |
| 60 | $(CC) $(CFLAGS) $(GNOME_CFLAGS) -o $@ gnome-ssh-askpass.c $(GNOME_LIBS) |
| 61 | |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 62 | clean: |
Damien Miller | 3c5cb38 | 1999-10-29 12:06:53 +1000 | [diff] [blame] | 63 | rm -f *.o core $(TARGETS) config.status config.cache config.log |
Damien Miller | 356a0b0 | 1999-11-08 15:30:59 +1100 | [diff] [blame] | 64 | |
Damien Miller | cdb8b1d | 1999-11-09 14:31:49 +1100 | [diff] [blame] | 65 | install: all |
Damien Miller | d8087f6 | 1999-11-25 12:31:26 +1100 | [diff] [blame] | 66 | $(INSTALL) -d $(bindir) |
| 67 | $(INSTALL) -d $(sbindir) |
| 68 | $(INSTALL) -d $(mandir) |
| 69 | $(INSTALL) -d $(mandir)/man1 |
| 70 | $(INSTALL) -d $(mandir)/man8 |
| 71 | $(INSTALL) -s -c ssh $(bindir)/ssh |
| 72 | $(INSTALL) -s -c scp $(bindir)/scp |
| 73 | $(INSTALL) -s -c ssh-add $(bindir)/ssh-add |
| 74 | $(INSTALL) -s -c ssh-agent $(bindir)/ssh-agent |
| 75 | $(INSTALL) -s -c ssh-keygen $(bindir)/ssh-keygen |
| 76 | $(INSTALL) -s -c sshd $(sbindir)/sshd |
| 77 | $(INSTALL) -m644 -c ssh.1 $(mandir)/man1/ssh.1 |
| 78 | $(INSTALL) -m644 -c scp.1 $(mandir)/man1/scp.1 |
| 79 | $(INSTALL) -m644 -c ssh-add.1 $(mandir)/man1/ssh-add.1 |
| 80 | $(INSTALL) -m644 -c ssh-agent.1 $(mandir)/man1/ssh-agent.1 |
| 81 | $(INSTALL) -m644 -c ssh-keygen.1 $(mandir)/man1/ssh-keygen.1 |
| 82 | $(INSTALL) -m644 -c sshd.8 $(mandir)/man8/sshd.8 |
Damien Miller | 3d1b22c | 1999-11-12 15:46:08 +1100 | [diff] [blame] | 83 | ln -sf ssh $(bindir)/slogin |
| 84 | ln -sf ssh.1 $(mandir)/man1/slogin.1 |
| 85 | |
Damien Miller | 98ac007 | 1999-11-25 13:19:55 +1100 | [diff] [blame^] | 86 | $(INSTALL) -d $(libexecdir) ; |
| 87 | $(INSTALL) -d $(libexecdir)/ssh ; |
| 88 | if [ -z "@GNOME_ASKPASS@" ] ; then \ |
| 89 | $(INSTALL) -m755 -c ssh-askpass ${ASKPASS_PROGRAM}; \ |
Damien Miller | 3d1b22c | 1999-11-12 15:46:08 +1100 | [diff] [blame] | 90 | fi |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 91 | |
Damien Miller | 296a546 | 1999-11-13 10:48:51 +1100 | [diff] [blame] | 92 | if [ ! -f $(sysconfdir)/ssh_config -a ! -f $(sysconfdir)/sshd_config ]; then \ |
Damien Miller | d8087f6 | 1999-11-25 12:31:26 +1100 | [diff] [blame] | 93 | $(INSTALL) -d $(sysconfdir); \ |
| 94 | $(INSTALL) -m644 ssh_config $(sysconfdir)/ssh_config; \ |
| 95 | $(INSTALL) -m644 sshd_config $(sysconfdir)/sshd_config; \ |
Damien Miller | 296a546 | 1999-11-13 10:48:51 +1100 | [diff] [blame] | 96 | fi |
| 97 | |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 98 | distclean: clean |
Damien Miller | 356a0b0 | 1999-11-08 15:30:59 +1100 | [diff] [blame] | 99 | rm -f Makefile config.h core *~ |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 100 | |
| 101 | mrproper: distclean |
Damien Miller | 356a0b0 | 1999-11-08 15:30:59 +1100 | [diff] [blame] | 102 | |
| 103 | veryclean: distclean |
Damien Miller | c7b38ce | 1999-11-09 10:28:04 +1100 | [diff] [blame] | 104 | rm -f configure config.h.in |
| 105 | |