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