blob: ec7f0fd7519bcf9dbc649661e3415e891e4374b9 [file] [log] [blame]
Damien Miller7f6ea021999-10-28 13:25:17 +10001prefix=@prefix@
2exec_prefix=@exec_prefix@
3bindir=@bindir@
4sbindir=@sbindir@
Damien Millere2324551999-11-19 17:18:57 +11005libexecdir=@libexecdir@
Damien Miller94388161999-10-29 09:57:31 +10006mandir=@mandir@
Damien Miller296a5461999-11-13 10:48:51 +11007sysconfdir=@sysconfdir@
Damien Miller7f6ea021999-10-28 13:25:17 +10008
Damien Millerc7b38ce1999-11-09 10:28:04 +11009SSH_PROGRAM=@bindir@/ssh
Damien Miller18ac1711999-11-19 12:43:19 +110010ASKPASS_PROGRAM=@libexecdir@/ssh/ssh-askpass
Damien Millerc7b38ce1999-11-09 10:28:04 +110011
Damien Miller7f6ea021999-10-28 13:25:17 +100012CC=@CC@
Damien Miller296a5461999-11-13 10:48:51 +110013PATHS=-DETCDIR=\"$(sysconfdir)\" -DSSH_PROGRAM=\"$(SSH_PROGRAM)\" -DASKPASS_PROGRAM=\"$(ASKPASS_PROGRAM)\"
Damien Millerc7b38ce1999-11-09 10:28:04 +110014CFLAGS=@CFLAGS@ $(PATHS) @DEFS@
Damien Millere0d444c1999-11-09 14:23:45 +110015EXTRA_TARGETS=@GNOME_ASKPASS@
16TARGETS=libssh.a ssh sshd ssh-add ssh-keygen ssh-agent scp $(EXTRA_TARGETS)
Damien Millerd3dcfaf1999-11-09 13:52:33 +110017LIBS=@LIBS@
Damien Miller7f6ea021999-10-28 13:25:17 +100018AR=@AR@
19RANLIB=@RANLIB@
Damien Millerd8087f61999-11-25 12:31:26 +110020INSTALL=@INSTALL@
21LFLAGS=@LDFLAGS@
Damien Miller7f6ea021999-10-28 13:25:17 +100022
Damien Millerd3dcfaf1999-11-09 13:52:33 +110023GNOME_CFLAGS=`gnome-config --cflags gnome gnomeui`
24GNOME_LIBS=`gnome-config --libs gnome gnomeui`
25
Damien Miller7f6ea021999-10-28 13:25:17 +100026OBJS= authfd.o authfile.o auth-passwd.o auth-rhosts.o auth-rh-rsa.o \
Damien Miller80297751999-11-19 13:03:25 +110027 auth-rsa.o auth-skey.o bufaux.o buffer.o canohost.o channels.o \
28 cipher.o clientloop.o compress.o crc32.o deattack.o helper.o \
29 hostfile.o log-client.o login.o log-server.o match.o mpaux.o \
30 packet.o pty.o readconf.o readpass.o rsa.o servconf.o serverloop.o \
Damien Miller7f6ea021999-10-28 13:25:17 +100031 sshconnect.o tildexpand.o ttymodes.o uidswap.o xmalloc.o \
Damien Millerb3ca3aa1999-11-22 13:57:07 +110032 helper.o bsd-mktemp.o bsd-strlcpy.o bsd-strlcat.o bsd-daemon.o \
33 bsd-login.o rc4.o md5crypt.o
Damien Miller7f6ea021999-10-28 13:25:17 +100034
35all: $(OBJS) $(TARGETS)
36
Damien Millerb3ca3aa1999-11-22 13:57:07 +110037libssh.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 bsd-strlcat.o log.o fingerprint.o
Damien Miller7f6ea021999-10-28 13:25:17 +100038 $(AR) rv $@ $^
39 $(RANLIB) $@
40
Damien Millerd3dcfaf1999-11-09 13:52:33 +110041ssh: ssh.o sshconnect.o log-client.o readconf.o clientloop.o libssh.a
Damien Miller7f6ea021999-10-28 13:25:17 +100042 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
43
Damien Millerdd1c7ba1999-11-19 15:53:20 +110044sshd: 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 +100045 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
46
Damien Millerd3dcfaf1999-11-09 13:52:33 +110047scp: scp.o libssh.a
Damien Miller7f6ea021999-10-28 13:25:17 +100048 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
49
Damien Millerd3dcfaf1999-11-09 13:52:33 +110050ssh-add: ssh-add.o log-client.o libssh.a
Damien Miller7f6ea021999-10-28 13:25:17 +100051 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
52
Damien Millerd3dcfaf1999-11-09 13:52:33 +110053ssh-agent: ssh-agent.o log-client.o libssh.a
Damien Miller7f6ea021999-10-28 13:25:17 +100054 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
55
Damien Millerd3dcfaf1999-11-09 13:52:33 +110056ssh-keygen: ssh-keygen.o log-client.o libssh.a
Damien Miller7f6ea021999-10-28 13:25:17 +100057 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
58
Damien Millerd3dcfaf1999-11-09 13:52:33 +110059gnome-ssh-askpass: gnome-ssh-askpass.c
60 $(CC) $(CFLAGS) $(GNOME_CFLAGS) -o $@ gnome-ssh-askpass.c $(GNOME_LIBS)
61
Damien Miller7f6ea021999-10-28 13:25:17 +100062clean:
Damien Miller3c5cb381999-10-29 12:06:53 +100063 rm -f *.o core $(TARGETS) config.status config.cache config.log
Damien Miller356a0b01999-11-08 15:30:59 +110064
Damien Millercdb8b1d1999-11-09 14:31:49 +110065install: all
Damien Millerd8087f61999-11-25 12:31:26 +110066 $(INSTALL) -d $(bindir)
67 $(INSTALL) -d $(sbindir)
68 $(INSTALL) -d $(mandir)
69 $(INSTALL) -d $(mandir)/man1
70 $(INSTALL) -d $(mandir)/man8
71 $(INSTALL) -s -c ssh $(bindir)/ssh
72 $(INSTALL) -s -c scp $(bindir)/scp
73 $(INSTALL) -s -c ssh-add $(bindir)/ssh-add
74 $(INSTALL) -s -c ssh-agent $(bindir)/ssh-agent
75 $(INSTALL) -s -c ssh-keygen $(bindir)/ssh-keygen
76 $(INSTALL) -s -c sshd $(sbindir)/sshd
77 $(INSTALL) -m644 -c ssh.1 $(mandir)/man1/ssh.1
78 $(INSTALL) -m644 -c scp.1 $(mandir)/man1/scp.1
79 $(INSTALL) -m644 -c ssh-add.1 $(mandir)/man1/ssh-add.1
80 $(INSTALL) -m644 -c ssh-agent.1 $(mandir)/man1/ssh-agent.1
81 $(INSTALL) -m644 -c ssh-keygen.1 $(mandir)/man1/ssh-keygen.1
82 $(INSTALL) -m644 -c sshd.8 $(mandir)/man8/sshd.8
Damien Miller3d1b22c1999-11-12 15:46:08 +110083 ln -sf ssh $(bindir)/slogin
84 ln -sf ssh.1 $(mandir)/man1/slogin.1
85
Damien Millerd05a2471999-11-15 14:25:30 +110086 if [ "x@INSTALL_ASKPASS@" = "xyes" ] ; then \
Damien Millerd8087f61999-11-25 12:31:26 +110087 $(INSTALL) -d $(libexecdir) ; \
88 $(INSTALL) -d $(libexecdir)/ssh ; \
Damien Miller3d1b22c1999-11-12 15:46:08 +110089 if [ -z "@GNOME_ASKPASS@" ] ; then \
Damien Millerd8087f61999-11-25 12:31:26 +110090 $(INSTALL) -m755 -c ssh-askpass ${ASKPASS_PROGRAM}; \
Damien Miller3d1b22c1999-11-12 15:46:08 +110091 else \
Damien Millerd8087f61999-11-25 12:31:26 +110092 $(INSTALL) -m755 -c gnome-ssh-askpass ${ASKPASS_PROGRAM}; \
Damien Miller3ba1fe11999-11-12 16:32:17 +110093 fi ; \
Damien Miller3d1b22c1999-11-12 15:46:08 +110094 fi
Damien Miller7f6ea021999-10-28 13:25:17 +100095
Damien Miller296a5461999-11-13 10:48:51 +110096 if [ ! -f $(sysconfdir)/ssh_config -a ! -f $(sysconfdir)/sshd_config ]; then \
Damien Millerd8087f61999-11-25 12:31:26 +110097 $(INSTALL) -d $(sysconfdir); \
98 $(INSTALL) -m644 ssh_config $(sysconfdir)/ssh_config; \
99 $(INSTALL) -m644 sshd_config $(sysconfdir)/sshd_config; \
Damien Miller296a5461999-11-13 10:48:51 +1100100 fi
101
Damien Miller7f6ea021999-10-28 13:25:17 +1000102distclean: clean
Damien Miller356a0b01999-11-08 15:30:59 +1100103 rm -f Makefile config.h core *~
Damien Miller7f6ea021999-10-28 13:25:17 +1000104
105mrproper: distclean
Damien Miller356a0b01999-11-08 15:30:59 +1100106
107veryclean: distclean
Damien Millerc7b38ce1999-11-09 10:28:04 +1100108 rm -f configure config.h.in
109