blob: 151131c6d08f1de715d78aaeb7aaf6ee1d285b3d [file] [log] [blame]
Damien Miller7f6ea021999-10-28 13:25:17 +10001prefix=@prefix@
2exec_prefix=@exec_prefix@
3bindir=@bindir@
4sbindir=@sbindir@
5libdir=@libdir@
Damien Miller94388161999-10-29 09:57:31 +10006mandir=@mandir@
Damien Miller7f6ea021999-10-28 13:25:17 +10007
8CC=@CC@
Damien Miller06230761999-10-28 14:03:14 +10009OPT_FLAGS=-g
Damien Miller356a0b01999-11-08 15:30:59 +110010CFLAGS=$(OPT_FLAGS) -Wall -DETCDIR=\"@sysconfdir@\" -DSSH_PROGRAM=\"@bindir@/ssh\" @DEFS@
Damien Miller3c5cb381999-10-29 12:06:53 +100011TARGETS=libssh.a ssh sshd ssh-add ssh-keygen ssh-agent scp
12LFLAGS=-L.
Damien Millera37010e1999-10-29 09:18:29 +100013LIBS=-lssh @LIBS@
Damien Miller7f6ea021999-10-28 13:25:17 +100014AR=@AR@
15RANLIB=@RANLIB@
16
17OBJS= 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
25all: $(OBJS) $(TARGETS)
26
Damien Miller3c5cb381999-10-29 12:06:53 +100027libssh.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 Miller7f6ea021999-10-28 13:25:17 +100028 $(AR) rv $@ $^
29 $(RANLIB) $@
30
Damien Miller3c5cb381999-10-29 12:06:53 +100031ssh: ssh.o sshconnect.o log-client.o readconf.o clientloop.o
Damien Miller7f6ea021999-10-28 13:25:17 +100032 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
33
Damien Miller3c5cb381999-10-29 12:06:53 +100034sshd: 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 Miller7f6ea021999-10-28 13:25:17 +100035 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
36
Damien Miller3c5cb381999-10-29 12:06:53 +100037scp: scp.o
Damien Miller7f6ea021999-10-28 13:25:17 +100038 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
39
Damien Miller3c5cb381999-10-29 12:06:53 +100040ssh-add: ssh-add.o log-client.o
Damien Miller7f6ea021999-10-28 13:25:17 +100041 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
42
Damien Miller3c5cb381999-10-29 12:06:53 +100043ssh-agent: ssh-agent.o log-client.o
Damien Miller7f6ea021999-10-28 13:25:17 +100044 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
45
Damien Miller3c5cb381999-10-29 12:06:53 +100046ssh-keygen: ssh-keygen.o log-client.o
Damien Miller7f6ea021999-10-28 13:25:17 +100047 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
48
49clean:
Damien Miller3c5cb381999-10-29 12:06:53 +100050 rm -f *.o core $(TARGETS) config.status config.cache config.log
Damien Miller356a0b01999-11-08 15:30:59 +110051
Damien Miller7f6ea021999-10-28 13:25:17 +100052install:
53 install -d $(bindir)
54 install -d $(sbindir)
Damien Miller94388161999-10-29 09:57:31 +100055 install -d $(mandir)
56 install -d $(mandir)/man1
57 install -d $(mandir)/man8
Damien Miller3c5cb381999-10-29 12:06:53 +100058 install -s -c ssh $(bindir)/ssh
Damien Miller356a0b01999-11-08 15:30:59 +110059 ln -s ssh $(bindir)/slogin
Damien Miller3c5cb381999-10-29 12:06:53 +100060 install -s -c scp $(bindir)/scp
61 install -s -c ssh-add $(bindir)/ssh-add
Damien Miller356a0b01999-11-08 15:30:59 +110062 install -m755 -c ssh-askpass $(libdir)/ssh/ssh-askpass
Damien Miller3c5cb381999-10-29 12:06:53 +100063 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 Miller94388161999-10-29 09:57:31 +100066 install -m644 -c ssh.1 $(mandir)/man1/ssh.1
Damien Miller356a0b01999-11-08 15:30:59 +110067 ln -s ssh.1 $(mandir)/man1/slogin.1
Damien Miller94388161999-10-29 09:57:31 +100068 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 Miller7f6ea021999-10-28 13:25:17 +100073
74distclean: clean
Damien Miller356a0b01999-11-08 15:30:59 +110075 rm -f Makefile config.h core *~
Damien Miller7f6ea021999-10-28 13:25:17 +100076
77mrproper: distclean
Damien Miller356a0b01999-11-08 15:30:59 +110078
79veryclean: distclean
80 rm -f configure