blob: 8de0bdcb8b82d9869c32fa8d51d8a55630694cda [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 Miller5ce662a1999-11-11 17:57:39 +110033libssh.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 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 Miller3c5cb381999-10-29 12:06:53 +100067 install -s -c ssh $(bindir)/ssh
68 install -s -c scp $(bindir)/scp
69 install -s -c ssh-add $(bindir)/ssh-add
70 install -s -c ssh-agent $(bindir)/ssh-agent
71 install -s -c ssh-keygen $(bindir)/ssh-keygen
72 install -s -c sshd $(sbindir)/sshd
Damien Miller94388161999-10-29 09:57:31 +100073 install -m644 -c ssh.1 $(mandir)/man1/ssh.1
74 install -m644 -c scp.1 $(mandir)/man1/scp.1
75 install -m644 -c ssh-add.1 $(mandir)/man1/ssh-add.1
76 install -m644 -c ssh-agent.1 $(mandir)/man1/ssh-agent.1
77 install -m644 -c ssh-keygen.1 $(mandir)/man1/ssh-keygen.1
78 install -m644 -c sshd.8 $(mandir)/man8/sshd.8
Damien Miller3d1b22c1999-11-12 15:46:08 +110079 ln -sf ssh $(bindir)/slogin
80 ln -sf ssh.1 $(mandir)/man1/slogin.1
81
82 if [ ! -z "@DISABLE_EXTERNAL_ASKPASS@" ] ; then \
83 install -d $(libdir) \
84 install -d $(libdir)/ssh \
85 if [ -z "@GNOME_ASKPASS@" ] ; then \
86 install -m755 -c ssh-askpass $(libdir)/ssh/ssh-askpass; \
87 else \
88 install -m755 -c gnome-ssh-askpass $(libdir)/ssh/ssh-askpass; \
89 fi \
90 fi
Damien Miller7f6ea021999-10-28 13:25:17 +100091
92distclean: clean
Damien Miller356a0b01999-11-08 15:30:59 +110093 rm -f Makefile config.h core *~
Damien Miller7f6ea021999-10-28 13:25:17 +100094
95mrproper: distclean
Damien Miller356a0b01999-11-08 15:30:59 +110096
97veryclean: distclean
Damien Millerc7b38ce1999-11-09 10:28:04 +110098 rm -f configure config.h.in
99