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