blob: 80b0a6d4290a64c6a30a2d659efce3c3b6c36b93 [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 Miller3bc14dd1999-12-07 14:54:53 +110013PATHS=-DETCDIR=\"$(sysconfdir)\" -DSSH_PROGRAM=\"$(SSH_PROGRAM)\" -DSSH_ASKPASS_DEFAULT=\"$(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 Miller037a0dc1999-12-07 15:38:31 +110026OBJS= atomicio.o authfd.o authfile.o auth-passwd.o auth-rhosts.o \
27 auth-rh-rsa.o auth-rsa.o auth-skey.o bsd-daemon.o bsd-login.o \
28 bsd-mktemp.o bsd-snprintf.o bsd-strlcat.o bsd-strlcpy.o bufaux.o \
29 buffer.o canohost.o channels.o cipher.o clientloop.o compress.o \
30 crc32.o deattack.o helper.o helper.o hostfile.o log-client.o \
31 login.o log-server.o match.o md5crypt.o mpaux.o packet.o pty.o \
32 readconf.o readpass.o rsa.o servconf.o serverloop.o \
33 sshconnect.o tildexpand.o ttymodes.o uidswap.o xmalloc.o
Damien Miller7f6ea021999-10-28 13:25:17 +100034all: $(OBJS) $(TARGETS)
35
Damien Miller037a0dc1999-12-07 15:38:31 +110036libssh.a: atomicio.o authfd.o authfile.o bsd-daemon.o bsd-mktemp.o \
37 bsd-snprintf.o bsd-strlcat.o bsd-strlcpy.o bufaux.o \
38 buffer.o canohost.o channels.o cipher.o compat.o \
39 compress.o crc32.o deattack.o fingerprint.o helper.o \
40 hostfile.o log.o match.o mpaux.o nchan.o packet.o \
41 readpass.o rsa.o tildexpand.o ttymodes.o uidswap.o xmalloc.o
Damien Miller7f6ea021999-10-28 13:25:17 +100042 $(AR) rv $@ $^
43 $(RANLIB) $@
44
Damien Millerd3dcfaf1999-11-09 13:52:33 +110045ssh: ssh.o sshconnect.o log-client.o readconf.o clientloop.o libssh.a
Damien Miller7f6ea021999-10-28 13:25:17 +100046 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
47
Damien Miller037a0dc1999-12-07 15:38:31 +110048sshd: sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o \
49 pty.o log-server.o login.o servconf.o serverloop.o bsd-login.o \
50 md5crypt.o libssh.a
Damien Miller7f6ea021999-10-28 13:25:17 +100051 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
52
Damien Millerd3dcfaf1999-11-09 13:52:33 +110053scp: scp.o libssh.a
Damien Miller7f6ea021999-10-28 13:25:17 +100054 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
55
Damien Millerd3dcfaf1999-11-09 13:52:33 +110056ssh-add: ssh-add.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 +110059ssh-agent: ssh-agent.o log-client.o libssh.a
Damien Miller7f6ea021999-10-28 13:25:17 +100060 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
61
Damien Millerd3dcfaf1999-11-09 13:52:33 +110062ssh-keygen: ssh-keygen.o log-client.o libssh.a
Damien Miller7f6ea021999-10-28 13:25:17 +100063 $(CC) -o $@ $^ $(LFLAGS) $(LIBS)
64
Damien Millerd3dcfaf1999-11-09 13:52:33 +110065gnome-ssh-askpass: gnome-ssh-askpass.c
66 $(CC) $(CFLAGS) $(GNOME_CFLAGS) -o $@ gnome-ssh-askpass.c $(GNOME_LIBS)
67
Damien Miller7f6ea021999-10-28 13:25:17 +100068clean:
Damien Miller3c5cb381999-10-29 12:06:53 +100069 rm -f *.o core $(TARGETS) config.status config.cache config.log
Damien Miller356a0b01999-11-08 15:30:59 +110070
Damien Millercdb8b1d1999-11-09 14:31:49 +110071install: all
Damien Millerd8087f61999-11-25 12:31:26 +110072 $(INSTALL) -d $(bindir)
73 $(INSTALL) -d $(sbindir)
74 $(INSTALL) -d $(mandir)
75 $(INSTALL) -d $(mandir)/man1
76 $(INSTALL) -d $(mandir)/man8
Damien Millerf958fab1999-11-25 13:36:42 +110077 $(INSTALL) -s ssh $(bindir)/ssh
78 $(INSTALL) -s scp $(bindir)/scp
79 $(INSTALL) -s ssh-add $(bindir)/ssh-add
80 $(INSTALL) -s ssh-agent $(bindir)/ssh-agent
81 $(INSTALL) -s ssh-keygen $(bindir)/ssh-keygen
82 $(INSTALL) -s sshd $(sbindir)/sshd
83 $(INSTALL) -m644 ssh.1 $(mandir)/man1/ssh.1
84 $(INSTALL) -m644 scp.1 $(mandir)/man1/scp.1
85 $(INSTALL) -m644 ssh-add.1 $(mandir)/man1/ssh-add.1
86 $(INSTALL) -m644 ssh-agent.1 $(mandir)/man1/ssh-agent.1
87 $(INSTALL) -m644 ssh-keygen.1 $(mandir)/man1/ssh-keygen.1
88 $(INSTALL) -m644 sshd.8 $(mandir)/man8/sshd.8
Damien Miller1f7833d1999-11-30 09:47:52 +110089 -rm -f $(bindir)/slogin
90 ln -s ssh $(bindir)/slogin
91 -rm -f $(mandir)/man1/slogin.1
92 ln -s ssh.1 $(mandir)/man1/slogin.1
Damien Miller3d1b22c1999-11-12 15:46:08 +110093
Damien Miller98ac0071999-11-25 13:19:55 +110094 $(INSTALL) -d $(libexecdir) ;
95 $(INSTALL) -d $(libexecdir)/ssh ;
Damien Millerf066d6e1999-11-25 13:40:22 +110096 if [ ! -z "@GNOME_ASKPASS@" ] ; then \
Damien Millerf958fab1999-11-25 13:36:42 +110097 $(INSTALL) -s @GNOME_ASKPASS@ ${ASKPASS_PROGRAM} ; \
Damien Miller3d1b22c1999-11-12 15:46:08 +110098 fi
Damien Miller7f6ea021999-10-28 13:25:17 +100099
Damien Miller296a5461999-11-13 10:48:51 +1100100 if [ ! -f $(sysconfdir)/ssh_config -a ! -f $(sysconfdir)/sshd_config ]; then \
Damien Millerd8087f61999-11-25 12:31:26 +1100101 $(INSTALL) -d $(sysconfdir); \
102 $(INSTALL) -m644 ssh_config $(sysconfdir)/ssh_config; \
103 $(INSTALL) -m644 sshd_config $(sysconfdir)/sshd_config; \
Damien Miller296a5461999-11-13 10:48:51 +1100104 fi
105
Damien Miller7f6ea021999-10-28 13:25:17 +1000106distclean: clean
Damien Miller356a0b01999-11-08 15:30:59 +1100107 rm -f Makefile config.h core *~
Damien Miller7f6ea021999-10-28 13:25:17 +1000108
109mrproper: distclean
Damien Miller356a0b01999-11-08 15:30:59 +1100110
111veryclean: distclean
Damien Millerc7b38ce1999-11-09 10:28:04 +1100112 rm -f configure config.h.in
113