]>
Commit | Line | Data |
---|---|---|
5881cd60 | 1 | prefix=@prefix@ |
2 | exec_prefix=@exec_prefix@ | |
3 | bindir=@bindir@ | |
4 | sbindir=@sbindir@ | |
5 | libdir=@libdir@ | |
bb0dd7f6 | 6 | mandir=@mandir@ |
5881cd60 | 7 | |
8 | CC=@CC@ | |
5aecb327 | 9 | OPT_FLAGS=-g |
10 | CFLAGS=$(OPT_FLAGS) -Wall -DETCDIR=\"@sysconfdir@\" @DEFS@ | |
f1bcacf9 | 11 | TARGETS=bin/libssh.a bin/ssh bin/sshd bin/ssh-add bin/ssh-keygen bin/ssh-agent bin/scp |
5881cd60 | 12 | LFLAGS=-L./bin |
f1bcacf9 | 13 | LIBS=-lssh @LIBS@ |
5881cd60 | 14 | AR=@AR@ |
15 | RANLIB=@RANLIB@ | |
16 | ||
17 | OBJS= authfd.o authfile.o auth-passwd.o auth-rhosts.o auth-rh-rsa.o \ | |
18 | auth-rsa.o bufaux.o buffer.o canohost.o channels.o cipher.o \ | |
19 | clientloop.o compress.o crc32.o deattack.o helper.o hostfile.o \ | |
20 | log-client.o login.o log-server.o match.o mpaux.o packet.o pty.o \ | |
21 | readconf.o readpass.o rsa.o servconf.o serverloop.o \ | |
22 | sshconnect.o tildexpand.o ttymodes.o uidswap.o xmalloc.o \ | |
23 | helper.o mktemp.o strlcpy.o rc4.o | |
24 | ||
25 | all: $(OBJS) $(TARGETS) | |
26 | ||
f1bcacf9 | 27 | bin/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 |
5881cd60 | 28 | [ -d bin ] || mkdir bin |
29 | $(AR) rv $@ $^ | |
30 | $(RANLIB) $@ | |
31 | ||
f1bcacf9 | 32 | bin/ssh: ssh.o sshconnect.o log-client.o readconf.o clientloop.o |
5881cd60 | 33 | [ -d bin ] || mkdir bin |
34 | $(CC) -o $@ $^ $(LFLAGS) $(LIBS) | |
35 | ||
f1bcacf9 | 36 | bin/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 |
5881cd60 | 37 | [ -d bin ] || mkdir bin |
38 | $(CC) -o $@ $^ $(LFLAGS) $(LIBS) | |
39 | ||
f1bcacf9 | 40 | bin/scp: scp.o |
5881cd60 | 41 | [ -d bin ] || mkdir bin |
42 | $(CC) -o $@ $^ $(LFLAGS) $(LIBS) | |
43 | ||
f1bcacf9 | 44 | bin/ssh-add: ssh-add.o log-client.o |
5881cd60 | 45 | [ -d bin ] || mkdir bin |
46 | $(CC) -o $@ $^ $(LFLAGS) $(LIBS) | |
47 | ||
f1bcacf9 | 48 | bin/ssh-agent: ssh-agent.o log-client.o |
5881cd60 | 49 | [ -d bin ] || mkdir bin |
50 | $(CC) -o $@ $^ $(LFLAGS) $(LIBS) | |
51 | ||
f1bcacf9 | 52 | bin/ssh-keygen: ssh-keygen.o log-client.o |
5881cd60 | 53 | [ -d bin ] || mkdir bin |
54 | $(CC) -o $@ $^ $(LFLAGS) $(LIBS) | |
55 | ||
56 | clean: | |
57 | rm -f *.o core bin/* config.status config.cache config.log | |
58 | ||
59 | install: | |
60 | install -d $(bindir) | |
61 | install -d $(sbindir) | |
bb0dd7f6 | 62 | install -d $(mandir) |
63 | install -d $(mandir)/man1 | |
64 | install -d $(mandir)/man8 | |
65 | install -s -c bin/ssh $(bindir)/ssh | |
66 | install -s -c bin/scp $(bindir)/scp | |
67 | install -s -c bin/ssh-add $(bindir)/ssh-add | |
68 | install -s -c bin/ssh-agent $(bindir)/ssh-agent | |
69 | install -s -c bin/ssh-keygen $(bindir)/ssh-keygen | |
70 | install -s -c bin/sshd $(sbindir)/sshd | |
71 | install -m644 -c ssh.1 $(mandir)/man1/ssh.1 | |
72 | install -m644 -c scp.1 $(mandir)/man1/scp.1 | |
73 | install -m644 -c ssh-add.1 $(mandir)/man1/ssh-add.1 | |
74 | install -m644 -c ssh-agent.1 $(mandir)/man1/ssh-agent.1 | |
75 | install -m644 -c ssh-keygen.1 $(mandir)/man1/ssh-keygen.1 | |
76 | install -m644 -c sshd.8 $(mandir)/man8/sshd.8 | |
5881cd60 | 77 | |
78 | distclean: clean | |
549b3eed | 79 | rm -f Makefile config.h core configure *~ |
5881cd60 | 80 | rm -rf bin |
81 | ||
82 | mrproper: distclean |