]>
Commit | Line | Data |
---|---|---|
5881cd60 | 1 | prefix=@prefix@ |
2 | exec_prefix=@exec_prefix@ | |
3 | bindir=@bindir@ | |
4 | sbindir=@sbindir@ | |
42b89914 | 5 | libexecdir=@libexecdir@ |
bb0dd7f6 | 6 | mandir=@mandir@ |
af381f02 | 7 | sysconfdir=@sysconfdir@ |
5881cd60 | 8 | |
d4f11b59 | 9 | SSH_PROGRAM=@bindir@/ssh |
736890c4 | 10 | ASKPASS_PROGRAM=@libexecdir@/ssh/ssh-askpass |
d4f11b59 | 11 | |
5881cd60 | 12 | CC=@CC@ |
af381f02 | 13 | PATHS=-DETCDIR=\"$(sysconfdir)\" -DSSH_PROGRAM=\"$(SSH_PROGRAM)\" -DASKPASS_PROGRAM=\"$(ASKPASS_PROGRAM)\" |
d4f11b59 | 14 | CFLAGS=@CFLAGS@ $(PATHS) @DEFS@ |
6a0aeebc | 15 | EXTRA_TARGETS=@GNOME_ASKPASS@ |
16 | TARGETS=libssh.a ssh sshd ssh-add ssh-keygen ssh-agent scp $(EXTRA_TARGETS) | |
17f0f4a7 | 17 | LIBS=@LIBS@ |
5881cd60 | 18 | AR=@AR@ |
19 | RANLIB=@RANLIB@ | |
20 | ||
17f0f4a7 | 21 | GNOME_CFLAGS=`gnome-config --cflags gnome gnomeui` |
22 | GNOME_LIBS=`gnome-config --libs gnome gnomeui` | |
23 | ||
5881cd60 | 24 | OBJS= authfd.o authfile.o auth-passwd.o auth-rhosts.o auth-rh-rsa.o \ |
91b8065d | 25 | auth-rsa.o auth-skey.o bufaux.o buffer.o canohost.o channels.o \ |
26 | cipher.o clientloop.o compress.o crc32.o deattack.o helper.o \ | |
27 | hostfile.o log-client.o login.o log-server.o match.o mpaux.o \ | |
28 | packet.o pty.o readconf.o readpass.o rsa.o servconf.o serverloop.o \ | |
5881cd60 | 29 | sshconnect.o tildexpand.o ttymodes.o uidswap.o xmalloc.o \ |
b09a984b | 30 | helper.o bsd-mktemp.o bsd-strlcpy.o bsd-strlcat.o bsd-daemon.o \ |
31 | bsd-login.o rc4.o md5crypt.o | |
5881cd60 | 32 | |
33 | all: $(OBJS) $(TARGETS) | |
34 | ||
b09a984b | 35 | libssh.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 |
5881cd60 | 36 | $(AR) rv $@ $^ |
37 | $(RANLIB) $@ | |
38 | ||
17f0f4a7 | 39 | ssh: ssh.o sshconnect.o log-client.o readconf.o clientloop.o libssh.a |
5881cd60 | 40 | $(CC) -o $@ $^ $(LFLAGS) $(LIBS) |
41 | ||
caf3bc51 | 42 | sshd: 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 |
5881cd60 | 43 | $(CC) -o $@ $^ $(LFLAGS) $(LIBS) |
44 | ||
17f0f4a7 | 45 | scp: scp.o libssh.a |
5881cd60 | 46 | $(CC) -o $@ $^ $(LFLAGS) $(LIBS) |
47 | ||
17f0f4a7 | 48 | ssh-add: ssh-add.o log-client.o libssh.a |
5881cd60 | 49 | $(CC) -o $@ $^ $(LFLAGS) $(LIBS) |
50 | ||
17f0f4a7 | 51 | ssh-agent: ssh-agent.o log-client.o libssh.a |
5881cd60 | 52 | $(CC) -o $@ $^ $(LFLAGS) $(LIBS) |
53 | ||
17f0f4a7 | 54 | ssh-keygen: ssh-keygen.o log-client.o libssh.a |
5881cd60 | 55 | $(CC) -o $@ $^ $(LFLAGS) $(LIBS) |
56 | ||
17f0f4a7 | 57 | gnome-ssh-askpass: gnome-ssh-askpass.c |
58 | $(CC) $(CFLAGS) $(GNOME_CFLAGS) -o $@ gnome-ssh-askpass.c $(GNOME_LIBS) | |
59 | ||
5881cd60 | 60 | clean: |
e8162ec0 | 61 | rm -f *.o core $(TARGETS) config.status config.cache config.log |
e1a9c08d | 62 | |
df16c1f2 | 63 | install: all |
5881cd60 | 64 | install -d $(bindir) |
65 | install -d $(sbindir) | |
bb0dd7f6 | 66 | install -d $(mandir) |
67 | install -d $(mandir)/man1 | |
68 | install -d $(mandir)/man8 | |
e8162ec0 | 69 | install -s -c ssh $(bindir)/ssh |
70 | install -s -c scp $(bindir)/scp | |
71 | install -s -c ssh-add $(bindir)/ssh-add | |
72 | install -s -c ssh-agent $(bindir)/ssh-agent | |
73 | install -s -c ssh-keygen $(bindir)/ssh-keygen | |
74 | install -s -c sshd $(sbindir)/sshd | |
bb0dd7f6 | 75 | install -m644 -c ssh.1 $(mandir)/man1/ssh.1 |
76 | install -m644 -c scp.1 $(mandir)/man1/scp.1 | |
77 | install -m644 -c ssh-add.1 $(mandir)/man1/ssh-add.1 | |
78 | install -m644 -c ssh-agent.1 $(mandir)/man1/ssh-agent.1 | |
79 | install -m644 -c ssh-keygen.1 $(mandir)/man1/ssh-keygen.1 | |
80 | install -m644 -c sshd.8 $(mandir)/man8/sshd.8 | |
045672f9 | 81 | ln -sf ssh $(bindir)/slogin |
82 | ln -sf ssh.1 $(mandir)/man1/slogin.1 | |
83 | ||
dad9a31e | 84 | if [ "x@INSTALL_ASKPASS@" = "xyes" ] ; then \ |
2ddcfdf3 | 85 | install -d $(libexecdir) ; \ |
736890c4 | 86 | install -d $(libexecdir)/ssh ; \ |
045672f9 | 87 | if [ -z "@GNOME_ASKPASS@" ] ; then \ |
736890c4 | 88 | install -m755 -c ssh-askpass ${ASKPASS_PROGRAM}; \ |
045672f9 | 89 | else \ |
736890c4 | 90 | install -m755 -c gnome-ssh-askpass ${ASKPASS_PROGRAM}; \ |
75d92691 | 91 | fi ; \ |
045672f9 | 92 | fi |
5881cd60 | 93 | |
af381f02 | 94 | if [ ! -f $(sysconfdir)/ssh_config -a ! -f $(sysconfdir)/sshd_config ]; then \ |
95 | install -d $(sysconfdir); \ | |
96 | install -m644 ssh_config $(sysconfdir)/ssh_config; \ | |
97 | install -m644 sshd_config $(sysconfdir)/sshd_config; \ | |
98 | fi | |
99 | ||
5881cd60 | 100 | distclean: clean |
e1a9c08d | 101 | rm -f Makefile config.h core *~ |
5881cd60 | 102 | |
103 | mrproper: distclean | |
e1a9c08d | 104 | |
105 | veryclean: distclean | |
d4f11b59 | 106 | rm -f configure config.h.in |
107 |