blob: 03200eb9deffe2d3a29df1b41261a99547c8fac6 [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
Damien Millerc7b38ce1999-11-09 10:28:04 +11008SSH_PROGRAM=@bindir@/ssh
9ASKPASS_PROGRAM=@libdir@/ssh/ssh-askpass
10
Damien Miller7f6ea021999-10-28 13:25:17 +100011CC=@CC@
Damien Millerc7b38ce1999-11-09 10:28:04 +110012PATHS=-DETCDIR=\"@sysconfdir@\" -DSSH_PROGRAM=\"$(SSH_PROGRAM)\" -DASKPASS_PROGRAM=\"$(ASKPASS_PROGRAM)\"
13CFLAGS=@CFLAGS@ $(PATHS) @DEFS@
Damien Miller3c5cb381999-10-29 12:06:53 +100014TARGETS=libssh.a ssh sshd ssh-add ssh-keygen ssh-agent scp
Damien Millerd3dcfaf1999-11-09 13:52:33 +110015LIBS=@LIBS@
Damien Miller7f6ea021999-10-28 13:25:17 +100016AR=@AR@
17RANLIB=@RANLIB@
18
Damien Millerd3dcfaf1999-11-09 13:52:33 +110019GNOME_CFLAGS=`gnome-config --cflags gnome gnomeui`
20GNOME_LIBS=`gnome-config --libs gnome gnomeui`
21
Damien Miller7f6ea021999-10-28 13:25:17 +100022OBJS= authfd.o authfile.o auth-passwd.o auth-rhosts.o auth-rh-rsa.o \
23 auth-rsa.o bufaux.o buffer.o canohost.o channels.o cipher.o \
24 clientloop.o compress.o crc32.o deattack.o helper.o hostfile.o \
25 log-client.o login.o log-server.o match.o mpaux.o packet.o pty.o \
26 readconf.o readpass.o rsa.o servconf.o serverloop.o \
27 sshconnect.o tildexpand.o ttymodes.o uidswap.o xmalloc.o \
28 helper.o mktemp.o strlcpy.o rc4.o
29
30all: $(OBJS) $(TARGETS)
31
Damien Miller3c5cb381999-10-29 12:06:53 +100032libssh.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 +100033 $(AR) rv $@ $^
34 $(RANLIB) $@
35
Damien Millerd3dcfaf1999-11-09 13:52:33 +110036ssh: ssh.o sshconnect.o log-client.o readconf.o clientloop.o libssh.a
Damien Miller7f6ea021999-10-28 13:25:17 +100037 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
38
Damien Millerd3dcfaf1999-11-09 13:52:33 +110039sshd: 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 Miller7f6ea021999-10-28 13:25:17 +100040 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
41
Damien Millerd3dcfaf1999-11-09 13:52:33 +110042scp: scp.o libssh.a
Damien Miller7f6ea021999-10-28 13:25:17 +100043 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
44
Damien Millerd3dcfaf1999-11-09 13:52:33 +110045ssh-add: ssh-add.o log-client.o libssh.a
Damien Miller7f6ea021999-10-28 13:25:17 +100046 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
47
Damien Millerd3dcfaf1999-11-09 13:52:33 +110048ssh-agent: ssh-agent.o log-client.o libssh.a
Damien Miller7f6ea021999-10-28 13:25:17 +100049 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
50
Damien Millerd3dcfaf1999-11-09 13:52:33 +110051ssh-keygen: ssh-keygen.o log-client.o libssh.a
Damien Miller7f6ea021999-10-28 13:25:17 +100052 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
53
Damien Millerd3dcfaf1999-11-09 13:52:33 +110054gnome-ssh-askpass: gnome-ssh-askpass.c
55 $(CC) $(CFLAGS) $(GNOME_CFLAGS) -o $@ gnome-ssh-askpass.c $(GNOME_LIBS)
56
Damien Miller7f6ea021999-10-28 13:25:17 +100057clean:
Damien Miller3c5cb381999-10-29 12:06:53 +100058 rm -f *.o core $(TARGETS) config.status config.cache config.log
Damien Miller356a0b01999-11-08 15:30:59 +110059
Damien Miller7f6ea021999-10-28 13:25:17 +100060install:
61 install -d $(bindir)
62 install -d $(sbindir)
Damien Miller94388161999-10-29 09:57:31 +100063 install -d $(mandir)
64 install -d $(mandir)/man1
65 install -d $(mandir)/man8
Damien Millerc7b38ce1999-11-09 10:28:04 +110066 install -d $(libdir)/ssh
Damien Miller3c5cb381999-10-29 12:06:53 +100067 install -s -c ssh $(bindir)/ssh
Damien Millerc7b38ce1999-11-09 10:28:04 +110068 ln -sf ssh $(bindir)/slogin
Damien Miller3c5cb381999-10-29 12:06:53 +100069 install -s -c scp $(bindir)/scp
70 install -s -c ssh-add $(bindir)/ssh-add
Damien Miller356a0b01999-11-08 15:30:59 +110071 install -m755 -c ssh-askpass $(libdir)/ssh/ssh-askpass
Damien Miller3c5cb381999-10-29 12:06:53 +100072 install -s -c ssh-agent $(bindir)/ssh-agent
73 install -s -c ssh-keygen $(bindir)/ssh-keygen
74 install -s -c sshd $(sbindir)/sshd
Damien Miller94388161999-10-29 09:57:31 +100075 install -m644 -c ssh.1 $(mandir)/man1/ssh.1
Damien Millerc7b38ce1999-11-09 10:28:04 +110076 ln -sf ssh.1 $(mandir)/man1/slogin.1
Damien Miller94388161999-10-29 09:57:31 +100077 install -m644 -c scp.1 $(mandir)/man1/scp.1
78 install -m644 -c ssh-add.1 $(mandir)/man1/ssh-add.1
79 install -m644 -c ssh-agent.1 $(mandir)/man1/ssh-agent.1
80 install -m644 -c ssh-keygen.1 $(mandir)/man1/ssh-keygen.1
81 install -m644 -c sshd.8 $(mandir)/man8/sshd.8
Damien Miller7f6ea021999-10-28 13:25:17 +100082
83distclean: clean
Damien Miller356a0b01999-11-08 15:30:59 +110084 rm -f Makefile config.h core *~
Damien Miller7f6ea021999-10-28 13:25:17 +100085
86mrproper: distclean
Damien Miller356a0b01999-11-08 15:30:59 +110087
88veryclean: distclean
Damien Millerc7b38ce1999-11-09 10:28:04 +110089 rm -f configure config.h.in
90