blob: 344210030a9fcb9899b3f0d82b67858455d81fde [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 Millere0d444c1999-11-09 14:23:45 +110014EXTRA_TARGETS=@GNOME_ASKPASS@
15TARGETS=libssh.a ssh sshd ssh-add ssh-keygen ssh-agent scp $(EXTRA_TARGETS)
Damien Millerd3dcfaf1999-11-09 13:52:33 +110016LIBS=@LIBS@
Damien Miller7f6ea021999-10-28 13:25:17 +100017AR=@AR@
18RANLIB=@RANLIB@
19
Damien Millerd3dcfaf1999-11-09 13:52:33 +110020GNOME_CFLAGS=`gnome-config --cflags gnome gnomeui`
21GNOME_LIBS=`gnome-config --libs gnome gnomeui`
22
Damien Miller7f6ea021999-10-28 13:25:17 +100023OBJS= 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
31all: $(OBJS) $(TARGETS)
32
Damien Miller3c5cb381999-10-29 12:06:53 +100033libssh.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 +100034 $(AR) rv $@ $^
35 $(RANLIB) $@
36
Damien Millerd3dcfaf1999-11-09 13:52:33 +110037ssh: ssh.o sshconnect.o log-client.o readconf.o clientloop.o libssh.a
Damien Miller7f6ea021999-10-28 13:25:17 +100038 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
39
Damien Millerd3dcfaf1999-11-09 13:52:33 +110040sshd: 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 +100041 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
42
Damien Millerd3dcfaf1999-11-09 13:52:33 +110043scp: scp.o libssh.a
Damien Miller7f6ea021999-10-28 13:25:17 +100044 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
45
Damien Millerd3dcfaf1999-11-09 13:52:33 +110046ssh-add: ssh-add.o log-client.o libssh.a
Damien Miller7f6ea021999-10-28 13:25:17 +100047 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
48
Damien Millerd3dcfaf1999-11-09 13:52:33 +110049ssh-agent: ssh-agent.o log-client.o libssh.a
Damien Miller7f6ea021999-10-28 13:25:17 +100050 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
51
Damien Millerd3dcfaf1999-11-09 13:52:33 +110052ssh-keygen: ssh-keygen.o log-client.o libssh.a
Damien Miller7f6ea021999-10-28 13:25:17 +100053 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
54
Damien Millerd3dcfaf1999-11-09 13:52:33 +110055gnome-ssh-askpass: gnome-ssh-askpass.c
56 $(CC) $(CFLAGS) $(GNOME_CFLAGS) -o $@ gnome-ssh-askpass.c $(GNOME_LIBS)
57
Damien Miller7f6ea021999-10-28 13:25:17 +100058clean:
Damien Miller3c5cb381999-10-29 12:06:53 +100059 rm -f *.o core $(TARGETS) config.status config.cache config.log
Damien Miller356a0b01999-11-08 15:30:59 +110060
Damien Millercdb8b1d1999-11-09 14:31:49 +110061install: all
Damien Miller7f6ea021999-10-28 13:25:17 +100062 install -d $(bindir)
63 install -d $(sbindir)
Damien Miller94388161999-10-29 09:57:31 +100064 install -d $(mandir)
65 install -d $(mandir)/man1
66 install -d $(mandir)/man8
Damien Millerc7b38ce1999-11-09 10:28:04 +110067 install -d $(libdir)/ssh
Damien Miller3c5cb381999-10-29 12:06:53 +100068 install -s -c ssh $(bindir)/ssh
Damien Millerc7b38ce1999-11-09 10:28:04 +110069 ln -sf ssh $(bindir)/slogin
Damien Miller3c5cb381999-10-29 12:06:53 +100070 install -s -c scp $(bindir)/scp
71 install -s -c ssh-add $(bindir)/ssh-add
Damien Millere0d444c1999-11-09 14:23:45 +110072 if [ -z "@GNOME_ASKPASS@"] ; then
73 install -m755 -c ssh-askpass $(libdir)/ssh/ssh-askpass
74 else
75 install -m755 -c gnome-ssh-askpass $(libdir)/ssh/ssh-askpass
76 fi
Damien Miller3c5cb381999-10-29 12:06:53 +100077 install -s -c ssh-agent $(bindir)/ssh-agent
78 install -s -c ssh-keygen $(bindir)/ssh-keygen
79 install -s -c sshd $(sbindir)/sshd
Damien Miller94388161999-10-29 09:57:31 +100080 install -m644 -c ssh.1 $(mandir)/man1/ssh.1
Damien Millerc7b38ce1999-11-09 10:28:04 +110081 ln -sf ssh.1 $(mandir)/man1/slogin.1
Damien Miller94388161999-10-29 09:57:31 +100082 install -m644 -c scp.1 $(mandir)/man1/scp.1
83 install -m644 -c ssh-add.1 $(mandir)/man1/ssh-add.1
84 install -m644 -c ssh-agent.1 $(mandir)/man1/ssh-agent.1
85 install -m644 -c ssh-keygen.1 $(mandir)/man1/ssh-keygen.1
86 install -m644 -c sshd.8 $(mandir)/man8/sshd.8
Damien Miller7f6ea021999-10-28 13:25:17 +100087
88distclean: clean
Damien Miller356a0b01999-11-08 15:30:59 +110089 rm -f Makefile config.h core *~
Damien Miller7f6ea021999-10-28 13:25:17 +100090
91mrproper: distclean
Damien Miller356a0b01999-11-08 15:30:59 +110092
93veryclean: distclean
Damien Millerc7b38ce1999-11-09 10:28:04 +110094 rm -f configure config.h.in
95