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