blob: b338c9ca8282dcd82d84dffe38262be711171716 [file] [log] [blame]
Damien Miller7f6ea021999-10-28 13:25:17 +10001prefix=@prefix@
2exec_prefix=@exec_prefix@
3bindir=@bindir@
4sbindir=@sbindir@
5libdir=@libdir@
Damien Millere2324551999-11-19 17:18:57 +11006libexecdir=@libexecdir@
Damien Miller94388161999-10-29 09:57:31 +10007mandir=@mandir@
Damien Miller296a5461999-11-13 10:48:51 +11008sysconfdir=@sysconfdir@
Damien Miller7f6ea021999-10-28 13:25:17 +10009
Damien Millerc7b38ce1999-11-09 10:28:04 +110010SSH_PROGRAM=@bindir@/ssh
Damien Miller18ac1711999-11-19 12:43:19 +110011ASKPASS_PROGRAM=@libexecdir@/ssh/ssh-askpass
Damien Millerc7b38ce1999-11-09 10:28:04 +110012
Damien Miller7f6ea021999-10-28 13:25:17 +100013CC=@CC@
Damien Miller296a5461999-11-13 10:48:51 +110014PATHS=-DETCDIR=\"$(sysconfdir)\" -DSSH_PROGRAM=\"$(SSH_PROGRAM)\" -DASKPASS_PROGRAM=\"$(ASKPASS_PROGRAM)\"
Damien Millerc7b38ce1999-11-09 10:28:04 +110015CFLAGS=@CFLAGS@ $(PATHS) @DEFS@
Damien Millere0d444c1999-11-09 14:23:45 +110016EXTRA_TARGETS=@GNOME_ASKPASS@
17TARGETS=libssh.a ssh sshd ssh-add ssh-keygen ssh-agent scp $(EXTRA_TARGETS)
Damien Millerd3dcfaf1999-11-09 13:52:33 +110018LIBS=@LIBS@
Damien Miller7f6ea021999-10-28 13:25:17 +100019AR=@AR@
20RANLIB=@RANLIB@
21
Damien Millerd3dcfaf1999-11-09 13:52:33 +110022GNOME_CFLAGS=`gnome-config --cflags gnome gnomeui`
23GNOME_LIBS=`gnome-config --libs gnome gnomeui`
24
Damien Miller7f6ea021999-10-28 13:25:17 +100025OBJS= authfd.o authfile.o auth-passwd.o auth-rhosts.o auth-rh-rsa.o \
Damien Miller80297751999-11-19 13:03:25 +110026 auth-rsa.o auth-skey.o bufaux.o buffer.o canohost.o channels.o \
27 cipher.o clientloop.o compress.o crc32.o deattack.o helper.o \
28 hostfile.o log-client.o login.o log-server.o match.o mpaux.o \
29 packet.o pty.o readconf.o readpass.o rsa.o servconf.o serverloop.o \
Damien Miller7f6ea021999-10-28 13:25:17 +100030 sshconnect.o tildexpand.o ttymodes.o uidswap.o xmalloc.o \
Damien Millerdd1c7ba1999-11-19 15:53:20 +110031 helper.o bsd-mktemp.o bsd-strlcpy.o bsd-daemon.o bsd-login.o rc4.o \
32 md5crypt.o
Damien Miller7f6ea021999-10-28 13:25:17 +100033
34all: $(OBJS) $(TARGETS)
35
Damien Miller04f80141999-11-19 15:32:34 +110036libssh.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 bsd-mktemp.o bsd-strlcpy.o log.o fingerprint.o
Damien Miller7f6ea021999-10-28 13:25:17 +100037 $(AR) rv $@ $^
38 $(RANLIB) $@
39
Damien Millerd3dcfaf1999-11-09 13:52:33 +110040ssh: ssh.o sshconnect.o log-client.o readconf.o clientloop.o libssh.a
Damien Miller7f6ea021999-10-28 13:25:17 +100041 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
42
Damien Millerdd1c7ba1999-11-19 15:53:20 +110043sshd: 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 bsd-login.o bsd-daemon.o md5crypt.o libssh.a
Damien Miller7f6ea021999-10-28 13:25:17 +100044 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
45
Damien Millerd3dcfaf1999-11-09 13:52:33 +110046scp: scp.o libssh.a
Damien Miller7f6ea021999-10-28 13:25:17 +100047 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
48
Damien Millerd3dcfaf1999-11-09 13:52:33 +110049ssh-add: ssh-add.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-agent: ssh-agent.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 +110055ssh-keygen: ssh-keygen.o log-client.o libssh.a
Damien Miller7f6ea021999-10-28 13:25:17 +100056 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
57
Damien Millerd3dcfaf1999-11-09 13:52:33 +110058gnome-ssh-askpass: gnome-ssh-askpass.c
59 $(CC) $(CFLAGS) $(GNOME_CFLAGS) -o $@ gnome-ssh-askpass.c $(GNOME_LIBS)
60
Damien Miller7f6ea021999-10-28 13:25:17 +100061clean:
Damien Miller3c5cb381999-10-29 12:06:53 +100062 rm -f *.o core $(TARGETS) config.status config.cache config.log
Damien Miller356a0b01999-11-08 15:30:59 +110063
Damien Millercdb8b1d1999-11-09 14:31:49 +110064install: all
Damien Miller7f6ea021999-10-28 13:25:17 +100065 install -d $(bindir)
66 install -d $(sbindir)
Damien Miller94388161999-10-29 09:57:31 +100067 install -d $(mandir)
68 install -d $(mandir)/man1
69 install -d $(mandir)/man8
Damien Miller3c5cb381999-10-29 12:06:53 +100070 install -s -c ssh $(bindir)/ssh
71 install -s -c scp $(bindir)/scp
72 install -s -c ssh-add $(bindir)/ssh-add
73 install -s -c ssh-agent $(bindir)/ssh-agent
74 install -s -c ssh-keygen $(bindir)/ssh-keygen
75 install -s -c sshd $(sbindir)/sshd
Damien Miller94388161999-10-29 09:57:31 +100076 install -m644 -c ssh.1 $(mandir)/man1/ssh.1
77 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 Miller3d1b22c1999-11-12 15:46:08 +110082 ln -sf ssh $(bindir)/slogin
83 ln -sf ssh.1 $(mandir)/man1/slogin.1
84
Damien Millerd05a2471999-11-15 14:25:30 +110085 if [ "x@INSTALL_ASKPASS@" = "xyes" ] ; then \
Damien Miller3ba1fe11999-11-12 16:32:17 +110086 install -d $(libdir) ; \
Damien Miller18ac1711999-11-19 12:43:19 +110087 install -d $(libexecdir)/ssh ; \
Damien Miller3d1b22c1999-11-12 15:46:08 +110088 if [ -z "@GNOME_ASKPASS@" ] ; then \
Damien Miller18ac1711999-11-19 12:43:19 +110089 install -m755 -c ssh-askpass ${ASKPASS_PROGRAM}; \
Damien Miller3d1b22c1999-11-12 15:46:08 +110090 else \
Damien Miller18ac1711999-11-19 12:43:19 +110091 install -m755 -c gnome-ssh-askpass ${ASKPASS_PROGRAM}; \
Damien Miller3ba1fe11999-11-12 16:32:17 +110092 fi ; \
Damien Miller3d1b22c1999-11-12 15:46:08 +110093 fi
Damien Miller7f6ea021999-10-28 13:25:17 +100094
Damien Miller296a5461999-11-13 10:48:51 +110095 if [ ! -f $(sysconfdir)/ssh_config -a ! -f $(sysconfdir)/sshd_config ]; then \
96 install -d $(sysconfdir); \
97 install -m644 ssh_config $(sysconfdir)/ssh_config; \
98 install -m644 sshd_config $(sysconfdir)/sshd_config; \
99 fi
100
Damien Miller7f6ea021999-10-28 13:25:17 +1000101distclean: clean
Damien Miller356a0b01999-11-08 15:30:59 +1100102 rm -f Makefile config.h core *~
Damien Miller7f6ea021999-10-28 13:25:17 +1000103
104mrproper: distclean
Damien Miller356a0b01999-11-08 15:30:59 +1100105
106veryclean: distclean
Damien Millerc7b38ce1999-11-09 10:28:04 +1100107 rm -f configure config.h.in
108