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 | |
| 8 | CC=@CC@ |
Damien Miller | 0623076 | 1999-10-28 14:03:14 +1000 | [diff] [blame] | 9 | OPT_FLAGS=-g |
Damien Miller | 356a0b0 | 1999-11-08 15:30:59 +1100 | [diff] [blame] | 10 | CFLAGS=$(OPT_FLAGS) -Wall -DETCDIR=\"@sysconfdir@\" -DSSH_PROGRAM=\"@bindir@/ssh\" @DEFS@ |
Damien Miller | 3c5cb38 | 1999-10-29 12:06:53 +1000 | [diff] [blame] | 11 | TARGETS=libssh.a ssh sshd ssh-add ssh-keygen ssh-agent scp |
| 12 | LFLAGS=-L. |
Damien Miller | a37010e | 1999-10-29 09:18:29 +1000 | [diff] [blame] | 13 | LIBS=-lssh @LIBS@ |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 14 | AR=@AR@ |
| 15 | RANLIB=@RANLIB@ |
| 16 | |
| 17 | OBJS= authfd.o authfile.o auth-passwd.o auth-rhosts.o auth-rh-rsa.o \ |
| 18 | auth-rsa.o bufaux.o buffer.o canohost.o channels.o cipher.o \ |
| 19 | clientloop.o compress.o crc32.o deattack.o helper.o hostfile.o \ |
| 20 | log-client.o login.o log-server.o match.o mpaux.o packet.o pty.o \ |
| 21 | readconf.o readpass.o rsa.o servconf.o serverloop.o \ |
| 22 | sshconnect.o tildexpand.o ttymodes.o uidswap.o xmalloc.o \ |
| 23 | helper.o mktemp.o strlcpy.o rc4.o |
| 24 | |
| 25 | all: $(OBJS) $(TARGETS) |
| 26 | |
Damien Miller | 3c5cb38 | 1999-10-29 12:06:53 +1000 | [diff] [blame] | 27 | 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 |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 28 | $(AR) rv $@ $^ |
| 29 | $(RANLIB) $@ |
| 30 | |
Damien Miller | 3c5cb38 | 1999-10-29 12:06:53 +1000 | [diff] [blame] | 31 | ssh: ssh.o sshconnect.o log-client.o readconf.o clientloop.o |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 32 | $(CC) -o $@ $^ $(LFLAGS) $(LIBS) |
| 33 | |
Damien Miller | 3c5cb38 | 1999-10-29 12:06:53 +1000 | [diff] [blame] | 34 | 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 |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 35 | $(CC) -o $@ $^ $(LFLAGS) $(LIBS) |
| 36 | |
Damien Miller | 3c5cb38 | 1999-10-29 12:06:53 +1000 | [diff] [blame] | 37 | scp: scp.o |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 38 | $(CC) -o $@ $^ $(LFLAGS) $(LIBS) |
| 39 | |
Damien Miller | 3c5cb38 | 1999-10-29 12:06:53 +1000 | [diff] [blame] | 40 | ssh-add: ssh-add.o log-client.o |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 41 | $(CC) -o $@ $^ $(LFLAGS) $(LIBS) |
| 42 | |
Damien Miller | 3c5cb38 | 1999-10-29 12:06:53 +1000 | [diff] [blame] | 43 | ssh-agent: ssh-agent.o log-client.o |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 44 | $(CC) -o $@ $^ $(LFLAGS) $(LIBS) |
| 45 | |
Damien Miller | 3c5cb38 | 1999-10-29 12:06:53 +1000 | [diff] [blame] | 46 | ssh-keygen: ssh-keygen.o log-client.o |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 47 | $(CC) -o $@ $^ $(LFLAGS) $(LIBS) |
| 48 | |
| 49 | clean: |
Damien Miller | 3c5cb38 | 1999-10-29 12:06:53 +1000 | [diff] [blame] | 50 | rm -f *.o core $(TARGETS) config.status config.cache config.log |
Damien Miller | 356a0b0 | 1999-11-08 15:30:59 +1100 | [diff] [blame] | 51 | |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 52 | install: |
| 53 | install -d $(bindir) |
| 54 | install -d $(sbindir) |
Damien Miller | 9438816 | 1999-10-29 09:57:31 +1000 | [diff] [blame] | 55 | install -d $(mandir) |
| 56 | install -d $(mandir)/man1 |
| 57 | install -d $(mandir)/man8 |
Damien Miller | 3c5cb38 | 1999-10-29 12:06:53 +1000 | [diff] [blame] | 58 | install -s -c ssh $(bindir)/ssh |
Damien Miller | 356a0b0 | 1999-11-08 15:30:59 +1100 | [diff] [blame] | 59 | ln -s ssh $(bindir)/slogin |
Damien Miller | 3c5cb38 | 1999-10-29 12:06:53 +1000 | [diff] [blame] | 60 | install -s -c scp $(bindir)/scp |
| 61 | install -s -c ssh-add $(bindir)/ssh-add |
Damien Miller | 356a0b0 | 1999-11-08 15:30:59 +1100 | [diff] [blame] | 62 | install -m755 -c ssh-askpass $(libdir)/ssh/ssh-askpass |
Damien Miller | 3c5cb38 | 1999-10-29 12:06:53 +1000 | [diff] [blame] | 63 | install -s -c ssh-agent $(bindir)/ssh-agent |
| 64 | install -s -c ssh-keygen $(bindir)/ssh-keygen |
| 65 | install -s -c sshd $(sbindir)/sshd |
Damien Miller | 9438816 | 1999-10-29 09:57:31 +1000 | [diff] [blame] | 66 | install -m644 -c ssh.1 $(mandir)/man1/ssh.1 |
Damien Miller | 356a0b0 | 1999-11-08 15:30:59 +1100 | [diff] [blame] | 67 | ln -s ssh.1 $(mandir)/man1/slogin.1 |
Damien Miller | 9438816 | 1999-10-29 09:57:31 +1000 | [diff] [blame] | 68 | install -m644 -c scp.1 $(mandir)/man1/scp.1 |
| 69 | install -m644 -c ssh-add.1 $(mandir)/man1/ssh-add.1 |
| 70 | install -m644 -c ssh-agent.1 $(mandir)/man1/ssh-agent.1 |
| 71 | install -m644 -c ssh-keygen.1 $(mandir)/man1/ssh-keygen.1 |
| 72 | install -m644 -c sshd.8 $(mandir)/man8/sshd.8 |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 73 | |
| 74 | distclean: clean |
Damien Miller | 356a0b0 | 1999-11-08 15:30:59 +1100 | [diff] [blame] | 75 | rm -f Makefile config.h core *~ |
Damien Miller | 7f6ea02 | 1999-10-28 13:25:17 +1000 | [diff] [blame] | 76 | |
| 77 | mrproper: distclean |
Damien Miller | 356a0b0 | 1999-11-08 15:30:59 +1100 | [diff] [blame] | 78 | |
| 79 | veryclean: distclean |
| 80 | rm -f configure |